Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[easy shutdown] dans le menu de fluxbox [RESOLU]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
pathfinder
l33t
l33t


Joined: 19 Jan 2006
Posts: 731
Location: Barcelona, Spain

PostPosted: Mon Apr 10, 2006 9:04 pm    Post subject: [easy shutdown] dans le menu de fluxbox [RESOLU] Reply with quote

salut a tous,

et bonnes vacances a ceux qui le sont deja!!!!
la petition est la suivante: depuis fluxbox, j aimerais pouvoir eteindre le PC avec un truc qui apparait dans le menu

pour le moment, ce que j ai fait est un alias pourri a un terminal qui fait sudo shutdown now et je dois rentrer mon password pour que ca s eteigne

je veux pas d icones sur mon bureau
alors je m etais dit que rajouter dans le menu de fluxbox .fluxbox/menu une entree pour qu il fasse ceci totomatiquement sans besoin de password (je suis dans le groupe wheel amis il me demande pourtant le password)

ou encore mieux:
dans .fluxbox/keys j aimerais lui dire que si j appuie sur CTRL ALT DEL ou plutot les touches Pause Escape Fleche de droite et Fn (les 4 qu il y a sur les extremites de mon clavier) il eteigne le PC sans demander de mot de passe...

c est galere a faire ca?
Pause est reconnu par fluxbox keys
None aussi
Print aussi
mais je sais pas pour la fleche ni pour la touche Fn et je sais encore moins comment dire les 4 en meme temps...

voila mon fluxbox keys pour vous faire une idee:
Quote:
Mod1 F2 :Workspace 2
Mod1 F3 :Workspace 3
Mod1 F4 :Workspace 4
Mod1 F5 :Workspace 5
Mod1 F6 :Workspace 6
Mod1 F7 :Workspace 7
Mod1 F8 :Workspace 8
Mod1 F9 :Workspace 9
Mod1 F10 :Workspace 10
Mod1 F11 :Workspace 11
Mod1 F12 :Workspace 12

Mod1 t :ExecCommand xterm


# locks X11 display to the current user
Mod4 Escape :ExecCommand xlock

Mod1 x :ExecCommand xmms
# when xmms is active, x plays file. => Alt x x plays files
None F3 :ExecCommand aumix -v 0
None F9 :ExecCommand aumix -v +5
None F8 :ExecCommand aumix -v -5
Mod4 F9 :ExecCommand xmms --fwd
Mod4 F8 :ExecCommand xmms --rew


# This launches fbrun, which in turn launches other programs
#Mod1 r :ExecCommand fbrun

# Program Control. It just makes life simpler...
Mod1 r :ExecCommand rox
Mod1 p: ExecCommand xterm -e sudo poweroff
Mod1 f :ExecCommand firefox http://www.lavanguardia.es
Mod1 m :ExecCommand xterm -e /usr/local/matlab7/bin/matlab &
#Mod1 s :ExecCommand sunbird -calendar
Mod1 s :ExecCommand skype &
Mod1 g :ExecCommand /usr/local/lib/gid-7.7.2b-dyn/gid &
Mod1 b :ExecCommand bluefish
Mod1 v :ExecCommand gvim

Mod1 Escape :ExecCommand xterm -e xset dpms force off &
None F3 :ExecCommand aumix -v 0
None F9 :ExecCommand aumix -v +5
None F8 :ExecCommand aumix -v -5
Mod4 F9 :ExecCommand xmms --fwd
Mod4 F8 :ExecCommand xmms --rew

None Pause :ExecCommand firefox http://www.gmail.com
None Print :ExecCommand import -window root '%Y-%m-%d_$wx$h.png'; xmessage 'snapshot done'

#Mod1 e :exit
Mod1 c :Close


j espere avoir ete clair...

meci a tous!


Last edited by pathfinder on Wed Apr 12, 2006 12:44 am; edited 1 time in total
Back to top
View user's profile Send private message
geekounet
Bodhisattva
Bodhisattva


