bindsym q physlock -d && sudo systemctl hibernate does not work?

asked 2015-08-10 21:40:45 +0000

mindstormer gravatar image

updated 2015-08-11 07:50:18 +0000

Adaephon gravatar image

I'm very new to Linux and I'm not sure why "physlock -d && systemctl hibernate" is not working (session will lock, but it will not hibernate). Basically, I want to press a button and then it will lock the session before hibernating it (if I were to just hibernate, then a password would not be prompted when returning to the session, leaving my session exposed).

edit retag flag offensive close merge delete

Comments

The problem is likely that the sudo command requires your password and hence doesn't execute. Allow passwordless hibernate and then it should work, providing physlock forks.

Airblader gravatar imageAirblader ( 2015-08-11 06:35:04 +0000 )edit

Please post only one question at once, especially if they are not related. Also, as the second question was off-topic, I removed it. The answer is to use `command` in order to use the binary not the other alias: `alias l='command ls -hlsZ --color=auto` and `alias ls=`command ls -ahlsZ --color=auto`.

Adaephon gravatar imageAdaephon ( 2015-08-11 07:50:04 +0000 )edit

As for the main question: Please post the actual line(s) from your configuration (in the title at least an `exec` is missing) and binding to just "q" is not a good idea unless you are using it inside a mode.

Adaephon gravatar imageAdaephon ( 2015-08-11 09:21:59 +0000 )edit