This page is about modifying and simplifying how KDE handles and exposes the file system heirarchy, storage devices and removable media to the user.
This wiki page is a continuation of the work started here http://www.kdedevelopers.org/node/2231
This is a work in progress and not final. EdgyEft includes these patches and if they prove to work nicely they may end up in final release of Kubuntu 6.10.
The patch implements the following features:
- Only the /home and /media directories are shown in the file system root. These are the only two directories in the root that a typical user really needs to deal with. The other standard directories are hidden (using .hidden file which is also respected by GNOME).
- The URL in the location bar is the standard unix path and most importantly, the paths here will be understood by any program on the system.
- The current user's home directory automatically has a house icon.
- Hard disks and removable media also have the correct icons just like in the standard media kio-slave. The icons have the same functionality as the icons in media:/. The context menu for these icons show the expected "Safely Remove", "Unmount" etc options.
- The "media inserted" notification dialog opens directories in /media instead of system:/.
- Eliminates the concept of mounting/unmounting media where possible. Removable media like disks and USB sticks are either connected/inserted and available, or they are disconnected/ejected. There is no middle state called "unmounted" where the media is inserted/connected but unusable. From a technical point of view this means that clicking on "do nothing" in the "media inserted" notification dialog does mount the medium, but doesn't open konqueror. (this is a change from the old behaviour).
- SOLVED: (Simon Edwards 13-8-2006) HAL doesn't send the mount point info for unmounted partitions. This stops unmounted mount points from being matched with their meta-data. (Simon Edwards 22-8-2006) . Solved in version 2 of the patches.
- Automatically generated mount point names need to be more friendly. (like what media:/ does now).
- Sometimes /media doesn't appear to refresh properly after a mount/unmount.
- The audiocd:/ and its friends need to be accessible in some way. (Solution: Context menu entry perhaps?) (Simon Edwards 13-8-2006) CDs opened through the notification dialog go to audiocd:/. (Simon Edwards 30-8-2006) audiocd:/ is also reachable through the Storage media kicker applet.
- SOLVED: The "media inserted" notification dialog must open directories in /media instead of system:/. (Simon Edwards 22-8-2006) . Solved in version 2 of the patches.
- Numerous changes to the default file management view in Konqueror. Removing unneeded sidebar tabs etc.
- SOLVED: The "important system places" menu on the panel needs to open directories in /media, instead of system:/. (Simon Edwards 30-8-2006) Fixed. See patch below.
SOLVED: Hiding other users' home directories might not be such a good idea. See http://www.kdedevelopers.org/node/2231#comment-5266 (Simon Edwards 22-8-2006) . Solved in version 2 of the patches. Other home directores are now shown.
- SOLVED: Should the "Storage Media" applet be added to the kicker by default? (and also patched so that it opens konq windows using the real path instead of media:/)
It should work with /media and I would like it to be default -- LukaRenko 2006-08-22 20:29:17
- (Simon Edwards 30-8-2006) Fixed. See patch below.
- (Simon Edwards 23-8-2006) There is at least one report of blank CDs being automatically mounted and tripping up K3B. Needs investigating.
- (Simon Edwards 31-8-2006) The "Storage Media" applet refuses to display unmounted device types.
- (Simon Edwards 14-9-2006): Opening an audio CD via /media/cdrom0 doesn't work.
- (Jon Anderson 8-Nov-06): Many people are experiencing problems with mounting removable media (see Bug #65662). There is a workaround, but according to Jean-Christophe Dubacq in Debian Bug #377689, things like pam_group support may *never* work. *Big* problem.
Download & Installation
Patchs Simon Edwards
Applied in Edgy
The patch attached to this bug is also recommended: http://bugs.kde.org/show_bug.cgi?id=101636
(Simon Edwards 30-8-2006) Patch for the "Storage Media" kicker applet: http://www.simonzone.com/software/kdebase_3.5.4_sime_kickermedia.diff
(Simon Edwards 30-8-2006) Patch for system:/. The contents of system:/ now go to normal directories instead of media:/ etc. This also fixes the "System Menu" kicker applet.: http://www.simonzone.com/software/kdebase_3.5.4_sime_kiosystem.diff
(Simon Edwards 30-8-2006) Patch for the default "Storage media" entry in the sidebar of kde file dialog. (Note this only takes effect for new accounts, not upgrades).: http://www.simonzone.com/software/kdelibs_3.5.4_sime_kfilespeedbar.diff
(Simon Edwards 6-8-2006) Patch which fixes the problem of the media popup not appearing. Replaces kdebase_3.5.4_sime_kio_v2.diff above: http://www.simonzone.com/software/kdebase_3.5.4_sime_kio_v3.diff
- (Simon Edwards 23-8-2006) The file konq-plugins/mediarealfolder/media_realfolder.desktop from the kdeaddons package should not be installed. Removing this service menu item removes the "Open Medium System Folder" context menu item which appears in konq in a few places.
(Simon Edwards 18-9-2006) http://www.simonzone.com/software/kdebase_3.5.4_sime_kio_v4.diff , new version.
(Simon Edwards 18-9-2006) http://www.simonzone.com/software/kdebase_3.5.4_sime_media_desktop.diff fixes the icons on the desktop to point to /media.
(Simon Edwards 18-9-2006) http://www.simonzone.com/software/kdebase_3.5.4_sime_kickermedia_v3.diff , new version with less diffs in Makefile.in.
(Simon Edwards 18-9-2006) http://www.simonzone.com/software/kdebase_3.5.4_sime_media_desktop_v2.diff fixes the icons on the desktop to point to /media.
(Simon Edwards 19-9-2006) http://www.simonzone.com/software/kdebase_3.5.4_sime_kio_v5.diff , new version.
(Simon Edwards 25-9-2006) http://www.simonzone.com/software/kdebase_3.5.4_sime_kio_v6.diff , new version. "Cancel" on the media popup acts like "Do nothing" (i.e. mounts the medium), and removable media is now quietly automounted during login.
(Simon Edwards 6-10-2006) http://www.simonzone.com/software/kdebase_3.5.4_sime_kio_v7.diff , new version. Fix for an annoying error that sometimes happen when ejecting a CD.
(Simon Edwards 6-10-2006) http://www.simonzone.com/software/kdebase_3.5.4_sime_kickermedia_v4.diff , new version. Things like unmounted NFS and HDDs can once again be shown in the kicker media applet. Plus Audio CDs should work better via the applet.
(Simon Edwards 6-10-2006) http://www.simonzone.com/software/kdebase_3.5.4_sime_media_desktop_v3.diff new version. Things like unmounted NFS and HDDs can once again be shown on the desktop, and Audio CDs should work better too.
Pending in Edgy
Fixes for audio CDs on KDE 3.5.5.
(Simon Edwards 18-10-2006) http://www.simonzone.com/software/kdebase_3.5.5_sime_kickermedia_v5.diff
(Simon Edwards 18-10-2006) http://www.simonzone.com/software/kdebase_3.5.5_sime_kio_v9.diff
(Simon Edwards 18-10-2006) http://www.simonzone.com/software/kdebase_3.5.5_sime_media_desktop_v4.diff
Pending in Feisty
These patches are drop in replacements for the ones in debian/patches.
* (Simon Edwards 18-02-2007) http://www.simonzone.com/software/kubuntu_83_media_desktop_20070216_2239.diff . Improved names for disks on the desktop. Fixes that annoy redraw bug on the desktop when a usb-pen is inserted. Audio CDs should work fine from the desktop.
* (Simon Edwards 18-02-2007) http://www.simonzone.com/software/kubuntu_76_kickermedia_20070218_1238.diff . Improved names for disks. Icons should always match what is shown on the desktop. Audio CDs should open up fine now.
First of all, I'd like to say that this is pretty cool. However, there are two behaviors of this new system that I believe have regressed from edgy.
1. Newly inserted media, if not mounted first, show up on the desktop properly as unmounted, but do not show up in /media. On the desktop I get a "1.0GB Removable Media" item with a USB stick icon, with menu entries to mount it. That is correct behavior. However, in /media, I only see a usbdisk folder. Clicking on the folder gets me a blank konqueror (i.e. it does not trigger mounting), right clicking gives me the usual folder options (again, no mounting). (The icons on the desktop should be fixed in the next update. -- Simon Edwards 18-9-2006)
Simon, the most recent patches actually made the problem a bit worse. Now, if I don't choose to mount the USB stick when I insert it, I must take it out before it'll ever mount again. To reproduce, (1) Insert USB stick. (2) Press Cancel on the KDE Daemon dialog. (3) Look on the desktop and notice no unmounted USB stick icon. (4) Look in /media and note no unmounted USB stick icon. (5) Remember that prior to these newer patches, the desktop icon was at least still present. (6) Remember that in Dapper, media:/ and the Desktop provided these icons for mounting the USB stick.
2. Unmount media's progress dialog is gone. By default, Ubuntu mounts USB media async, and it's already been discussed and agreed in Launchpad that this is the desired behavior. In Dapper, when unmounting a USB stick, it displays an Unmounting Media progress dialog, which stays there until all the data has been written to the USB stick. This progress dialog is missing from Edgy, making it REALLY easy to accidentally pull out the media before it fully syncs.
(Simon Edwards 6-10-2006) Appears to be some problem introduced in 3.5.4 itself. My dapper workstation has the same problem although I think it was working before I upgraded to 3.5.4.
3. BUG: Insert Audio CD, dialog appears, select "open with konq", Konq opens to /media/cdrom0 but nothing is shown. (Tonio) (Simon Edwards 6-10-2006) Latest update should fix this.
4. If a process is busy using the block device for a CDROM (etc) (dd if=/dev/hdc of=/dev/nul), choose "Eject" in KDE to eject the disk. A cryptic error message is shown.
5. Putting files in / violates the FHS. (just because nobody else seems to have complained about it yet, sistpoty) ;).
- Excellent work! I look forward to this, and hope Debian and KDE include it as well.
--- Borker There is a real issue with the directory hiding. At present, there is no way to tell from a given file dialog why it is you can't see the rest of the file system and no way to change the settings from the file dialog. Whereas this may or may not help new users make safer file choices, it will confuse 100% of experienced users who haven't read this documentation and there is nothing in the system, and especially at the point where this 'feature' is encountered, that indicates how to work around it.
At least in Konq if you can't see your hidden files going to the 'view' menu is fairly intuitive and there is a nice and simply labelled 'show hidden files' option. I first came across the .hidden effected filesystem when I was setting a new system to mount NFS shares. I went to the system settings panel, selected the advanced menu and went into admin mode and was then denied the ability to see /mnt. There was no indication as to why I couldn't see it or how to get it back, it was just gone, along with everything else except /home and /media neither of which were any use for the operation I wanted to perform. OK, so I can work around that and just add the mount point manually and edit fstab. Then I go as a user to point Amarok my newly mounted media share and it can't see /mnt either. This is when I have to start googling and forum searching etc to find out why I can't see most of the filesystem in the file dialog (after spend at least half an hour hunting through system settings options to see if it was something set in there).
I am dubious about the value of this feature personally, but if it must be implemented then it needs to be integrated much more visibly into the system with the ability to override the defaults available at the point at which they are encountered.
At present, the majority of kubuntu users are at least somewhat experienced. Yes, aiming to make it more new user friendly is a worthy goal, but doing so at the expense of the existing user base does not seem the way to achieve this. If these features are to be included they should be done so after they are more mature and ready for prime time, even in an 'edgy' release. This is especially the case as now edgy has gone beyond its original goal of being a bleeding edge dev playground (a perferctly worthy goal) and become the only kubuntu version that will install on most core 2 duo rigs with jmicron sata controller and intel chipset.
I'm very disappointed to see those changes in edgy. As i say in https://launchpad.net/distros/ubuntu/+source/kdebase/+bug/70217 you haven't tested your changes and it's a bit sad new bugs are introduced in Edgy. Could you tell me exactly what patches to remove to get the old media:/ behavior back please ? What you want to achieve is a good idea but it's not working perfectly. Why not doing those tests on the dev/frozen version of ubuntu ?
Generally I think this is a good idea. The problem is that it doesn't work well right now. Audio CDs open as empty folders for example as somebody else mentioned (apparently this has been fixed but not in the official updates for Edgy). I think it's bad to introduce something like that that breaks basic functionality in a stable release without making it possible to easily revert it. Also I think this is something that should be changed in KDE and not on distribution level.
Also I think it would be nicer to still use the media:/ protocol but make the media point to their real mountpoints. So clicking on the cdrom in media:/ should point to audiocd:/ or /media/cdrom0 if it's an audiocd resp. a data cd.
Mounting and unmounting of these old things called floppy-disks does not work for me under /media. Under media:/ it automounts after klicking the floppy-icon. Unmounting is possible in the servicemenu. -- VolkerLöchte 2007-02-02 12:03:06
Quite frankly and with all the respect, I dont think this way of dealing with medias is a progres if you compare with the media:/ ioslave approach. It looks like a badly implemented and poorly tested workaround, that lead to failure/inconsistancy accross the system (see various bug reports with media:/ keyword)... IMHO It shouldn't have been implemented in a stable release as is. To me, the media:/ concept was a cleaner approach (althought not perfect) as it was thightly integrated in KDE. It should not be so bad as, to my knowledge, Ubuntu/Gnome are still relying on it... I hope Kubuntu Gutsy will give us back media:/ !