Joined: 11 Oct 2004
Posts: 3772
Location: Wellington, Aotearoa

PostPosted: Mon Apr 10, 2006 9:09 pm    Post subject: Reply with quote

Pour ne plus avoir la demande de mot de passe, met dans ton /etc/sudoers :
Code:
ton_user  ALL=(ALL)       NOPASSWD: ALL

On peut restreindre les droits à shutdown, mais je ne sais pas faire ...

[EDIT] : wahou j'ai grillé un veteran !! :D


Last edited by geekounet on Mon Apr 10, 2006 9:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
scout
Veteran
Veteran


Joined: 08 Mar 2003
Posts: 1991
Location: France, Paris en Semaine / Metz le W-E

PostPosted: Mon Apr 10, 2006 9:12 pm    Post subject: Reply with quote

tu met NOPASSWD dans ton fichier sudoers et sudo ne demandera plus de mot de passe
man sudoers wrote:
By default, sudo requires that a user authenticate him or herself before running a command. This behavior can be modified via the NOPASSWD tag. Like
a Runas_Spec, the NOPASSWD tag sets a default for the commands that follow it in the Cmnd_Spec_List. Conversely, the PASSWD tag can be used to
reverse things. For example:

ray rushmore = NOPASSWD: /bin/kill, /bin/ls, /usr/bin/lprm

would allow the user ray to run /bin/kill, /bin/ls, and /usr/bin/lprm as root on the machine rushmore as root without authenticating himself. If we
only want ray to be able to run /bin/kill without a password the entry would be:

ray rushmore = NOPASSWD: /bin/kill, PASSWD: /bin/ls, /usr/bin/lprm

[EDIT]grillé :(
_________________
http://petition.eurolinux.org/ - Petition against ePatents
L'essence de la finesse
Back to top
View user's profile Send private message
bibi.skuk
Guru
Guru


Joined: 01 Aug 2005
Posts: 425

PostPosted: Mon Apr 10, 2006 9:21 pm    Post subject: Reply with quote

ou alors tu peut aussi utiliser gksudo qui est une interface a sudo en mode graphique... "gksudo halt" et tu aura une boite de dialogue graphique pour mettre ton mot de passe...
Back to top
View user's profile Send private message
yoyo
Bodhisattva
Bodhisattva


Joined: 04 Mar 2003
Posts: 4273
Location: Lyon - France

PostPosted: Tue Apr 11, 2006 7:23 am    Post subject: Reply with quote

Ou mieux encore, utiliser le support acpi et le démon acpid pour éteindre ton ordi d'une pression sur le bouton "power" de ta machine (feignasse inside ® ). :roll:

Enjoy !
_________________
La connaissance s'accroît quand on la partage.
JCB
Back to top
View user's profile Send private message
pathfinder
l33t
l33t


Joined: 19 Jan 2006
Posts: 731
Location: Barcelona, Spain

PostPosted: Wed Apr 12, 2006 12:48 am    Post subject: Reply with quote

YOYO!!

trop malin

ou moi trop bete


j en avais meme oublie la touche Power


ACPI etait habilite
emerge acpid
et Hop ca ruuuule
j ai une zolie extinction qd on appuie sur Power.
Merci.
j ai pas regarde le how to plus en detail, vu que j ai pas de batterie sur mon portable (HS) elle devrait arriver dans un bon mois (tic, tac), alorspas pour le moment.
je m occuperai du suspend2resume plsu tard
maintenant j attaque le Frame Buffer console. (reste juste un petit probleme a regler, je sais jamais si j utilise VESA ou VESA-TNG, je suppose que VESA puisque la machine a 5 ans...)

Merci a tous!!
pour sudoers, ca marchait aussi!!!
c est coool
_________________
Cuando un tonto coge un camino, el camino se acaba, pero el tonto sigue
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum