Difference between revisions of "Udev"

From gr0x0rd
Jump to navigation Jump to search
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Configuring hardware - migrating from hal to udev ==
+
== Configuring hardware - udev ==
  
 
After trying on a few occasions to do this myself, I was forced to finally commit with the release of xfce 4.8. The steps here are based on the instructions outlined by ssuominen on the gentoo forums and with contributions from others in the gentoo community. First, make the necessary modifications to your ''/etc/make.conf''.
 
After trying on a few occasions to do this myself, I was forced to finally commit with the release of xfce 4.8. The steps here are based on the instructions outlined by ssuominen on the gentoo forums and with contributions from others in the gentoo community. First, make the necessary modifications to your ''/etc/make.conf''.
Line 7: Line 7:
 
Next we will make some modifications to ''/etc/portage/package.use'' .
 
Next we will make some modifications to ''/etc/portage/package.use'' .
 
  '''$''' sudo nano -w /etc/portage/package.use
 
  '''$''' sudo nano -w /etc/portage/package.use
Ensure the following directives are set. You may also want to ensure the '''hal''' USE flag is removed from any package in the file.
+
Ensure the following directives are set. You may also want to ensure the '''hal''' USE flag is removed if you've added it to any package in the file.
 
  gnome-base/gvfs gdu
 
  gnome-base/gvfs gdu
 
  sys-block/parted device-mapper  
 
  sys-block/parted device-mapper  
Sync portage before getting started with emerging packages.
+
Next we will mask hal so it doesn't get pulled in by other packages.
  '''$''' sudo emerge --sync
+
  '''$''' sudo nano -w /etc/portage/package.mask
 +
Add the line
 +
sys-apps/hal
 
Next you will want to perform the following emerge.
 
Next you will want to perform the following emerge.
  '''$''' sudo emerge -av gnome-base/gvfs sys-fs/udisks sys-power/upower sys-auth/polkit
+
  '''$''' sudo emerge -av gnome-base/gvfs sys-fs/udisks sys-power/upower sys-auth/polkit polkit-gnome
 +
Next, start the daemons needed to complete the migration and add them to startup.
 +
'''$''' sudo rc-update add dbus default
 +
'''$''' sudo rc-update add consolekit default
 +
'''$''' sudo /etc/init.d/consolekit start
 +
This should be sufficient for now.
 +
 
 +
=== Troubleshooting ===
 +
 
 +
If later on your devices aren't mounting properly, issue the command
 +
'''$''' ck-list-sessions
 +
If you have configured your kernel correctly, you should see something like this:
 +
<pre>
 +
Session2:
 +
unix-user = '1000'
 +
realname = '(null)'
 +
seat = 'Seat1'
 +
session-type = ''
 +
active = TRUE
 +
x11-display = ':0.0'
 +
x11-display-device = '/dev/tty7'
 +
display-device = ''
 +
remote-host-name = ''
 +
is-local = TRUE
 +
on-since = '2011-03-14T05:50:56.403353Z'
 +
login-session-id = '1'
 +
Session1:
 +
unix-user = '1000'
 +
realname = '(null)'
 +
seat = 'Seat2'
 +
session-type = ''
 +
active = FALSE
 +
x11-display = ':0.0'
 +
x11-display-device = ''
 +
display-device = ''
 +
remote-host-name = ''
 +
is-local = TRUE
 +
on-since = '2011-03-14T05:50:56.177323Z'
 +
login-session-id = '1'
 +
</pre>
 +
If you see something similar to the above, you're in business. The key item is the '''active''' line.

Latest revision as of 08:47, 10 May 2011

Configuring hardware - udev

After trying on a few occasions to do this myself, I was forced to finally commit with the release of xfce 4.8. The steps here are based on the instructions outlined by ssuominen on the gentoo forums and with contributions from others in the gentoo community. First, make the necessary modifications to your /etc/make.conf.

$ sudo nano -w /etc/make.conf

Ensure the following USE flags are set:

USE="-hal consolekit dbus pam policykit udev" 

Next we will make some modifications to /etc/portage/package.use .

$ sudo nano -w /etc/portage/package.use

Ensure the following directives are set. You may also want to ensure the hal USE flag is removed if you've added it to any package in the file.

gnome-base/gvfs gdu
sys-block/parted device-mapper 

Next we will mask hal so it doesn't get pulled in by other packages.

$ sudo nano -w /etc/portage/package.mask

Add the line

sys-apps/hal

Next you will want to perform the following emerge.

$ sudo emerge -av gnome-base/gvfs sys-fs/udisks sys-power/upower sys-auth/polkit polkit-gnome 

Next, start the daemons needed to complete the migration and add them to startup.

$ sudo rc-update add dbus default
$ sudo rc-update add consolekit default
$ sudo /etc/init.d/consolekit start 

This should be sufficient for now.

Troubleshooting

If later on your devices aren't mounting properly, issue the command

$ ck-list-sessions

If you have configured your kernel correctly, you should see something like this:

Session2:
	unix-user = '1000'
	realname = '(null)'
	seat = 'Seat1'
	session-type = ''
	active = TRUE
	x11-display = ':0.0'
	x11-display-device = '/dev/tty7'
	display-device = ''
	remote-host-name = ''
	is-local = TRUE
	on-since = '2011-03-14T05:50:56.403353Z'
	login-session-id = '1'
Session1:
	unix-user = '1000'
	realname = '(null)'
	seat = 'Seat2'
	session-type = ''
	active = FALSE
	x11-display = ':0.0'
	x11-display-device = ''
	display-device = ''
	remote-host-name = ''
	is-local = TRUE
	on-since = '2011-03-14T05:50:56.177323Z'
	login-session-id = '1'

If you see something similar to the above, you're in business. The key item is the active line.