Opened 15 years ago

Closed 11 years ago

Last modified 11 years ago

#1357 closed defect (fixed)

Don't automount all the volumes at startup

Reported by: erikos Owned by: tomeu
Priority: Immediate Milestone:
Component: Sugar Version: 0.84.x
Severity: Major Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Assigned

Description

Currently, the code in extensions/deviceicon/volume.py tries to automount all the available volumes at startup (for volume in volume_monitor.get_volumes()).

This includes all the partitions of my disk, if in /etc/fstab or not.

We can not remove the automount at startup since a user may have inserted a removable device, but we should refine that part of the code to removable devices.

The plan is to wait a bit and see the different status in distributions about this issue.

Attachments (1)

sugar-1357.patch (963 bytes) - added by alsroot 15 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 15 years ago by alsroot

  • Keywords r? added

Changed 15 years ago by alsroot

comment:3 Changed 15 years ago by erikos

  • Resolution fixed deleted
  • Status changed from closed to reopened

I still see it on F11 and Ubuntu 9.04. I remember last time that reading there was uncertainity if we did allwe could do already in Sugar or not (if we have the exact same behavior then nautilus).

comment:4 Changed 15 years ago by alsroot

  • Keywords r? removed

comment:5 Changed 15 years ago by tomeu

Just checked the Nautilus source and wrote in python the func that decides which drives, volumes and mounts should be displayed in the sidebar:

import gio

monitor = gio.volume_monitor_get()
for drive in monitor.get_connected_drives():
    if drive.get_volumes():
        for volume in drive.get_volumes():
            mount = volume.get_mount()
            if mount is not None:
                print 'Mount: %r %r %r' % (mount.get_icon(), mount.get_root(), mount.get_name())
            else:
                print 'Volume: %r %r' % (volume.get_icon(), volume.get_name())
    elif drive.is_media_removable() and not drive.is_media_check_automatic():
        print 'Drive: %r %r' % (drive.get_icon(), drive.get_name())

for volume in monitor.get_volumes():
    if volume.get_drive() is not None:
        continue
    mount = volume.get_mount()
    if mount is not None:
        print 'Mount: %r %r %r' % (mount.get_icon(), mount.get_root(), mount.get_name())
    else:
        print 'Volume: %r %r' % (volume.get_icon(), volume.get_name())

for mount in monitor.get_mounts():
    if mount.is_shadowed() or mount.get_volume() is not None:
        continue
    print 'Mount: %r %r %r' % (mount.get_icon(), mount.get_root(), mount.get_name())

What is printed is what we should be displaying, except probably the drive.

comment:6 Changed 15 years ago by erikos

F12 (pygobject 2.20): all the volumes (partitions, removable devices) have the flag 'should_automount' set to 'false' on startup. This means that no devices are automounted on startup.

if hasattr(volume, 'should_automount') and not volume.should_automount():
        return

comment:7 Changed 15 years ago by erikos

F11 with pygobject2-2.16: we do not have the 'should_automount' attribute, and try to automount all the devices (removable devices (usb) and partitions). We can not pass flag None to the mount command (which would not cause it to automount), since the bindings accept that only in 2.18. We could check if it is a removable disk in the automount_startup method to only mount removable devices (the same behavior as in nautilus).

comment:8 Changed 11 years ago by godiard

  • Resolution set to fixed
  • Status changed from reopened to closed

This was fixed long time ago.

comment:9 Changed 11 years ago by dnarvaez

  • Milestone 0.86 deleted

Milestone 0.86 deleted

Note: See TracTickets for help on using tickets.