You are not logged in.
Good day!
I would like to use this exit script for both the lxsession logout and a fluxbox logout. This means executing the separate commands to logout.
You will see what I am trying to do in the third line down. But, as usual.
#!/bin/bash
yad --form --title="Options" --window-icon=/usr/share/icons/ld-icons/exit.png --width=165 --borders=8 --height=365 --skip-taskbar --image=/usr/share/icons/ld-icons/pixmaps/Logout.png --image-on-top --center \
--field=" Lock Screen!/usr/share/icons/ld-icons/pixmaps/slock.png!Lock Screen":fbtn "slock" \
--field=" Log Out!/usr/share/icons/ld-icons/pixmaps/logout_exit.png!Log Out":fbtn "fluxbox-remote exit && pkill -SIGTERM -f lxsession" \
--field=" Suspend!/usr/share/icons/ld-icons/pixmaps/logout_suspend.png!Suspend":fbtn "systemctl suspend" \
--field=" Reboot!/usr/share/icons/ld-icons/pixmaps/logout_reboot.png!Restart":fbtn "systemctl reboot" \
--field=" Shut Down!/usr/share/icons/ld-icons/pixmaps/logout_shutdown.png!Shut Down":fbtn "systemctl poweroff" \
--button=gtk-cancel \
Last edited by sleekmason (2020-12-06 23:42:24)
Online
How about using a session test first, then
if fluxbox then run a fluxbox yad dialog
elif lxsession then run a lxsession dialog
fi
For the test I think you can do something like
pgrep -x "$window_manager"
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
How about using a session test first, then
if fluxbox then run a fluxbox yad dialog elif lxsession then run a lxsession dialog fi
For the test I think you can do something like
pgrep -x "$window_manager"
Sorry, But I do not understand where to put these commands.
Online
Assuming you mean a separate script to find the window manager then execute the right yad exit dialog?
but
pgrep -x "$window_manager"
in a terminal doesn't show anything.
edit* Yeah, no. I'm lost.
Last edited by sleekmason (2020-12-06 23:16:30)
Online
Maybe a generic code that works?
loginctl terminate-user $USER
This kinda does.
Removes decorations, thens sits for a minute or two until without warning, logs out. Maybe a better one?
Online
Assuming you mean a separate script to find the window manager then execute the right yad exit dialog?
but
pgrep -x "$window_manager"
in a terminal doesn't show anything.
edit* Yeah, no. I'm lost.
Maybe I should have explicitly said that it was pseudocode
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline