The officially official Devuan Forum!

You are not logged in.

#426 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2017-01-04 14:31:09

I have updated the summary in message number 38
https://dev1galaxy.org/viewtopic.php?pid=430#p430
with the extra info in the recent posts.

Geoff

#427 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2017-01-03 16:11:10

I was unnecessarily rude about SpaceFM. Looking at the help I find that you can add all of the information which you might want to see about a file, but you do not set this up in the preferences from the menus at the top, you do it by right clicking on a file in the display panel and then select view>columns where you can select what you want. I think that the settings for each of the up to 4 file display panels is independent. The help probably needs a bit more investigation.

Geoff

#428 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2017-01-03 15:44:03

I found the post in [DNG] where Didier Kryn has posted a small wrapper program in C, which looks like pkexec but runs sudo for commands or udevil for mount/umount requests.
https://lists.dyne.org/lurker/message/2 … ea.en.html
I copied this and compiled it and as root copied the binary to /usr/local/bin. Then I installed ssh-askpass and udevil. After setting up

Path askpass /usr/bin/ssh-askpass

in /etc/sudo.conf I was then able to run gparted from the launch menu.

I then had a look at which file managers could use udevil to mount removable devices under /media :-

SpaceFM auto-detects udevil and uses it.
xfe you can manually enter a command such as "udevil mount /dev/sdc1".
PCManFM I can't see how to get it to use udevil unless it is to do with "Modules".
Thunar does not appear to allow custom commands to mount media. It requires HAL to do the mounting.

So SpaceFM seems to work well for the mounting and un-mounting, although I didn't really like the layout of the files as it did not seem to offer the dates of the files, which can be really useful if you want to copy a block of files somewhere else. I suppose that I could use SpaceFM to look after the mounts and then use PCManFM to move stuff about!

Geoff

#429 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2017-01-01 20:25:45

I have just found the correct thread about using udevil, which I mentioned a couple of posts ago. It is at :-
https://lists.dyne.org/lurker/message/2 … 4b.en.html

Geoff

#430 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2017-01-01 15:40:22

golinux wrote:

gksu works just fine. smile

Yes, it does ;-) When I suggested using su as a work round, I was including gksu, which is the form I normally use. I thought that I had read that gksu was deprecated and on my testing/Ascii machine it became removed.

Geoff

#431 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2017-01-01 14:24:25

I thought that I had seen something written about polkit and pkexec. I have now found it again in the [DNG] Mailing list archives :-

https://lists.dyne.org/lurker/list/dng.en.html

To read about avoiding polkitd and pkexec and also allowing for file mounting using udevil and sudo, see :-

https://lists.dyne.org/lurker/message/2 … 7e.en.html

I believe that the reason that I could reliably shutdown from the logout menu was that I had previously followed the instructions in this post :-

https://lists.dyne.org/lurker/message/2 … 34.en.html

and set up /etc/polkit-1/localauthority/50-local.d/consolekit.pkla as described there.

I think that it works like this with the vertical || being dbus :-

pkexec shutdown
  \requests  permission--->-----||----->----polkitd
                                ||             | ok
                                ||          polkitd
                                ||           ok
pkexec -------------------<-----||-----<-----/
 runs shutdown

Compare this with, say, gparted, which needs a password before it is allowed to run :-

pkexec gparted
  \requests  permission--->-----||----->----polkitd
                                ||             | authenticate
lxpolkit-----------<------------||-----<----polkitd
 requests password              ||
lxpolkit----------->--OK--------||----->----polkitd
                                ||           ok
pkexec -----------------<-------||-----<-----/
 runs gparted

If lxpolkit has failed to register itself with dbus/polkitd, then this is not going to work, while shutdown does not require a password.
As a comparison, I think that sudo works like this :-

sudo gparted
 sudo checks
 ok (asks for password if required)
 runs gparted

I suspect that there is a timing problem with starting lxpolkit, so that after a reboot, it starts before dbus/polkitd is ready to accept its registration. Following a logout & login dbus/polkitd are ready when lxpolkit starts. Somewhat bizarely, I have had lxpolkit registering successfully after a boot from cold. I wonder whether the difference between the cold boot and a reboot could be down to something like the dhcp server being a bit slower to respond, which could have some knock on effect!!

