VSIDO Community

VSIDO Support => General Support => Topic started by: Snap on September 21, 2015, 06:33:27 PM

Title: vsido-exit stopped working - partially
Post by: Snap on September 21, 2015, 06:33:27 PM
After last update, a quite big one since I wasn't dist-upgrading regularly due to my recent HD problems, vsido-exit is not fully working. Only logout works. Not reboot or power off. I suspect of lightdm. Got an update and I found surprising that it doesn't autologin or selects my username as it should. The user field is blank. Then found this about the exit. Anyone else or it's only here?
Title: Re: vsido-exit stopped working - partially
Post by: zephyr on September 21, 2015, 09:13:16 PM
@Snap: My VSIDO install too, can't login.  Has all the issues that you commented on. I guess it's is the d-u that broke the camels back. Didn't see a lightdm update with the d-u, might have missed it. 

Other sid distro installs not effected with the d-u.


Cheers
zephyr
Title: Re: vsido-exit stopped working - partially
Post by: VastOne on September 22, 2015, 01:39:25 AM
Did either of you choose to allow for the new lightdm config file or choose to keep your old one?

I am not seeing this issue but I always retain my config when there is a new lightdm update
Title: Re: vsido-exit stopped working - partially
Post by: VastOne on September 22, 2015, 01:49:08 AM
...Also, I am not seeing the issues with rebooting, logging out or powering off with vsido-exit and the login is the same in lightdm at the start (login name is there and works)
Title: Re: vsido-exit stopped working - partially
Post by: jedi on September 22, 2015, 02:01:23 AM
Been updating regularly.  There was a lightdm update a couple of weeks ago.  I am having no issues exiting, rebooting, or powering off. 
Title: Re: vsido-exit stopped working - partially
Post by: zephyr on September 22, 2015, 03:04:41 AM
@VastOne & jedi: Remember the last lightdm update in the same time frame as you and opt for the keeping the old. I don't remember seeing lightdm at all on this update. I think it is something else but not sure what to attribute it to. When I booted up, had ugly lightdm and user name not present, would not accept my password. Have been using VSIDO daily and d-u about twice daily, and everything has been going quite smoothly, until the last one. So, it wasn't like it was a large catchup d-u.

Cheers
Zephyr
Title: Re: vsido-exit stopped working - partially
Post by: jedi on September 22, 2015, 03:36:56 AM
Quote from: zephyr on September 22, 2015, 03:04:41 AM
@VastOne & jedi: Remember the last lightdm update in the same time frame as you and opt for the keeping the old. I don't remember seeing lightdm at all on this update.

Hey zephyr, I may have misspoke about the timeframe of my last d-u.  It may have been a couple of days ago.  I have family visiting from MO. and haven't been as active "computer-wise" as I'd like to be.  There was definitely an update within the last couple weeks, and I'm showing another one tonight as shown below.  After the d-u, all was still in great working order!

