how to run root cmds when starting xorg?

Kirk Strauser kirk at
Tue Feb 27 14:30:32 UTC 2007

On Saturday 24 February 2007 17:24, deeptech71 at wrote:
> how do i exec a kldload script when starting ttyv8 kdm (or xorg) ?

Another idea not yet mentioned is to create two wrapper scripts like so:

$ cat /usr/local/bin/loadsound
kldload whatever.ko
$ cat /usr/local/bin/unloadsound
kldunload whatever.ko

and the install sudo and configure it to give your user the ability to run 
those two commands without entering your password.  Finally, add "sudo 
loadsound" and "sudo unloadsound" to your startup and exit scripts.
Kirk Strauser
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list