[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: halt pour tout les utilisateurs



Le 07.09.02, Rodolphe Pelloux-Prayer a tapoté :

| bonjour,

	Bonjour.


| la question est dans le sujet !

	GRMBL !


| pour être plus précis, je voudrais pouvoir éteindre le pc à partir de
| wdm et de préférence sans avoir à entrer un
| login

	Dans /etc/X11/xdm/Xsetup_0 :
/usr/bin/wish <<EOF &
wm geometry . -0-0
button .halt   -text Arrêt   -font 7x13 -fg ${COLOR} -bg black \
 -highlightcolor black -high \
lightbackground DeepSkyBlue -borderwidth 0 -activeforeground black \
-activebackground ${COLOR} -command {exec shutdown -h now}
button .reboot -text Reboot  -font 7x13 -fg ${COLOR} -bg black \
-highlightcolor black -high \
lightbackground DeepSkyBlue -borderwidth 0 -activeforeground black \
-activebackground ${COLOR} -command {exec shutdown -r now}
pack .reboot .halt -side left
EOF
echo $! > /var/run/xdmbuttons.pid

	Et dans /etc/X11/xdm/Xstartup_0
kill `cat /var/run/xdmbuttons.pid`
rm /var/run/xdmbuttons.pid


	Sachant qu'il faut avoir installé tcl/tk.



| merci

	Avec plaisir.


Thomas
-- 
NON-FLAMMABLE, IS NOT A CHALLENGE
NON-FLAMMABLE, IS NOT A CHALLENGE
NON-FLAMMABLE, IS NOT A CHALLENGE
-+- Bart Simpson on chalkboard in episode BABF13



Reply to: