logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).

#1 05-11-2016 14:59:37

dz50
Adhérent(e)
Lieu : Ain
Distrib. : Debian GNU/Linux 12
Noyau : 6.1.0-6-amd64
(G)UI : Xfce 4.18
Inscription : 13-07-2016

[Résolu] Mise en mode veille par une touche clavier.

Bonjour,
J'ai un clavier avec une touche prévue pour la mise en veille du PC.
Pour l'utiliser, je dois l'ajouter dans les raccourcis clavier, mais avec quelle commande ?

Dernière modification par dz50 (05-11-2016 16:10:21)

Hors ligne

#2 05-11-2016 15:08:53

otyugh
CA Debian-Facile
Lieu : Quimperlé/Arzano
Distrib. : Debian Stable
Inscription : 20-09-2016
Site Web

Re : [Résolu] Mise en mode veille par une touche clavier.

Réponse courte : "xfce4-session-logout --suspend"

Réponse longue :

$ man xfce4-session-logout


xfce4-session-logout(1)     General Commands Manual    xfce4-session-logout(1)
NAME
       xfce4-session-logout - Logs out from Xfce

SYNOPSIS
       xfce4-session-logout

DESCRIPTION
       This manual page documents briefly the xfce4-session-logout command.

       The  xfce4-session-logout command allows you to programmatically logout
       from your Xfce session. It requests the session manager to display  the
       logout  confirmation  screen,  or,  if  given  one  of the command-line
       options below, causes the session manager to take the requested  action
       immediately.

OPTIONS
       xfce4-session-logout takes the following command line options:

       --logout
              Log out without displaying the logout dialog.

       --halt Halt without displaing the logout dialog.

       --reboot
              Reboot without displaying the logout dialog.

       --suspend
              Suspend without displaying the logout dialog.

       --hibernate
              Hibernate without displaying the logout dialog.

       --fast Do  a  fast shutdown.  This instructs the session manager not to
              save the session, but instead to quit everything quickly.



Cela dit ça peut être assez abrupt. Ptéte que tu pourrais lancer un "voulez vous vraiment ?" ? C'est très simple si t'es tenté :
$ zenity --question --text "Voulez vous vraiment suspendre le PC ?" &&  xfce4-session-logout --suspend

Dernière modification par otyugh (05-11-2016 15:13:07)


virtue_signaling.pngpalestine.png
~1821942.svg

Hors ligne

#3 05-11-2016 16:09:39

dz50
Adhérent(e)
Lieu : Ain
Distrib. : Debian GNU/Linux 12
Noyau : 6.1.0-6-amd64
(G)UI : Xfce 4.18
Inscription : 13-07-2016

Re : [Résolu] Mise en mode veille par une touche clavier.

La réponse courte, c'est bien ça.
Merci.

Hors ligne

Pied de page des forums