how to run root cmds when starting xorg?

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


On Saturday 24 February 2007 17:24, deeptech71 at gmail.com 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
#!/bin/sh
kldload whatever.ko
$ cat /usr/local/bin/unloadsound
#!/bin/sh
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 : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20070227/9b5d82d7/attachment.pgp


More information about the freebsd-questions mailing list