[XFCE] some queries regarding unmount and eject

bloodtears

New Member

Reaction score: 1
Messages: 11

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

Code:
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 [CMD=""]eject[/CMD]. 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 [CMD=""]cdcontrol[/CMD] 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

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 3,274
Messages: 11,452

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

Member


Messages: 27

I would recommend to install
/usr/ports/sysutils/eject

Setting an alias may work for you too:
[CMD=""]$ alias eject="cdcontrol eject"[/CMD]
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 13,895
Messages: 40,608

bloodtears said:
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

Well-Known Member

Reaction score: 63
Messages: 403

bloodtears said:
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.
 
OP
B

bloodtears

New Member

Reaction score: 1
Messages: 11

Thank you all of you for your help! :)

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

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 [CMD="deskutils/xfce4-notifyd"][/CMD], 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
Code:
$ 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
Code:
$ cdcontrol eject
is doing the same thing already.
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 3,274
Messages: 11,452

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

Well-Known Member

Reaction score: 63
Messages: 403

bloodtears said:
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

Member


Messages: 27

I'm pretty sure following will work:
Code:
# echo "cdcontrol eject" > /usr/local/sbin/eject
# chmod ugo+x /usr/local/sbin/eject
 
OP
B

bloodtears

New Member

Reaction score: 1
Messages: 11

bsdmonk said:
I'm pretty sure following will work:
Code:
# 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

Code:
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@

Beastie Himself
Developer

Reaction score: 3,777
Messages: 13,851

bloodtears said:
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:
Code:
<match action="org.freedesktop.hal.storage.eject">
    <return result="yes"/>
</match>

That has to be inside the <config> tags.

In /etc/devfs.rules:
Code:
[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.
 
OP
B

bloodtears

New Member

Reaction score: 1
Messages: 11

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
 
Top