Bug 384201 - Icons For all Hard Drives/Partitions on the Gnome Deskop!
Icons For all Hard Drives/Partitions on the Gnome Deskop!
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: gnome-vfs2 (Show other bugs)
8
All Linux
low Severity low
: ---
: ---
Assigned To: Tomáš Bžatek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-15 04:26 EST by Jack Deslippe
Modified: 2015-03-03 17:31 EST (History)
13 users (show)

See Also:
Fixed In Version: gvfs-0.2.3-11.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-06-02 09:45:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
ftsab,mtab,selinux....not necessarily in that order....bzztt....bzzttt (3.13 KB, application/octet-stream)
2007-12-05 18:06 EST, circuithead64
no flags Details
Don't put mount points in fstab on the desktop (2.24 KB, patch)
2007-12-09 05:28 EST, Ron Yorston
no flags Details | Diff

  None (edit)
Description Jack Deslippe 2007-11-15 04:26:38 EST
Description of problem:
I have an extra internal drive and one external hard drive on my computer. I
have them set to mount at boot in /etc/fstab. My second internal drive never had
a gnome icon until fedora 8.  By changing the nautilus volumes_visible setting
in gconf, I can get rid of all the volumes icons on my desktop... But I like it
that the icon shows up when you put a thumb drive in for example.

The fix seems to be to add a file called
/usr/share/hal/fdi/policy/10osvendor/99-redhat-storage-policy-fixed-drives.fdi 
with the following in it:

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- --> 

<deviceinfo version="0.2">
<device>
  <match key="@block.storage_device:storage.hotpluggable" bool="false">
    <match key="@block.storage_device:storage.removable" bool="false">
      <merge key="volume.ignore" type="bool">true</merge>
    </match>
  </match>
</device>
</deviceinfo>

Can this be included?  The default behavior is very annoying!

Version-Release number of selected component (if applicable):

hal-0.5.10-1.fc8

How reproducible:

Have extra drives or partitions other than / or /home

Actual results:

There is a gnome-icon for all the extra partitions!

Expected results:

Only have icons for hot-pluggable devices like thumb drives / dvds.
Comment 1 Nicola Soranzo 2007-11-15 06:27:07 EST
I also find this quite annoying!

Reading hal changelog, this was introduced in 0.5.10-0.git20070731.fc8 :

- Drop 99-redhat-storage-policy-fixed-drives.fdi; this is now
  controlled by PolicyKit


This bug was also reported in FedoraForum:

http://forums.fedoraforum.org/showthread.php?t=171454

and in fedora users mailing list:

https://www.redhat.com/archives/fedora-list/2007-November/msg01995.html
Comment 2 David Zeuthen 2007-11-15 11:35:57 EST
The solution is to remove the entries from /etc/fstab - either way, hal don't
control what icons to put up.
Comment 3 Jack Deslippe 2007-11-15 14:31:51 EST
How can I remove these entries from /etc/fstab?? They are permanent  mounts 
that I want to be mounted at boot to a particular point in the filesystem.  The
only problem is that I don't want them to have icons on the gnome desktop,
because, like I said, they are permanent mounts.

It does seem to be a hal issue because adding back the file
99-redhat-storage-policy-fixed-drives.fdi fixes the problem (must tell gnome
something different about the drives).  If this can be accomplished another way,
can you tell me what to file the bug report under...?
Comment 4 Mariano Suárez-Alvarez 2007-11-24 16:12:02 EST
David, surely removing entries from /etc/fstab cannot be the solution to this...

Whoever is producing the list of removable volumes needs to be smarter, as it is
currently including everything (except the well-know mounts, like /, /home,
/proc and the like), not removable volumes. 

While this issue is only noticeable for users that do have non-standard
partitions mounted at boot time, it is *very* noticeable for them :/ For
example, it essentially doubled the amount of work I need to do to usefully use
the bookmark list in the gtk file chooser, as now I have to scroll down the list
 in order to see my bookmarks.

Comment 5 circuithead64 2007-11-25 01:40:28 EST
i have also noticed this problem. I used the following command because SELinux
complained about my wanting to mount another drive i was working on : 

setsebool -P allow_mount_anyfile=1 

After i worked on the partitions /dev/sda1 and /dev/sda3 i then ran : 

setsebool -P allow_mount_anyfile=0

I assumed that this would then prevent the drives from mounting but it did not
work.  I am new to Fedora in particular and linux in general ( SELinux still
confuses me ) anyhow i thought maybe fstab had been modified and that was why
the command didn't work or that once fstab had been modified i would have to
manually edit it but here is fstab : 

