Author Topic: vsido-exit (systemd based logout script for VSIDO)  (Read 7563 times)

hakerdefo

  • Posts: 520
    • View Profile
    • Looking at Linux through the Windows of Life
vsido-exit (systemd based logout script for VSIDO)
« on: January 29, 2017, 01:37:09 PM »

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,
Code: [Select]
medit ~/.fluxbox/init

And change the following line,
Code: [Select]
session.screen0.allowRemoteActions: false

To,
Code: [Select]
session.screen0.allowRemoteActions: true

Save the file. Logout and login or restart fluxbox.

Add an extra package if it's not installed,
Code: [Select]
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,
Code: [Select]
sudo cp vsido-exit /usr/local/bin/
Code: [Select]
sudo chmod 755 /usr/local/bin/vsido-exit
Code: [Select]
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

  • Posts: 1987
    • View Profile
Re: vsido-exit (systemd based logout script for VSIDO)
« Reply #1 on: January 29, 2017, 05:09:48 PM »
Code: [Select]
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.

Code: [Select]
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

  • Posts: 520
    • View Profile
    • Looking at Linux through the Windows of Life
Re: vsido-exit (systemd based logout script for VSIDO)
« Reply #2 on: January 29, 2017, 06:49:53 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

  • Posts: 1987
    • View Profile
Re: vsido-exit (systemd based logout script for VSIDO)
« Reply #3 on: January 29, 2017, 07:39:50 PM »
Everything works on my system.

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

  • Posts: 520
    • View Profile
    • Looking at Linux through the Windows of Life
Re: vsido-exit (systemd based logout script for VSIDO)
« Reply #4 on: January 29, 2017, 07:45:53 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

  • Posts: 1987
    • View Profile
Re: vsido-exit (systemd based logout script for VSIDO)
« Reply #5 on: January 29, 2017, 09:09:40 PM »
^ 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

  •      v-ger
  • Posts: 3964
    • View Profile
    • VSIDO Community
Re: vsido-exit (systemd based logout script for VSIDO)
« Reply #6 on: January 29, 2017, 11:34:16 PM »
CAN WE PLEASE NOT USE PM TO DISCUSS TECH ANSWERS and SOLUTIONS!!!!!

Too many people miss out!
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 3964
    • View Profile
    • VSIDO Community
Re: vsido-exit (systemd based logout script for VSIDO)
« Reply #7 on: January 29, 2017, 11:51:48 PM »
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 Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 3964
    • View Profile
    • VSIDO Community
Re: vsido-exit (systemd based logout script for VSIDO)
« Reply #8 on: January 29, 2017, 11:58:39 PM »
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 Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

PackRat

  • Posts: 1987
    • View Profile
Re: vsido-exit (systemd based logout script for VSIDO)
« Reply #9 on: January 30, 2017, 12:49:34 AM »
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

  • Posts: 475
    • View Profile
Re: vsido-exit (systemd based logout script for VSIDO)
« Reply #10 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.

PackRat

  • Posts: 1987
    • View Profile
Re: vsido-exit (systemd based logout script for VSIDO)
« Reply #11 on: January 30, 2017, 01:45:31 PM »
Everything works on my system.
That's great!
Now RatMan please check-out your VSIDO forum inbox. Need your help :)
Cheers!!!

Code: [Select]
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:

Code: [Select]
loginctl terminate-session $output
terminates the X-session and returns to lightdm login screen; I can log back in.

running:

Code: [Select]
loginctl terminate-session "$XDG_SESSION_ID"
termintes the X-session and returns to lightdm login screen; I can log back in.

running:

Code: [Select]
systemctl --user exit
gives the error message:

Code: [Select]
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

  • Posts: 520
    • View Profile
    • Looking at Linux through the Windows of Life
Re: vsido-exit (systemd based logout script for VSIDO)
« Reply #12 on: January 30, 2017, 03:20:33 PM »
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.

Code: [Select]
sudo cp vsido-exit /usr/local/bin/
Code: [Select]
sudo chmod 755 /usr/local/bin/vsido-exit

Code: [Select]
sudo cp vs-session-manager.desktop /usr/share/applications/

Code: [Select]
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

  •      v-ger
  • Posts: 3964
    • View Profile
    • VSIDO Community
Re: vsido-exit (systemd based logout script for VSIDO)
« Reply #13 on: January 30, 2017, 03:36:30 PM »
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 Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 3964
    • View Profile
    • VSIDO Community
Re: vsido-exit (systemd based logout script for VSIDO)
« Reply #14 on: January 30, 2017, 03:37:18 PM »
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 Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO