How to automount USB file system with Hal in the K4 Desktop Environment

The mounting of a removable device by a user may be granted with the PolicyKit Authorization tool under the Advanced tab of System Settings. To accomplish this you will need to run System Settings with root authorization. This can be achieved in several manners, but typing su and entering a password isn't one of them. If you are already capable of obtaining root authorization your own way, stick with that. Using the "ALT F2" shortcut keys then entering "kdesu systemsettings" works best.
This is an alterntive way to gain root authorization
that can be used without entering a password:
Install sudo
Code:
pkg_add -r sudo
Become a member of the wheel group
User Manager in the Systems menu works for me
Open a terminal as root and type
Code:
visudo
scroll down to the line
"Uncomment to allow people in group wheel to run all commands"
uncomment whichever way you choose to roll
type
Code:
:W
to write or save
type
Code:
:Q
to quit

Code:
exit
Code:
sudo kwrite
or
"ALT F2" "kdesu kwrite"
open /etc/fstab and add the following line to fstab
Code:
proc           		/proc       	procfs  rw  		0   	0
close kate
Code:
sudo systemsettings
or
"ALT F2" "kdesu systemsettings"

Open PolicyKit Authorization under the Advance tab
Open org.freedesktop > Storage > Hal and select
Mount file systems from removable drives
On the right side of the tab select the Grant button
In the popup window Select User drop down list pick whichever user you wish to grant this authorization to.

I was able to automount the 3 USB flash drives I tried by clicking on their labels in the Device Notifier popup.
 
I think kdesu is the preferred way of opening gui apps in kde with super user priviledges. This allows you to open from krunner (alt+f2) meaning you do not have to open a termial -- also you can skip installation and configuration of sudo. (BTW, my opinion is that a sudo guide does not have to be included here, just say "install sudo")

Otherwise nice small HOWTO.

EDIT: one more thing: use kwrite and not kate as the first is in kdebase but the latter in kdesdk.
 
Thank you, tkjacobsen. I've used kdesu before and it did seem smoother, but I think I needed gksu to be installed for it to be available to me and that meant installing the gnome desktop along with it. I'm not sure about this, but I couldn't find kdesu in ports.
 
I think it comes with kdebase. I cannot seem to fint an executable, but it works from krunner...

EDIT:
/usr/local/kde4/lib/kde4/libexec/kdesu was installed by package kdebase-runtime-4.3.4
 
Thanks again, just typed "kdesu systemsettings" in krunner and after entering the password the System Settings GUI opened with root privledges. Much smoother than the way I described. I'll edit the post to suggest this method.
 
Back
Top