Gentoo Archives: gentoo-user

From: daid kahl <daidxor@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How do I eject an audio CD inside Gnome?
Date: Tue, 31 May 2011 02:27:44
Message-Id: BANLkTi=v9zBaTG2N1rZQ6-gkp2VC_56Dsg@mail.gmail.com
In Reply to: Re: [gentoo-user] How do I eject an audio CD inside Gnome? by Alan McKinnon
1 >> > I can't be of much more help to you, I don't use Gnome at all (see above)
2 >>
3 >> Can't say I blame you.  What's the choice, though?  I appreciate the
4 >> spare uncluttered desktop of Gnome.  Last time I tried KDE (about 7 years
5 >> ago) it was anything but uncluttered.  I tried XFCE briefly, but couldn't
6 >> get it to run stably.  Besides, it was missing an application to switch
7 >> between keyboard layouts, something I absolutely need.
8 >
9 > I hear good things about XFCE these days. If you haven't tried it lately, it
10 > might be worth a new look. And you can always write a small script to change
11 > your keyboard layout if there's no gui app. Not as convenient as a systray
12 > icon, but probably a small price to pay if everything else suits your needs
13 >
14
15 My basic response was in fact that I now use XFCE, and I basically do
16 not have any auto-mounting software even installed. I don't mind
17 mounting and umounting manually for some stuff, and then using udev
18 rules and scripts for like my regular USB items (harddisks, flash
19 memory...).
20
21 So yeah, you go mount the CD yourself, but then the eject button will
22 work if you just set up a script in the very worst case, as long as
23 all permissions are satisfied (group, whatever). Usually an eject
24 call on the device will work fine for the hotkey. Just use some
25 keyboard tweaking program to fix it up. And for me that's just fine.
26 Other people may prefer it differently. But auto-mounting will do
27 annoying stuff on my laptop every time it goes to sleep and wakes up
28 and...it's just annoying to me personally.
29
30 If you don't have much experience setting up you own custom
31 'automonting' tools, I'll give just a couple examples. I think with
32 the comments it's clear enough.
33
34 daid@titan ~ % cat /etc/udev/rules.d/10-local.rules
35 # external USB, Seagate FreeAgent GO aka cyclops
36 SUBSYSTEMS=="usb", DRIVERS=="usb", ATTRS{serial}=="
37 5LZ2XQJ5", SYMLINK+="cyclops" ACTION=="add",
38 RUN+="/etc/udev/scripts/mount_cyclops.sh"
39
40
41 daid@titan ~ % more /etc/udev/scripts/mount_cyclops.sh
42 #!/bin/bash
43 #mount Seagate FreeAgent Go with serial 5LZ2XQJ5 to /mnt/cyclops on ACTION='add'
44 mount -t ext3 /dev/cyclops /mnt/cyclops
45 chown root:users /mnt/cyclops
46 chmod 775 /mnt/cyclops
47
48 daid@titan ~ % ls -l /etc/udev/scripts/mount_cyclops.sh
49 -rwxr--r-- 1 root root 186 Apr 27 04:21 /etc/udev/scripts/mount_cyclops.sh
50 daid@titan ~ % ls -l /etc/udev/rules.d/10-local.rules
51 -rw-r--r-- 1 root root 1409 May 25 13:43 /etc/udev/rules.d/10-local.rules
52
53 The udev rule will do a tricky thing making the /dev/cyclops symlink
54 so it doesn't matter what *order* the device was connected. Rather
55 than 'naming' it like in some other operating systems, you just give
56 it a static mount point. When you're done, just manually umount the
57 mount point.
58
59 Cheers,
60 daid

Replies

Subject Author
Re: [gentoo-user] How do I eject an audio CD inside Gnome? daid kahl <daidxor@×××××.com>