I think that I will investigate the posts above about udevil and sudo, hence avoiding dbus/polkitd.

Geoff

#432 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-29 16:12:15

Summary

This is a summary of what I did  to upgrade from Debian Jessie to Devuan Jessie. The result of this is a machine running LXDE, with most things working normally. Shutdown from the logout menu is working.

I will update this message as necessary.

The desktop machine had been running Debian Jessie for a long time with many applications installed as well as some desktops, including XFCE and LXDE.

The following is the equivalent of what I actually did, reconstructed from the log files
and more or less follows the instructions for XFCE given by Chillfan
https://dev1galaxy.org/viewtopic.php?pid=67#p67

As root comment out all of the entries in sources.list and add the Devuan repository entries.
As I had previously added contrib and non-free, I kept these here.

nano /etc/apt/sources.list

deb http://auto.mirror.devuan.org/merged jessie main contrib non-free 
deb http://auto.mirror.devuan.org/merged jessie-updates main contrib non-free 
deb http://auto.mirror.devuan.org/merged jessie-security main contrib non-free 

Log into the console as root (maybe you need <ctl><alt><F1> to get to the console).

Now update the cache and get the Devuan keyring. Once this is installed the packages will be authenticated.

apt-get update
apt-get install devuan-keyring -y --allow-unauthenticated
apt-get update -y

Now install the Devuan packages and remove systemd. The purges will remove a large number of packages incluidng LXDE and XFCE as well some Gnome applications and parts of LibreOffice.

apt-get dist-upgrade
apt-get autoremove --purge
apt-get purge systemd-shim libsystemd0
apt-get autoremove

Now put back LXDE and a display manager as well as putting back the missing parts of LibreOffice.

apt-get install lxde slim
apt-get install policykit-1 upower
apt-get install libreoffice libreoffice-gtk
apt-get purge sysvinit gnome-mplayer

If you now reboot, Slim should start and let you log in to your previous LXDE set-up.

(Edit: the next section was edited in later, from postings below)

To make sure that you can shutdown the machine from the logout menu, enable it in polkit/consolekit as described by Paweł Cholewiński in,
https://lists.dyne.org/lurker/message/2 … 34.en.html
thus, as yourself :-

cat << EOF > /tmp/consolekit.pkla
[restart]
Identity=unix-user:`whoami`
Action=org.freedesktop.consolekit.system.restart
ResultAny=yes

[stop]
Identity=unix-user:`whoami`
Action=org.freedesktop.consolekit.system.stop
ResultAny=yes

[hibernate]
Identity=unix-user:`whoami`
Action=org.freedesktop.upower.hibernate
ResultAny=yes

[suspend]
Identity=unix-user:`whoami`
Action=org.freedesktop.upower.suspend
ResultAny=yes
EOF

and as root

cp /tmp/consolekit.pkla /etc/polkit-1/localauthority/50-local.d/

While the above uses polkit, on the grounds that it works, the following tries to avoid polkit/dbus as there can be problems with lxpolkit failing to register itself.

Use the small wrapper program in C which Didier Kryn has posted on [DNG], which looks like pkexec but runs sudo for commands or udevil for mount/umount requests. udevil and ssh-askpass also need to be installed and sudo.conf set-up.

As yourself, copy the C code from
https://lists.dyne.org/lurker/message/2 … ea.en.html
It is probably easier to cut and paste the code into your favourite editor, rather than saving the web page and then editing out the HTML! Save it into a file called pkexec.c in a suitiable working subdirectory and then give the command

make -k pkexec
# then as root :-
cp pkexec /usr/local/bin
apt-get install ssh-askpass udevil

cat << EOF2 >> /etc/sudo.conf
# Specify the GUI helper program to read the password
Path askpass `which ssh-askpass`
EOF2

It is assumed that /usr/local/bin comes before /usr/bin and /bin in your path.
Test that it works with :-
pkexec gparted
Then you can try running gparted from the launch menu.

