vsido-exit (systemd based logout script for VSIDO)

hakerdefo



Edit Begins - 10-02-2017

Development continues on GitHub. For always up-to-date version of this (now known as lepo-logout) visit the GitHub page,

lepo-logout on GitHub

Cheers!!!

Edit Ends - 10-02-2017



First VSIDO's default "~/.fluxbox/init" will need a slight modification,
Open it,

medit ~/.fluxbox/init


And change the following line,

session.screen0.allowRemoteActions: false


To,

session.screen0.allowRemoteActions: true


Save the file. Logout and login or restart fluxbox.

Add an extra package if it's not installed,

sudo apt-get install hicolor-icon-theme


Next Download the attached exit-vsido.tar.gz archive. Extract the contents of archive into a directory and open that directory in terminal-emulator and run the following commands,

sudo cp vsido-exit /usr/local/bin/


sudo chmod 755 /usr/local/bin/vsido-exit


sudo cp logout_exit.png logout_logo.png logout_reboot.png logout_shutdown.png logout_suspend.png logout_window.png /usr/share/pixmaps/


Add a menu entry for vsido-exit. Test it  :)

Cheers!!!
You Can't Always Git What You Want

PackRat

#1
sudo cp vsido-exit /usr/local/bin/

Probably want to give it a different name, and/or back up the original vsido-exit in case this script has some bugs.

fluxbox-remote exit

The "Logout" option will only work with fluxbox, something like "pkill x" will be window-manager agnostic.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

hakerdefo

Quote from: PackRat on January 29, 2017, 05:09:48 PM...The "Logout" option will only work with fluxbox...
If a user adds extra DE or WM then it becomes his-her task to know howto logout of that DE-WM.
If we want to do that then we will require a session-manager to be installed and that would mean extra dependencies and complications.
And "vsido-exit" won't even be visible in other DE-WM. Remember it's a menu item visible only in Fluxbox menu ;)
And you can't manage beforehand what a user might decide do with his-her VSIDO install. We should only care about Fluxbox and other VSIDO defaults.
Just my two cents :)
You Can't Always Git What You Want

PackRat

I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

hakerdefo

Quote from: PackRat on January 29, 2017, 07:39:50 PM
Everything works on my system.
That's great!
Now RatMan please check-out your VSIDO forum inbox. Need your help :)
Cheers!!!
You Can't Always Git What You Want

PackRat

#5
^ I saw that. Can get to it tomorrow.

One other item. The "Suspend" worked, but I could just resume (this is a desktop, not a laptop) when I hit "Enter". Can that command be set up to prompt for user password?

I just changed the command to "slock" (part of the suckless-tools) in the script and that worked - but obviously not suspend, some added security for those that want it.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

VastOne

CAN WE PLEASE NOT USE PM TO DISCUSS TECH ANSWERS and SOLUTIONS!!!!!

Too many people miss out!
VSIDO      VSIDO Change Blog    

    I dev VSIDO

VastOne

Have not tested functionality yet... only a look at how it looks

The first image is what hakerdefo created .. the logo you see is not centered



This is the image I prefer to be the logo image.. this really shows the image is not centered



Stellar work as usual hakerdefo... you and RatMan are certainly working out the technical side

pmss delivered scrots!
VSIDO      VSIDO Change Blog    

    I dev VSIDO

VastOne

I have tested everything except suspend and it all works perfectly..

Great Work!

As soon as the image centering is fixed and confirmation on suspend works I will add this as the new logout / exit script in VSIDO
VSIDO      VSIDO Change Blog    

    I dev VSIDO

PackRat

#9
Quote from: VastOne on January 29, 2017, 11:58:39 PM
As soon as the image centering is fixed and confirmation on suspend works I will add this as the new logout / exit script in VSIDO

I think the suspend is working. The monitor blanks and loses signal. Not sure if there is an actual powerdown of the computer. Someone with VSIDO on a laptop can confirm that.

As far as having the user issue their password to resume, the proper sysremd way to do that may be to write suspend.service and resume.service files - Arch Wiki systemd power management.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

Snap

#10
Huh, the exit script is significantly smaller than the usual ck/python version. Good job, hackerdefo. It's nice when you see small scripts doing big jobs.

BTW; hicolor is in the default Vsido-lite packages (at least in the 24jan2017 test iso), so nothing extra to install.

PackRat

Quote from: hakerdefo on January 29, 2017, 07:45:53 PM
Quote from: PackRat on January 29, 2017, 07:39:50 PM
Everything works on my system.
That's great!
Now RatMan please check-out your VSIDO forum inbox. Need your help :)
Cheers!!!

loginctl session-status | head -n 1 | awk '{print $1}'


gives a number - which changes with each log in (7, 12)

plugging the number into $output of:

loginctl terminate-session $output

terminates the X-session and returns to lightdm login screen; I can log back in.

running:

loginctl terminate-session "$XDG_SESSION_ID"

termintes the X-session and returns to lightdm login screen; I can log back in.

running:

systemctl --user exit

gives the error message:

Failed to start exit.target: Process org.freedesktop.systemd1 exited with status 1
See user logs and 'systemctl --user status exit.target' for details.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

hakerdefo

#12
vsido-exit V2 is here. Thanks PackRat for inspiring me to write a DE-WM agnostic logout option. You are the man my friend  8)
Hopefully this will resolve the image scaling problem mentioned by VastOne  :)
Here are the steps to install this thing.
First download the attached exit-vsido.tar.gz archive.
Next extract the contents into a directory.
Now open that directory in a terminal-emulator. And run the following commands.


sudo cp vsido-exit /usr/local/bin/


sudo chmod 755 /usr/local/bin/vsido-exit



sudo cp vs-session-manager.desktop /usr/share/applications/



sudo cp logout_exit.png logout_logo.png logout_reboot.png logout_shutdown.png logout_suspend.png logout_window.png vs-session-manager.png /usr/share/pixmaps/


You can manually add an entry for "vsido-exit" in Fluxbox menu.
It will also autometically show as "vs-session-manager" in the main menu of any other freedesktop.org compliant DE or WM.

Test It. Feedback welcome  8)

Cheers!!!
You Can't Always Git What You Want

VastOne

It was not about scale, it was about centering ... it can be smaller for sure and it still did not center





For everything else it looks great

VSIDO      VSIDO Change Blog    

    I dev VSIDO

VastOne

Quote from: Snap on January 30, 2017, 08:51:05 AM
Huh, the exit script is significantly smaller than the usual ck/python version. Good job, hackerdefo. It's nice when you see small scripts doing big jobs.

BTW; hicolor is in the default Vsido-lite packages (at least in the 24jan2017 test iso), so nothing extra to install.


Yes snap you are correct... hicolor is a default in VSIDO
VSIDO      VSIDO Change Blog    

    I dev VSIDO