2fb9 [Solved] [XFCE] some queries regarding unmount and eject [Archive] - The FreeBSD Forums

PDA

View Full Version : [Solved] [XFCE] some queries regarding unmount and eject


bloodtears
April 27th, 2010, 17:32
Hi!

I am using Thunar file manager (version 1.0.1) and Xfce version 4.6.1 on FreeBSD 8.0 (released version).

I have some problems with ejecting my CD drive and unmounting my thumbdrive.

When I right-click the CD-drive icon on the desktop and click "Eject Volume", I received the error message


Unable to eject "FreeBSD_Install":

Failed to execute child process "eject" (No such file or directory)


I believe it is because it cannot find the command eject. Do I have to install eject (and if so, may I know which package I must install) or can I make it execute some other commands since I can use cdcontrol to eject the CD drive? Currently, I could not eject the CD drive directly.

For unmounting volumes, when I right-click on the disk icon on the desktop and click "Unmount Volume", the icon does not disappear (and I am not sure if I can safely remove it); I can still click the icon after unmounting it and I can also see the thumbdrive when using Thunar file manager after unmounting it. This is not the correct behaviour, right?

Thank you for your help

DutchDaemon
April 27th, 2010, 17:41
Search the forums for "PolicyKit.conf", and/or look at man 5 PolicyKit.conf. Note that this file should be in /usr/local/etc/PolicyKit/PolicyKit.conf, contrary to what that manpage states.

bsdmonk
April 27th, 2010, 18:58
I would recommend to install
/usr/ports/sysutils/eject

Setting an alias may work for you too:
$ alias eject="cdcontrol eject"

SirDice
April 27th, 2010, 21:57
For unmounting volumes, when I right-click on the disk icon on the desktop and click "Unmount Volume", the icon does not disappear (and I am not sure if I can safely remove it); I can still click the icon after unmounting it and I can also see the thumbdrive when using Thunar file manager after unmounting it. This is not the correct behaviour, right?
Are hald and dbus running? Does it automatically mount properly?

sixtydoses
April 28th, 2010, 00:25
I am using Thunar file manager (version 1.0.1) and Xfce version 4.6.1 on FreeBSD 8.0 (released version).


For unmounting volumes, when I right-click on the disk icon on the desktop and click "Unmount Volume", the icon does not disappear (and I am not sure if I can safely remove it); I can still click the icon after unmounting it and I can also see the thumbdrive when using Thunar file manager after unmounting it. This is not the correct behaviour, right?


I use thunar, xfce and running on FreeBSD 8.0-RELEASE-p2.

For usb sticks, after unmounting the volume, the icon will still be there, and when I right click, there's an option to mount it. And I assumed that the usb stick is safe to be plugged out at the time. If I simply click on the icon after unmounting it(on thunar's side pane), it'll get mounted.

As with cdroms, after mounting, I have the 'Eject Volume' option and it works fine. I have sysutils/gnome-mount installed instead of sysutils/eject.

DutchDaemon
April 28th, 2010, 00:46
Turn on deskutils/xfce4-notifyd, which will tell you that you can detach your USB stick ;)

wblock@
April 28th, 2010, 02:35
Turn on deskutils/xfce4-notifyd, which will tell you that you can detach your USB stick ;)

Nice! I'd been using deskutils/xfce4-notification-daemon for that, but xfce4-notifyd looks better.

bloodtears
April 28th, 2010, 17:11
Thank you all of you for your help! :)

Inside the file /etc/rc.conf, it contains the following code:


hostname="localhost.my.domain"
ifconfig_fxp0="DHCP"
keymap="us.iso"
saver="logo"
hald_enable="YES"
dbus_enable="YES"
moused_enable="YES"


so I believe hald and dbus are running right?

I have also tried to configure PolicyKit.conf using the sample posted by DutchDaemon http://forums.freebsd.org/showthread.php?t=10518&highlight=PolicyKit.conf and it does not seem the solve the problem.

Thus I believe I am experiencing the same thing as what sixtydoses is experiencing. After installing , I am able to see a pop-up message indicating that the usb drive has been unmounted, even though the icon is still appearing on the desktop.

Just wondering: is this considered a bug or is this meant to be so? If this is meant to be so, then I think perhaps it is quite confusing to users.

Anyway, I have also tried $ alias eject="cdcontrol eject" and it does not work. So I believe perhaps I will need to install "sysutils/eject" which I feel it is a bit redundant, since $ cdcontrol eject is doing the same thing already.

DutchDaemon
April 28th, 2010, 17:24
The desktop icon will always stay there until the usb stick is physically gone. This enables you to mount it again if you want.

sixtydoses
April 28th, 2010, 17:27
Just wondering: is this considered a bug or is this meant to be so? If this is meant to be so, then I think perhaps it is quite confusing to users.


I've never thought it's a bug hehe. I like it that way, because if I want to mount it again, I'll just 'right click > mount' (since the icon is still there).

bsdmonk
April 28th, 2010, 21:23
I'm pretty sure following will work:
# echo "cdcontrol eject" > /usr/local/sbin/eject
# chmod ugo+x /usr/local/sbin/eject

bloodtears
May 2nd, 2010, 03:21
I'm pretty sure following will work:
# echo "cdcontrol eject" > /usr/local/sbin/eject
# chmod ugo+x /usr/local/sbin/eject

I have tried the method as mentioned and by right it should work. Well, somehow there seems to be some error which I will try my best to describe it. When right-clicked on the desktop icon and clicked on eject, the xfce notification appeared in less than a second (so I could not see the message) and disappeared. Subsequent ejecting will cause the a window dialog to appear, stating

Failed to eject FreeBSD_Install
Unknown error

where "FreeBSD_Install" is the CD name.

If I execute the "eject" script from Terminal, everything seems to be okay. So I suspect it may be due to Xfce / Thunar behaviour when executing the eject command. I tried to look into the code of thunar file manager and all I could gather is that they are using "exo-eject". I could not trace out which part of the code it is executing the "eject" command.

Anyway, I gave up and installed "sysutils/eject" in the end :). Nevertheless, I guess I have learnt more about FreeBSD in general along the way. Thanks guys for your help! :)

wblock@
May 3rd, 2010, 22:08
I have tried the method as mentioned and by right it should work.

Which method? This thread makes my brain hurt...

My xfce system has no eject command at all, yet I can eject CDs in both SATA/IDE and USB drives. To do that, you need to have the PolicyKit.conf set up and maybe the appropriate entries in /etc/devfs.rules and group membership.

Installing sysutils/eject is just hitting it with a bigger hammer. Better to turn the key.

In /usr/local/etc/PolicyKit/PolicyKit.conf:
<match action="org.freedesktop.hal.storage.eject">
<return result="yes"/>
</match>

That has to be inside the <config> tags.

In /etc/devfs.rules:
[localrules=10]
add path 'acd*' mode 0660 group operator
add path 'cd*' mode 0660 group operator


User is a member of the operator group.

Finally, devfs_system_ruleset="localrules" is in /etc/rc.conf.

Oh, and 'ps axc | grep hald' to make sure that hal is really running and not quitting due to an error.

bloodtears
May 5th, 2010, 02:33
Thanks wblock for your advice. Really appreciate it! :) And I believe in "Installing sysutils/eject is just hitting it with a bigger hammer. Better to turn the key" too, and that's why I have been trying to figure out what went wrong.

I will try it out once I finish with my testing on both OpenJDK6 & the native JDK1.6

0