udevil can be used by some file managers to mount removable devices under /media. SpaceFM seems to work well and will detect udevil and use it for mounting removable devices. Some of the other SpaceFM configurations are not set this up in the preferences from the menus at the top, but by right clicking on a file in the display panel and then, say, selecting view>columns where you can select which attributes to display. I think that the settings for each of the up to 4 file display panels is independent. It is probably a good idea to read the help for SpaceFM.

apt-get install spacefm

This should then have most of the normal stuff working. If on logging in you get a pop-up error message from GDBus about "Cannot determine user of subject" then you should be able to get rid of it by disabling lxpolkit in "Default applications for LXSession" under "Core applications" and "Autostart".

#433 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-28 10:52:12

The command "ps axjf" was helpful in finding out what starts what, as it shows the process tree.

dbus is started by init.
It seems that the dbus daemon starts polkitd (as well as the console-kit-daemon and upowerd) and they all run as root.
Slim (which runs as root) starts lxsession, which then starts lxpolkit. lxsession and lxpolkit run as the user.

It is possible to see the (fairly verbose) output from lxsession in the log file :-
.cache/lxsession/LXDE/run.log

Geoff

#434 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-24 15:50:30

What is it that runs the policy kit deamon, polkitd? It runs as root, but only seems to start when I first log in and is then persistent over subsequent logins.

Geoff

#435 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-24 15:17:46

I am afraid that I posted too quickly! The running of gparted from the launch menu only works after logging out and logging back in again, while shutting down from the logout menu works all the time! looking at the output from "ps -elf" I can see lxpolkit is running, but it appears not to have registered with polkitd. If I send a HUP to lxpolkt's pid, then it seems to die and fire up a new instance, which does register itself with polkitd and then I can run gparted from the launch menu.

There seem to be 2 questions :-
Is there some timing problem the first time lxpolkit runs, so that polkitd is not ready for it, but is ready after a logout and log back in?
What is the difference in the way gparted is run and the way that shutdown is run?

Geoff

#436 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-23 11:19:48

Policykit and lxpolkit are now working, although I am not entirely sure why!