(http://en.zimagez.com/miniature/09212015a.jpg) (http://en.zimagez.com/zimage/09212015a.php)

Me keeping the lightdm.conf file as is...

(http://en.zimagez.com/miniature/09212015b.jpg) (http://en.zimagez.com/zimage/09212015b.php)

And also a quick note, there was a dbus-daemon update tonight as well?  Probably has nothing to do with anything.  Anyway, a couple of reboots and a total power-off later and I'm still able to use the vsido-exit menu feature just fine.  Including logout...

(http://en.zimagez.com/miniature/09212015c.jpg) (http://en.zimagez.com/zimage/09212015c.php)

To fix the lightdm issue your having, open as root the /etc/lightdm/lightdm.conf and scroll down to the [SeatDefaults] section of the .conf file and uncomment the line that says greeter-hide-users=false
making sure it says false.  This will cause lightdm to remember the username that logged in the last time so all you'll have to do on the next boot is to type in your password.
To change the background, as root, in /etc/lightdm/lightdm-gtk-greeter.conf scroll down to the [greeter] section and uncomment the background or user-background (I can't remember, it is one or both of them anyway) and you can point to any image at any location as long as the image has "read" permission for "Others".
You should then be good to go!
Title: Re: vsido-exit stopped working - partially
Post by: zephyr on September 22, 2015, 04:24:26 AM
@jedi: Thanks for the info, have already prepared another drive for install because I was going to blame another Seagate 1 Tb drive for the misfortune. I ran into that early this year and really a bad hd can cause strange issues.  Thanks



Cheers
zephyr
Title: Re: vsido-exit stopped working - partially
Post by: Snap on September 22, 2015, 06:24:02 AM
Did either of you choose to allow for the new lightdm config file or choose to keep your old one?


Yup, I guess this is it. I think I chose y. Gotta poke those configs....
Thanks, boss.
Title: Re: vsido-exit stopped working - partially
Post by: Snap on September 22, 2015, 06:38:13 AM
have already prepared another drive for install because I was going to blame another Seagate 1 Tb drive for the misfortune. I ran into that early this year and really a bad hd can cause strange issues.

Huh, I'm afraid of my main Seagate 1 TB disk too. I'm hearing noises I never heard before, but maybe it's only this computer is finally silent. You cannot hear it. The old GPU fan spinning like crazy didn't alowed me to hear the disks or anything else. Cross my fingers.  ::)

HDs are not what they used to be. I haven't had a single HD failure from the day one I started using my very first PowerMac 7200 until five years ago or thereabouts (and about twenty different rigs). From that point I saw at least an HD dying per year. Usually more than one. It's not related with brands or price tags. Quality has dropped globally, IMHO. I still have a nice lot of old IDE drives for my Alesis HD24 hard disk recorder that keep working flawlesly. Some are about 10 years old. I cannot imagine current disks living that long.
Title: Re: vsido-exit stopped working - partially
Post by: Snap on September 22, 2015, 06:51:43 AM
Back on topic. I didn't noticed there was a dbus upgrade too. That makes more sense borking the exit than lightdm. I guess I hit Y too... gotta check that dbus too.
Title: Re: vsido-exit stopped working - partially
Post by: lwfitz on September 24, 2015, 05:11:13 AM
Quote from: VastOne on September 22, 2015, 01:39:25 AM
Did either of you choose to allow for the new lightdm config file or choose to keep your old one?

I am not seeing this issue but I always retain my config when there is a new lightdm update

You hit it right on the nose. The new config has issues and is the cause. I had this on my old install but when I reinstalled I chose to keep my config during the upgrade and all is good again
Title: Re: vsido-exit stopped working - partially
Post by: Snap on September 29, 2015, 12:12:46 PM
Busy with other things but finally trying to get over this issue. It seems that the new dbus upgrade is setup to work with systmed-logind instead of consolekit (as per vsido defaults). I guess this is what made vsido-exit stop working. This script asks dbus to call consolekit for shutdown and reboot, but consolekit is not running. systemd-logind is now managing the session. The script must be edited for the new conditions (need to find the right commands yet) or try to revert back to consolekit for the session management.

One question just for curiosity, Why vsido keeps using consolekit intead of systemd-logind? And before changing all these settings, any relevant reason to keep going with consolekit?

I made a dirty provisional workaround for this problem. I enabled my user in /etc/sudoers to shutdown and reboot without a password and then repaced the relevant vsido-exit lines for sudo reboot and sudo shutdown -h now.
Title: Re: vsido-exit stopped working - partially
Post by: PackRat on September 29, 2015, 02:32:07 PM
You can give this a try this for now; I edited an exit script from the BunsenLabs distro and made it window manager agnostic - uses systemd commands.

#!/usr/bin/env python
#
# Adapted from the original cb-exit script by <corenominal>
#
# Changed to support for systemd
# Added an Openbox --reconfigure option
#
########################################################################
# If you want a shutdown sound then uncomment and edit line 71
#
# If you want the dialog undecorated by Openbox, the add the following lines to the
# <applications> section in rc.xml
#
# <application class="Bl-exit" name="bl-exit" type="normal">
#          <decor>no</decor>
#          <focus>yes</focus>
#          <layer>normal</layer>
# </application>
#
########################################################################
#
# <damo>  February 2015
#
########################################################################

import pygtk
pygtk.require('2.0')
import gtk
import os
import getpass

class bl_exit:
def disable_buttons(self):
self.cancel.set_sensitive(False)
self.logout.set_sensitive(False)
# self.reconfigure.set_sensitive(False)
self.suspend.set_sensitive(False)
self.reboot.set_sensitive(False)
self.shutdown.set_sensitive(False)

def cancel_action(self,btn):
self.disable_buttons()
gtk.main_quit()

# def logout_action(self,btn):
# self.disable_buttons()
# self.status.set_label("Exiting Openbox, please standby...")
# os.system("openbox --exit")

# def reconfigure_action(self,btn):
# self.disable_buttons()
# os.system("openbox --reconfigure")
# gtk.main_quit()

def logout_action(self,btn):
self.disable_buttons()
for line in os.popen("wmctrl -m"):
parts = line.split()
if parts[0] == "Name:":
wmName = parts[1].lower()
self.status.set_label("Exiting " + wmName + ", please standby...")
os.system("killall " + wmName)
       
def suspend_action(self,btn):
self.disable_buttons()
self.status.set_label("Suspending, please standby...")
os.system("cb-lock")
os.system("systemctl suspend")
gtk.main_quit()

def reboot_action(self,btn):
self.disable_buttons()
self.status.set_label("Rebooting, please standby...")
os.system("systemctl reboot")

def shutdown_action(self,btn):
self.disable_buttons()
self.status.set_label("Shutting down, please standby...")
# add shutdown sound here
#os.system("aplay /path/to/exit.wav")
os.system("systemctl poweroff")

def create_window(self):
self.window = gtk.Window()
title = "Log out " + getpass.getuser() + "? Choose an option:"
self.window.set_title(title)
self.window.set_border_width(5)
self.window.set_size_request(500, 60)
self.window.set_resizable(False)
self.window.set_keep_above(True)
self.window.stick
self.window.set_position(1)
self.window.connect("delete_event", gtk.main_quit)
windowicon = self.window.render_icon(gtk.STOCK_QUIT, gtk.ICON_SIZE_MENU)
self.window.set_icon(windowicon)


#Create HBox for buttons
self.button_box = gtk.HBox()
self.button_box.show()

#Cancel button
self.cancel = gtk.Button(stock = gtk.STOCK_CANCEL)
self.cancel.set_border_width(4)
self.cancel.connect("clicked", self.cancel_action)
self.button_box.pack_start(self.cancel)
self.cancel.show()

#Logout button
self.logout = gtk.Button("_Log out")
self.logout.set_border_width(4)
self.logout.connect("clicked", self.logout_action)
self.button_box.pack_start(self.logout)
self.logout.show()

#Shutdown button
self.shutdown = gtk.Button("_Power off")
self.shutdown.set_border_width(4)
self.shutdown.connect("clicked", self.shutdown_action)
self.button_box.pack_start(self.shutdown)
self.shutdown.show()

#Reboot button
self.reboot = gtk.Button("Re_boot")
self.reboot.set_border_width(4)
self.reboot.connect("clicked", self.reboot_action)
self.button_box.pack_start(self.reboot)
self.reboot.show()
                               
#Openbox reconfigure button
# self.reconfigure = gtk.Button("Recon_figure")
# self.reconfigure.set_border_width(4)
# self.reconfigure.connect("clicked", self.reconfigure_action)
# self.button_box.pack_start(self.reconfigure)
# self.reconfigure.show()
       
#Suspend button
self.suspend = gtk.Button("_Suspend")
self.suspend.set_border_width(4)
self.suspend.connect("clicked", self.suspend_action)
self.button_box.pack_start(self.suspend)
self.suspend.show()

#Create HBox for status label
self.label_box = gtk.HBox()
self.label_box.show()
self.status = gtk.Label()
self.status.show()
self.label_box.pack_start(self.status)

#Create VBox and pack the above HBox's
self.vbox = gtk.VBox()
self.vbox.pack_start(self.button_box)
self.vbox.show()

self.window.add(self.vbox)
self.window.show()

def __init__(self):
self.create_window()


def main():
    gtk.main()

if __name__ == "__main__":
    go = bl_exit()
    main()
Title: Re: vsido-exit stopped working - partially
Post by: Snap on September 30, 2015, 04:15:21 AM
Ah, yes. systemctl. I already forgot that. Thanks, PackRat.

The drawback of my dirty workaround is that it only works for my user (or the allowed users/sudoers if any). Though WM agnostic too, It's not systemwide like systemctl. For a single user account system (aside root) it works fine too.
Title: Re: vsido-exit stopped working - partially
Post by: Snap on September 30, 2015, 05:39:36 AM
Huh, I have a conflict here:

systemctl reboot
Failed to get D-Bus connection: Operation not permitted


systemd-login is managing the session instead of consolekit

paco@vsido:~$ loginctl show-session $XDG_SESSION_ID
Id=1
Name=paco
Timestamp=Wed 2015-09-30 06:38:33 CEST
TimestampMonotonic=14826258
VTNr=7
Display=:0
Remote=no
Service=lightdm-autologin
Desktop=fluxbox
Scope=session-1.scope
Leader=2456
Audit=1
Type=x11
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
paco@vsido:~$ ck-list-sessions
paco@vsido:~$


dbus should be automatically launched by systemd but it cannot access to dbus. Perhaps consolekit is still in the way trying to handle dbus. I guess I should purge consolekit at this point. These two things are now redundant so I guess non compatible.
Title: Re: vsido-exit stopped working - partially
Post by: Snap on September 30, 2015, 08:06:13 AM
Purged consolekit. No difference. Reinstalled systemd and dbus. No difference. Dbus is running but I cannot do anything systemd/dbus related, like shutting down or enabling/disabling processes/units. My user is not allowed to do anything like that... It seems that the old configuration intended for consolekit still persists, so systemd is still not carrying those tasks originally configured to be performed by consolekit... Oh, well. I think I've already wasted to much time with this. I give up. I have much better things to do. Will reinstall Vsido one of this days.
Title: Re: vsido-exit stopped working - partially
Post by: zephyr on October 02, 2015, 08:59:30 AM
@PackRat:  Thanks for the vsido-exit with the window manager agnostic script, it worked and quite well. I had a lot of issues going on and the lightdm was not a part of the problem at all. But the script did the job. Also went ahead and used smxi to upgrade kernel to 4.2.0 and all looks good.   Do appreciate you taking the time to help us out.  Thank you.:)

VastOne now has a Oct01 release, and will be looking at that next.

Cheers
zephyr

Title: Re: vsido-exit stopped working - partially
Post by: Snap on October 04, 2015, 06:27:14 AM
IMHO, lightdm is not the problem. It's the dbus update and systemd trying to replace consolekit but not doing it completely. This half-way process is the cause of the issues we had/have. Vsido was conceived before systemd replaced sysvinit in Debian and using consolekik was then the way to go. Currently it's redundant since systemd-logind has fully replaced consolekit. IMHO, it should be removed from Vsido to avoid these kind of conflicts.

Yep, it's great there's new releases again. They came right on time for me.   8) Vsido is not my main system by I love having it around. It's a reference and a proof of concept. I really don't know why I eneded up with a system put together on top of BBQ's Bork. My original intention was going whith antiX and stable, but... Here I am on BBQ and Sid though built with an eye put on Vsido. I'm running with sysvinit for now so I have consolekit.
Title: Re: vsido-exit stopped working - partially
Post by: ostrolek on October 21, 2015, 01:01:57 PM
Just change #!/usr/bin/env python to #!/usr/bin/env python2 in vsido-exit
Title: Re: vsido-exit stopped working - partially
Post by: Snap on October 22, 2015, 06:19:09 AM
python? is this issue related with python?  ???

Aaah, Now I see what you mean, the exit. The problem was wider than that. Systemd and dbus didn't played together. Anyway. i don't have that system anymore. I deleted the VM and only keep two Vsidos. A fully customized one I managed to keep going right and a fresh rather vanilla new install, well, a week old.

I keep saying the same. if systemd/logind is in, consolekit shouldn't be present.