d8bb How to automount USB file system with Hal in the K4 Desktop Environment - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Miscellaneous > Howtos & FAQs (Moderated)

Howtos & FAQs (Moderated) Would you like to share some of your solutions for certain problems? Tips or tricks? Post here. All new topics are automatically moderated.

Reply
 
Thread Tools Display Modes
  #1  
Old January 2nd, 2010, 09:05
topher's Avatar
topher topher is offline
Junior Member
 
Join Date: Aug 2009
Posts: 61
Thanks: 14
Thanked 2 Times in 2 Posts
Default 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.
__________________
"An operating system (OS) is an interface between hardware and user."
en.wikipedia.org/wiki/Operating_system
"I use FreeBSD as my operating system and I'm pretty happy with it."
Kedar Damle FreeBSD for all podcast.

Last edited by topher; January 11th, 2010 at 05:09. Reason: kdesu suggestion by tkjacobsen
Reply With Quote
The Following User Says Thank You to topher For This Useful Post:
tkjacobsen (January 2nd, 2010)
  #2  
Old January 2nd, 2010, 23:29
tkjacobsen tkjacobsen is offline
Junior Member
 
Join Date: Nov 2008
Posts: 46
Thanks: 3
Thanked 10 Times in 9 Posts
Default

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.
Reply With Quote
  #3  
Old January 2nd, 2010, 23:36
topher's Avatar
topher topher is offline
Junior Member
 
Join Date: Aug 2009
Posts: 61
Thanks: 14
Thanked 2 Times in 2 Posts
Default

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.
__________________
"An operating system (OS) is an interface between hardware and user."
en.wikipedia.org/wiki/Operating_system
"I use FreeBSD as my operating system and I'm pretty happy with it."
Kedar Damle FreeBSD for all podcast.
Reply With Quote
  #4  
Old January 2nd, 2010, 23:43
tkjacobsen tkjacobsen is offline
Junior Member
 
Join Date: Nov 2008
Posts: 46
Thanks: 3
Thanked 10 Times in 9 Posts
Default

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
Reply With Quote
The Following User Says Thank You to tkjacobsen For This Useful Post:
topher (January 3rd, 2010)
  #5  
Old January 3rd, 2010, 00:05
topher's Avatar
topher topher is offline
Junior Member
 
Join Date: Aug 2009
Posts: 61
Thanks: 14
Thanked 2 Times in 2 Posts
Default

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.
__________________
"An operating system (OS) is an interface between hardware and user."
en.wikipedia.org/wiki/Operating_system
"I use FreeBSD as my operating system and I'm pretty happy with it."
Kedar Damle FreeBSD for all podcast.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] USB automount and hal daemon melgo Peripheral Hardware 20 December 4th, 2009 17:44
8.0-RC1 USB Automount Issue (Gnome) jcarver GNOME 7 October 26th, 2009 22:20
HAL - anyone had luck with automount large usb drive 250GB's gr1ml0ck Peripheral Hardware 6 October 8th, 2009 20:08
'Feature only available with HAL', USB external drive Eponasoft System Hardware 2 July 12th, 2009 05:46
Encrypting a File System: No pass w/usb key ieska328 General 1 July 2nd, 2009 17:06


All times are GMT +1. The time now is 05:38.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0