The i3 FAQ has migrated to All content here is read-only.
Ask Your Question

i3exit script doesn't work

asked 2013-11-05 06:20:40 +0000

anonymous user


First of all, thank you for i3. I am really enjoying it.

To shutdown/lock/suspend, I have this script:


case "$1" in
        i3lock -c 000000
        i3-msg exit
        sudo pm-suspend | i3lock -c 000000
        sudo pm-hibernate
        sudo reboot
        sudo poweroff
        echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}"
        exit 2

exit 0

Then in my .i3/config, I added these lines:

set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
    bindsym l exec --no-startup-id i3exit lock, mode "default"
    bindsym e exec --no-startup-id i3exit logout, mode "default"
    bindsym s exec --no-startup-id i3exit suspend, mode "default"
    bindsym h exec --no-startup-id i3exit hibernate, mode "default"
    bindsym r exec --no-startup-id i3exit reboot, mode "default"
    bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"

    # back to normal: Enter or Escape
    bindsym Return mode "default"
    bindsym Escape mode "default"
bindsym $mod+End mode "$mode_system"

Here is the issue: if I just call i3exit lock, it will lock the screen. If I press the combination above to call $mode, I am shown the menu but when I choose any of the options (lock, suspend), nothing happens. The menu goes away but nothing else happens.

i3exit is executable and in $PATH. How do I debug this issue? Also note that it was working fine before but wierdly it stopped working. I don't recall having done anything special.

edit retag flag offensive close merge delete


Tried diagnosing it. The error that is thrown up is: `/bin/bash: i3exit: command not found`. But on running `i3exit` from anywhere, it is found.

mneywn gravatar imagemneywn ( 2013-11-05 06:41:58 +0000 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2013-11-05 06:51:27 +0000

Flugsio gravatar image

updated 2013-11-05 06:52:30 +0000

I suspect your path is not set for i3. Easy solution is to change i3exit with its full path.

Setting path depends on how you start i3, debug with this:

bindsym $mod+Shift+i exec --no-startup-id echo $PATH >> .i3_debug

This post have a solution for lightdm and a fancier way to debug the path,

edit flag offensive delete link more


Thanks, giving the full path worked.

mneywn gravatar imagemneywn ( 2013-11-05 13:04:33 +0000 )edit

Question Tools

1 follower


Asked: 2013-11-05 06:20:40 +0000

Seen: 1,643 times

Last updated: Nov 05 '13