[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ayatana] New design: Opening applications and documents automatically at login



On Sat, Nov 19, 2011 at 4:27 PM, Matthew Paul Thomas <mpt@xxxxxxxxxxxxx> wrote:
> Evan Huus wrote on 20/10/11 17:50:
>> ...
>>
>> One thing that I would like it to support is mounting partitions.
>> I have my music on a separate internal NTFS partition so that it
>> can be accessed by Windows. At the moment, the first thing I have
>> to do when I log in is browse to that folder in Nautilus so that it
>> gets mounted (by gvfs?). The only way currently to have a partition
>> auto-mount on login is via /etc/fstab, which affects all users and
>> requires root access.
>>
>> An "Add Partition..." option below the "Add Shell Command..."
>> option would be absolutely fantastic. (Obviously the label and
>> location are subject to change).
>>
>> ...
>
>
> I don't quite understand the problem here. Why do you need to mount
> the partition when you log in?

My particular case is rather complex, but I think I can pull a simpler
use case out of my personal mess. Here goes...

---

Imagine a user who has Windows installed on NTFS, then installs Ubuntu
beside it. The user decides that since Windows can't read EXT4, but
Ubuntu can read NTFS, most documents and media will stay on the NTFS
partition so that they are accessible by both OSes.

By default, Ubuntu does not mount other partitions when the system is
started, which is the safe thing to do. The partitions are displayed
under 'Devices' in the Nautilus (3.0) sidebar. Clicking on one to
browse it automatically mounts it via GVFS under "/media/LABEL". This
is fine for most use cases, since to open a document the user has to
browse to it, which triggers the auto-mount.

Now imagine the user opens Banshee, browses to a path on the NTFS
partition (thus mounting it) and adds that path to their library. This
works great, until the user reboots.

If the user opens Banshee right away after a reboot, it can't find the
media files, as it doesn't know anything about the separate partition
(it just knows about a path starting with /media/LABEL). It freaks out
and complains about missing every single file in the library. The user
freaks out, since they don't know what's going on - did Ubuntu delete
all of their media?

---

So as it turns out, not so simple. After reflection, the correct (and
more difficult) solution is to make individual applications that store
libraries (like Banshee, or Calibre, or Rhythmbox, etc.) aware of GVFS
such that they will trigger the auto-mount if necessary when they are
started. However, a simple work-around would be to allow the user to
specify partitions to be mounted on login (without editing fstab,
which applies to all users and requires advanced knowledge). That last
bit would fit into the proposed interface for auto-open.

(Aside: could this problem also apply to MRU lists in other
applications as well? If so, perhaps fixing per-application is not the
correct solution and GVFS should be enhanced to watch for failed
attempts to access /media/LABEL/...)

Apologies for the confusion, and for wandering somewhat off-topic.

Evan