Clearly lxpolkit requires policykit-1 although it is not given as a dependency. I believe that policykit runs as root and does all the clever authentication and permissions stuff, while lxpolkit runs as the user and acts as the interface to the user. Then there is the question of getting lxpolkit started by lxsession. lxsession-edit is used to set up the files. It finds them in /etc/xdg/autostart/*.desktop and if you change one it copies your own version over into ~/.config/autostart/. If things get too confused, you can delete the files in your own directory ~/.config/autostart/ and start again. You can run lxsession-edit from the launch menu as
Preferences>Default applications for LXSession
In the "Core applications" tab you must make sure that the polkit agent is lxpolkit.
In the "Autostart" tab LXPolkit is DISABLED, as this setting stops the pop-up error message.
I also have enabled the 4 gnome-keyring items :-
SSH Key Agent, Certificate and Key Storage, GPG Password Agent & Secret Storage Service.

If lxpolkit does not show up in lxsession-edit, then you can edit /etc/xdg/autostart/lxpolkit.desktop and change the line
Hidden=true
to be false. It will then show up and you can ensure that it is disabled.

Now, after a fresh reboot, I can run gparted or synaptic from the launch menu (with password checking) and the shutdown options work on the logout menu.

In debugging this I did try installing policykit-1-gnome, which did not pull in anything else much, and having set it up, I found that it produced the same errors as lxpolkit, so I went back to using lxpolkit.

There was some helpful stuff on the Rasberry Pi web site :-
https://raspberrypi.stackexchange.com/q … n-start-up
as well as our friends at Arch Linux :-
https://bbs.archlinux.org/viewtopic.php?id=144783

Geoff

#437 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-22 17:01:02

chillfan wrote:

Give lightdm a try, it has all those buttons/menus etc plus better support upstream vs slim.

I was running lightdm before, but there seemed to be a recommendation to use Slim. I also got the impression that lightdm was dependent on systemd, but a quick check shows that it is either libpam-systemd or consolekit and I do have consolekit running.

However, I feel that I am getting nearer to having lxsession-logout working properly so that we can shutdown from there. This is tied in with lxpolkit and policykit and it needing a logout and log back in before it works properly. This also gets other stuff working as well, such as running programs such as gparted from the launch menu. I am still working on this but I am finding it quite hard...

Geoff

#438 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-21 16:05:30

golinux wrote:
Geoff 42 wrote:

There is no GUI method to shutdown the system as lxde only allows logout/lock and slim does not have any options to shutdown. I have a quick kludge with xmessage and sudo.
Geoff

'man slim' offers suggestions for alternate actions.  Note that I have not tried any of them. YMMV.

I have had a look at "man slim" and you can indeed shutdown the system there by giving the username "halt". However, it does then prompt you for the root password, which I do know ;-) but my partner does not. I persuaded her that Linux was better than Windows by telling her that Penguin Solitaire was better than MS Solitaire. I think that I should not ask her to shutdown with this method, but with a nice tidy menu option.

Geoff

#439 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-21 15:49:55

Tracking down the policykit situation, the first login after booting up, produces an error pop-up from lxpolkit, saying :-

GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed:
Cannot determine user of subject

and it leaves no obvious record in /var/log/auth.log. If I run pkexec manually it works, as in "pkexec /usr/sbin/gparted" asks for the password and then runs, but stuff in the launcher menu does not run.

When I log out and then back in again, without a reboot, there is a record in auth.log from lxpolkit :-

Dec 21 15:34:52 fluorine polkitd(authority=local):
 Registered Authentication Agent for unix-session:/org/freedesktop/ConsoleKit/Session3
 (system bus name :1.36 [lxpolkit], object path /org/freedesktop/PolicyKit1/AuthenticationAgent,
 locale en_GB.UTF-8)

and I can run gparted from the launcher menu.

I think that I am close, but no cigar yet...

Geoff

#440 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-21 14:58:51

chillfan wrote:

When I get some time I may make a guide on this and convert the answers in this topic to a wiki page here.

I was intending producing a summary of this thread, once I had got things in a satisfactory state. Assuming I succeed, you are most welcome to make any use of it.

Geoff

#441 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-21 10:28:03

Right! I think that I may be getting somewhere and it is to do with Policykit.

Policykit was not installed although lxpolkit was and some privilege escalation things did not work, including the shutdown option off the logout menu. I had worked out that the error pop-up which I was getting on login, was coming from lxpolkit. lxpolkit does not depend on policykit, but reading around the subject I found an article over at ArchLinux :-
https://bbs.archlinux.org/viewtopic.php?id=169203
and as policykit does not seem to pull in anything much, I installed it. I logged out and back in again, and the pop-up did not appear. Encouraged by this I selected gparted from the launch menu and it put up the password box and on completion gparted then ran. This is a major improvement. Just to check I was also able to start synaptic this way. The next thing I tried was the logout menu and I asked it to reboot, and it did! However, when I logged back in, an error pop-up appeared, although with a different message, but still GDBus related. Now I was not able to run gparted, so I logged out and logged back in and this time there was no error pop-up and I was then able to run synaptic from the launch menu.

So, although lxpolkit is not dependent on policykit, it does seem to need it in order to work! There remains a problem with it starting up, which I still need to track down.

Geoff

#442 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-20 16:53:06

golinux wrote:

I don't know about the upower version compatibility but do you really want to use an app that had a systemd dependency?  Perhaps there is another option that will work with lxde?

As I read it lxsession needs one of consolekit, upower or systemd, but not all of them and is running now without systemd. I do have a workround for the shutdown, although if there was a neater way of doing it that would be nice.

Geoff

#443 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-20 16:16:28

chillfan wrote:

Yeah gvfs combined with dbus and polkit takes care of auto mounting see the thunar-volman package for thunar auto mounting, spacefm is supposed to work for auto mounting, maybe xfe can do it too, not sure about pcmanfm (the default file manager for lxde).

I have just had a quick look at installing gvfs and I see that it will pull in libsystemd0, so I have decided not to do that.

Geoff

#444 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-20 16:04:04

Right! I have just installed libreoffice-gtk and it didn't pull in anything else and it has improved the look of the menus. I have now set the scaling back to 100% and it looks pretty good. Sorry for all of my ramblings.

Geoff

#445 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-20 15:56:44

I have found some info on the net about LibreOffice menu fonts at :-
https://ask.libreoffice.org/en/question … enu-fonts/
and by increasing the User Interface Scaling to 110% it has increased the size of the fonts enough for me to be getting on with.

It also mentions installing libreoffice-gtk. I'm not sure whether this is a good idea or whether it might start pulling in a lot of undesirable stuff.

Geoff

#446 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-20 15:33:17

MiyoLinux wrote:

So, after comparing the two files, you can remove everything between </match> and </fontconfig> so that you're left with...

Thank you for all of your suggestions. I have now tried removing the second part of local.conf and it still improves the look of the LibreOffice pull down menus, although the font is still small. Unfortunately the pull down menus on the other software deteriorates, although it does not get smaller. I think that currently I will put up with the poorer LibreOffice menus for the sake of everything else. I suspect that this is a LibreOffice problem rather that LXDE or Devuan.

Geoff

#447 Re: Forum Feedback » Auto-logout » 2016-12-20 10:57:02

I wonder whether we can use the preview button as a sort of save/keep me logged in facility?

Geoff

#448 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-20 10:51:03

golinux wrote:

Do you have upower installed? Read through this for suggestions.

Yes I have "upower 1:0.9.23-2+devuan1.2" installed. I notice from the reference, which you give, that someone reports that installing upower made the shutdown options appear with logout. I also notice that lxsession depends on "consolekit | upower (<0.99) | systemd". I am not too clear on version numbers, but does that mean that lxsession will not use the version of upower that I have installed?

Geoff

#449 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-20 10:13:44

MiyoLinux wrote:

I'm not sure if I understand correctly, but it sounds as though the only font rendering problem you are experiencing is with LibreOffice? If that's the case, I'm not sure if this will help...but it won't hurt to try if you're willing.

Thank you for your suggestion. I have created the local.conf and it does indeed seem to make a difference. If I understand it, the first part is turning on anti-aliasing, and as far as I can see, it is improving the quality of the letters, the letter "D" does appear to be much smoother. The new file does however make the font smaller in LibreOffice. I then restarted my browser and that too has a smaller font in the interface. Could this be that the Droid font that you are specifying does appear smaller that whatever it is that I am currently using?

Geoff

#450 Re: Desktop and Multimedia » LXDE user upgrades to Devuan Jessie » 2016-12-19 15:23:01

Thank you for your detailed reply.

I believe that I had followed your suggestions more or less. Purging systemd and libsystemd0 followed by an autoremove had removed lxde as well as xfce and gvfs as well as several gnome utilities. Re-installing lxde and slim pulled in consolekit and I have since re-installed upower. I have checked for the recommends, which you mention and none of them was present except gnome-mplayer, which I have now purged. As mentioned above gvfs is absent.

In browsing around for anything to do with systemd I only found sysvinit installed. At first I thought that this sounded good, until I realised that it is a transitional package for systemd. I have now purged that. I was a bit confused to not find systemd itself as un-installed, until I realised that the repository is Devuan's and therefore systemd is not there ;-) It does mean though that "apt-get purge systemd" does not work!

It seems to me that lxde is working happily without systemd or libsystemd0. The only problems which I am currently aware of are :-

Temporary mounting of usb devices such as camera/phone. I assume that used to be handled by gvfs and I have started to look at Thunar, which I think I saw mentioned in this context.

There is no GUI method to shutdown the system as lxde only allows logout/lock and slim does not have any options to shutdown. I have a quick kludge with xmessage and sudo.

There is an error pop-up on login :-
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown:
The name org.desktop.PolicyKit1 was not provided by any .service files

The poor fonts on the LibreOffice interface. This is not a major problem.

Geoff

Board footer

Forum Software