[root@localhost ~]# cat /etc/fstab
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0

and here is mtab:

[root@localhost ~]# cat /etc/mtab
/dev/mapper/VolGroup00-LogVol00 / ext3 rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/sdb1 /boot ext3 rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
/dev/sda3 /media/disk ext3 rw,nosuid,nodev,uhelper=hal 0 0
/dev/sda1 /media/disk-1 ext3 rw,nosuid,nodev,uhelper=hal 0 0

I have been warned never to modify mtab as it is produced from fstab....perhaps
this is incorrect but perhaps not so i will leave it for now but i would like to
 keep the partitions from mounting so i will keep looking for a solution.
I hope this helps but if not........well what can i say.....umount and have a
nice day!
Comment 6 circuithead64 2007-11-25 02:01:39 EST
i have poked around some more and have found another mention of mtab springing
from the loins of fstab. so then in my case at least mtab is not being updated,
presumably because of SELinux policy....
Comment 7 Jack Deslippe 2007-12-03 14:55:25 EST
Can someone explain to me why the maintainer doesn't just fix this by adding the
file
/usr/share/hal/fdi/policy/10osvendor/99-redhat-storage-policy-fixed-drives.fdi
back into the package as was originally suggested...
Comment 8 David Zeuthen 2007-12-03 15:01:15 EST
(In reply to comment #7)
> Can someone explain to me why the maintainer doesn't just fix this by adding the
> file
> /usr/share/hal/fdi/policy/10osvendor/99-redhat-storage-policy-fixed-drives.fdi
> back into the package as was originally suggested...

Because we want mounting of filesystems from partitions of fixed drives to Just
Work(tm) without having the user mock around with /etc/fstab.

      David
Comment 9 Ron Yorston 2007-12-04 04:23:26 EST
(In reply to comment #8)

> Because we want mounting of filesystems from partitions of fixed drives to Just
> Work(tm) without having the user mock around with /etc/fstab.
> 
>       David

To mount a filesystem we need to specify the partition or logical volume, the
mount point and perhaps some options.  This information has to come from
somewhere, so why not the traditional /etc/fstab?

Anyway, the issue here isn't how the filesystems get mounted, it's why they
appear on the desktop.  I note that some don't:  I have /usr as a separate
logical volume which doesn't appear on the desktop, whereas /data does.

While I can see a case for making removable media appear on the desktop I don't
find it useful for permanently mounted parts of my file hierarchy to be there.

Comment 10 David Zeuthen 2007-12-04 10:00:25 EST
(In reply to comment #9)
> To mount a filesystem we need to specify the partition or logical volume, the
> mount point and perhaps some options.  This information has to come from
> somewhere, so why not the traditional /etc/fstab?

Because that require super user privileges and you can't except desktop users to
know how to edit /etc/fstab. Typical users needs this to show their Windows or
Mac partition and they should be able to mount this through the UI by just
double click an icon in the Computer view in the file manager.

> Anyway, the issue here isn't how the filesystems get mounted, it's why they
> appear on the desktop.  I note that some don't:  I have /usr as a separate
> logical volume which doesn't appear on the desktop, whereas /data does.
> 
> While I can see a case for making removable media appear on the desktop I don't
> find it useful for permanently mounted parts of my file hierarchy to be there.

Yes, it's a bug that multiple icons appear. That's why the bug is assigned to
gnome-vfs2 which is responsible for providing data to the file manager. This
week, I'm going to do some similar work gnome-vfs2's successor gvfs; maybe I'll
have time to port this back to gnome-vfs2.

The reason that well-known FHS 2.3 mount points (such as /usr) aren't shown is
these mostly are an implementation detail of how the system is set up. Thus such
partitions are not very interesting to show.

Hope this clarifies.
Comment 11 Jack Deslippe 2007-12-04 13:31:44 EST
I agree that editing /etc/fstab is not a good option for new users (and a bit
tedious for experienced users even).  However, just like there should be an easy
UI way to mount drives and show icons, I hope there is an easy way coming in the
UI to get rid of the unwanted desktop icons as well - Perhaps you meant this as
well.
Comment 12 David Zeuthen 2007-12-04 13:39:16 EST
(In reply to comment #11)
> I agree that editing /etc/fstab is not a good option for new users (and a bit
> tedious for experienced users even).  However, just like there should be an easy
> UI way to mount drives 

This is in F8 already; you can also edit (a limited set of) mount options using
gnome-mount-nautilus-extension (that UI is horrible but can be fixed).

> and show icons, I hope there is an easy way coming in the
> UI to get rid of the unwanted desktop icons as well - Perhaps you meant this as
> well.

I meant I will look at fixing the duplicate icons.
Comment 13 Jack Deslippe 2007-12-04 13:47:13 EST
What do you mean by duplicate icons?  My original problem was about the fact
that a drive I have permanently mounted to /scratch has a single icon - I want
no icon at all for this drive.  There should be an easy UI option to get rid of
this icon for this particular drive (and not for DVDs/PenDrives)
Comment 14 Ron Yorston 2007-12-04 14:12:47 EST
(In reply to comment #10)
> The reason that well-known FHS 2.3 mount points (such as /usr) aren't shown is
> these mostly are an implementation detail of how the system is set up. Thus such
> partitions are not very interesting to show.

But why make the distinction between FHS and non-FHS mount points?  On my system
the fact that /data is a mount point is just as uninteresting to me as the fact
that /usr is.
Comment 15 David Zeuthen 2007-12-04 14:31:19 EST
> What do you mean by duplicate icons?  

There's a bug somewhere that if you use /etc/fstab for a file system you
sometimes get duplicate icons. I've must have mixed it up with this one sorry.

> My original problem was about the fact
> that a drive I have permanently mounted to /scratch has a single icon - I want
> no icon at all for this drive.  There should be an easy UI option to get rid of
> this icon for this particular drive (and not for DVDs/PenDrives)

I'm not sure polluting the UI with such an option is a good idea. I think maybe
if you add the option 'comment=hide' to /etc/fstab then the UI should avoid
showing it on the desktop.

> But why make the distinction between FHS and non-FHS mount points?  On my system
> the fact that /data is a mount point is just as uninteresting to me as the fact
> that /usr is.

This is a typical self-centric view. The reason, quite simply, is that many
OS'es create these partition for both historical and other reasons.
Comment 16 Ron Yorston 2007-12-04 15:16:02 EST
(In reply to comment #15)
> > But why make the distinction between FHS and non-FHS mount points?  On my system
> > the fact that /data is a mount point is just as uninteresting to me as the fact
> > that /usr is.
> 
> This is a typical self-centric view. The reason, quite simply, is that many
> OS'es create these partition for both historical and other reasons.


Sorry, I don't understand your response.  I know the history of the UNIX file
system.

In gnome-vfs2 there's a list of FHS mount points that aren't displayed on the
desktop, and that appears to work.  However, prior to FC8, other, non-FHS mount
points in the fstab were also not displayed on the desktop.  That behaviour has
changed in FC8 so that they are displayed.

So, once again, why make a distinction between FHS and non-FHS mount points?  I
don't think any of them should be displayed.
Comment 17 David Zeuthen 2007-12-04 15:29:11 EST
> So, once again, why make a distinction between FHS and non-FHS mount points?  

The goal of the file manager is to display your files and drives/volume. That
includes showing volume icons for things like "Windows" or "Mac OS X Disk", "2GB
Removable Media", "MOVIES" for disks/partitions you have attached to the system.
We do this because it's useful for the user.

What is not useful is to display icons for "/usr", "/var" and so on because
these are just implementation details simply because of history of UNIX and
Linux. That's why we specifically avoid showing them.

> I don't think any of them should be displayed.

I heard you the first time. And I disagree. The rationale is in the two
paragraphs above.

Now, since you've went to the extraordinary effort of creating a /scratch mount
point you must obviously be an expert user. Especially since you care about
whether it shows up or not. That's fine. 

It's not that GNOME shouldn't care about expert users like you but I don't think
it's too much to ask that you add a "comment=hide" option to /etc/fstab if you
are one of these users.

Think a little bit about what you guys are asking. In comment 13 it was
suggested to add a UI option so only media from removable drives is show. I
don't believe this is going to help anyone; novice users will be confused and
expert users will want to do this on a per-mount basis _anyway_ and they know
well enough how to edit /etc/fstab.
Comment 18 Ron Yorston 2007-12-04 16:00:56 EST
I have no problem with removable media being displayed on the desktop, nor with
stuff that's been mounted by the user by double clicking on something in the
Computer view of the file manager, as suggested in Comment #10.  However, these
are things that either don't appear in fstab or if they do they get put there by
the system.

Things that I don't want to appear on the desktop are mount points that are just
an 'implementation detail', whether they're in the FHS or not.  They definitely
appear in the fstab, either because anaconda put them there or I did.

So, what if the system adds 'comment=show' to things it puts in the fstab in
response to removable media being mounted or the user doing the pointy-clicky
thing in the file manager?  Then fstab entries for permanent mounts can look the
same as they always did.

(Oh, and it was Jack who created /scratch.  I created /data.)
Comment 19 circuithead64 2007-12-04 23:12:00 EST
I am a novice user.If i have drives mounting at boot time that do not have an
entry in fstab then is this a separate issue? I made comments 5 & 6 . I have
also noticed duplicate icons  for drives that have no fstab entry at all.Should
i file a separate bug report for this or am i just really dense. Perhaps i am
missing something obvious so if any one would care to enlighten me that'd be
great. use strong language if you must, but also if between expletives you could
squeeze a book and page number that'd be awesome dude! Yes my mouth get's me in
trouble*sigh*.....well fingers in this case i s'pose. 

__________________________________________________________________________________
Sometimes your the dog.....sometimes your the hydrant........lighten up
Comment 20 Ron Yorston 2007-12-05 04:37:29 EST
(In reply to comment #19)
> I am a novice user.If i have drives mounting at boot time that do not have an
> entry in fstab then is this a separate issue? I made comments 5 & 6 . I have
> also noticed duplicate icons  for drives that have no fstab entry at all.

This might be a different issue (or issues).  I'm not clear why you needed to do
anything with SELinux to mount your partitions.

Can you just confirm a couple of things?  These drives that are mounted at boot
without fstab entries, are they the sda1 and sda3 mentioned in Comment #5?  Is
sda a removable or fixed device?  Exactly what icons are you seeing on your desktop?

Ok, three things.
Comment 21 Nicola Soranzo 2007-12-05 10:36:50 EST
I tried the suggested "comment=hide" trick in /etc/fstab for 2 Windows
partitions mounted in /mnt/ , without success: their icons are still present on
the GNOME desktop.
I don't know if it's going to work for EXT partitions.
Comment 22 circuithead64 2007-12-05 18:04:37 EST
> 
> Can you just confirm a couple of things?  These drives that are mounted at boot
> without fstab entries, are they the sda1 and sda3 mentioned in Comment #5?  Is
> sda a removable or fixed device?  Exactly what icons are you seeing on your
desktop?
> 
> Ok, three things.
Yes the sda1 and sda3 are the drives in question. It is a fixed device. The
icons for both appear on my desktop. i can unmount the drives by right clicking
but one of the icons remains after i unmount the drives. This icon still offers
the option to unmount after i have already unmounted both drives. If i click on
unmount then it says the drive is not mounted. All good because it has been
unmounted but the icon remains.
I am not really clear on why i had to use SELinux either except that it
complained when i tried to mount the drives. 


I followed the advice offered : setsebool -P allow_mount_anyfile=1
I was then able to work on the drives. I then ran the command with the value set
to zero. Like this :setsebool -P allow_mount_anyfile=0

Perhaps this is incorrect. Also i see now in mtab( it has always been there but
i guess the light bulb finally went off since you asked if the device is fixed
or removable) :

/dev/sda3 /media/disk ext3 rw,nosuid,nodev,uhelper=hal 0 0
/dev/sda1 /media/disk-1 ext3 rw,nosuid,nodev,uhelper=hal 0 0

"/media/disk" this indicates that the drive is being treated as removable media?
which would explain why it is mounted at boot and has no fstab entries?
Still when i unmount the drives one icon does not dissappear. Also the drives
mount under other users on this machine but with no icons on the desktop. I have
attached the SELinux output that prompted me to use the aforementioned command
as well as another copy of fstab and mtab. If i am an idiot just say so, it will
not be the first or last stupid thing i have done. If you think it is a genuine
issue that belongs elsewhere then also say so but before you call me an idiot.
Comment 23 circuithead64 2007-12-05 18:06:17 EST
Created attachment 278881 [details]
ftsab,mtab,selinux....not necessarily in that order....bzztt....bzzttt

FSTAB\MTAB\SELINUX
Comment 24 Ron Yorston 2007-12-06 04:37:31 EST
There's a thread on the fedora-test mailing list that sounds like the issue
circuithead64 is seeing:

   http://www.redhat.com/archives/fedora-test-list/2007-December/msg00103.html

It may be a different problem from the one in this bug report.

Nicola, I think the 'comment=hide' trick was just a suggestion for a possible
future solution:  it hasn't actually been implemented yet.

In fact, on reflection, I think that /etc/fstab is the wrong place to put stuff
to control the UI.  The UI should keep its configuration settings elsewhere. 
(Of course, the UI might still want to look at fstab for background information
about mount points.)
Comment 25 Ron Yorston 2007-12-09 05:28:10 EST
Created attachment 282201 [details]
Don't put mount points in fstab on the desktop
Comment 26 Raul Suarez 2007-12-21 07:54:29 EST
Just a few comments without totally repeating what has been said:

- I don't have fstab entries and all my multiple partitions get automounted and
all partitions show in the desktop (this is a multiboot computer so I have about
9 partitions)
LABEL=/1                /                       ext3    defaults        1 1
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/sda5               swap                    swap    defaults        0 0

- The same partitions show twice on the desktop with exactly the same behaviour
and problems as in comment #19

- I have two non-expert, regular user sons that do not want them showing in the
desktop. They want their data accessible through nautilus but not showing in the
desktop. 

This seems to be a "per user" preference so editing fstab seems heavy handed.

So re-focusing on the bug report:

It seems that showing all partitions on the desktop for all users seems to be a
bug unless it's been deemed by the developers as a feature and then requesting a
different behaviour should be treated as a feature request.

The current behaviour seems to be OK for a single user system but not very
thought of for a multi user system.

In any event, this seems to be a Gnome issue, not a Fedora issue.

Comment 27 Luis Felipe Marzagao 2008-01-18 20:18:52 EST
(In reply to comment #8)
> Because we want mounting of filesystems from partitions of fixed drives to Just
> Work(tm) without having the user mock around with /etc/fstab.
> 
>       David
> 

Ok, I agree with that. But wouldn't it be nicer to let the user have this by
double clicking on the partition in "My Computer", instead of simply do
unrequested mountings (which, by the way, may be a little dangerous for new users)?

I agree it's nice to easily let the user access his other partitions, files,
music etc. But isn't it a bit dangerous to do it for him, even without
solicitation?!

My F8 simply started to mount all of my partitions. And the problem here isn't
just the icons on the Desktop. I don't wan't them to be mounted, among other
reasons, because it's not safe since other people use my computer.

I really think this issue should be reconsidered by developers.

Thanks
Comment 28 Jack Deslippe 2008-01-18 20:41:18 EST
In my opinion, it should just work as David says up front, but there should be a
way to blacklist certain drives if you don't like them being mounted or their
icons showing.  In other words, I don't think this feature needs to be disabled
by default, All I want is the choice to disable certain icons/mounts after I set
up my system.  None of the options for doing this presented here work - if doing
something like adding a line "comment=hide" in fstab were actually working, I
would be 100% satisfied.
Comment 29 Luis Felipe Marzagao 2008-01-19 08:04:23 EST
(In reply to comment #28)
> In my opinion, it should just work as David says up front, but there should be a
> way to blacklist certain drives if you don't like them being mounted or their
> icons showing.  In other words, I don't think this feature needs to be disabled
> by default, All I want is the choice to disable certain icons/mounts after I set
> up my system.  None of the options for doing this presented here work - if doing
> something like adding a line "comment=hide" in fstab were actually working, I
> would be 100% satisfied.

Yes, this would be a good solution also. I agree.
Comment 30 Tony Martin 2008-02-10 12:11:57 EST
In my circumstance, Fedora 8/Gnome show my windows recovery partition on the
desktop.  This is really undesirable for the normal users, I was looking for a
way to remove or hide this, but it seems that this is not currently possible. 
Am I correct
Comment 31 Stephanos Manos 2008-02-10 13:42:05 EST
In reply to comment #10)

> 
> The reason that well-known FHS 2.3 mount points (such as /usr) aren't shown is
> these mostly are an implementation detail of how the system is set up. Thus such
> partitions are not very interesting to show.
> 
> Hope this clarifies.

Not quite true. On one of my systems, that i recently upgraded to F8 i have a
couple of partition mounted under /srv (in different directories) and they show
on the desktop. This thing is quite annoying.

Here is the relevant part of my fstab

/dev/md0           /srv/localrepo          ext3    defaults        1 1
/dev/md1           /srv/smb                ext3    defaults        1 1
/dev/md2           /srv/files              ext3    defaults        1 1

According to your earlier statement these shouldn't show on my desktop since
/srv is a well known FHS mount point.  

Note You need to log in before you can comment on or make changes to this bug.