Re: Device (un)mount applet



Miguel writes:
>> Is anyone working on such a feature? If not I could start writing
>> such a facility myself. My idea is to have a panel applet that could be
>> configured to mount a directory (like /mnt/cdrom) using the mount
>> command. To keep it simple, an entry must be in /etc/fstab so
>> a command such as 'mount /mnt/cdrom' would work. 
>
>You can also create a desktop entry in ~/desktop that includes the
>command you want to execute.  Probably the shell command would just
>flip mount/unmount depending on the current state.

This is acceptable as long as you can change the icon to reflect the
status after the action (see below)

>I need to figure a way to have those desktop entries do nicer stuff.
>Like, it would be nice that you could change the icon on the fly for
>those icons.  Say, I could create a pipe and pass that pipe to the
>process and you could talk trough it.

An extended desktop entry format may be required to specify the
icons and when to change them, for example:

-------file: Floppy Drive.desktop
[Desktop Entry]
Name=Floppy drive (mounted)
Exec="umount /mnt/floppy"
Icon=/usr/share/pixmaps/floppy-mounted.png
Geometry=15,482
Terminal=false
MultipleArgs=false
Type=Extended
Test="command script to check device status" (returns true or false)

[Alternate Desktop Entry]
Name=Floppy drive (unmounted)
Exec="mount /mnt/floppy"
Icon=/usr/share/pixmaps/floppy-unmounted.png
-------

If the test="" line is true use the standard [Desktop Entry] to display
the icons, name, and the exec command. If it is false use the information
contained in the [Alternate Desktop Entry] section.

I'm wondering if the *.desktop format is set, or open to expansion.

--
John Ellis <gqview@geocities.com>
http://www.geocities.com/SiliconValley/Haven/5235/



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