The officially official Devuan Forum!

You are not logged in.

#1 2020-02-29 22:15:30

mclien
Member
Registered: 2020-02-29
Posts: 4  

login / Display managers

I just had a really annoying time while I was installing (Devuan ascii) a notebook with several desktops (trinity, lxde, xfce, openbox).
Almost everything went fine, except, that it is nearly impossible to allow users to perform a shutdown/reboot, which is completly stupid on a notebook.
I spend hours trying to fix that via policykit. Usually I do it simply by allowing all users to perform these commands via a group shutdown and an entry in sudoers.
Except lightdm won't do that. Well in a way.. you have to logout first and then you can do it from the login promt.

My fix is to use slim, which I like better anyway, ...BUT I just learned right after implementing my fix, that slim is pretty much abandoned. Main statement is due to "not beeing fully compatible with systemd".
So question is (from a non programmer): Will it stay in Devuan? 
Or more general: Can't there be unmaintained software, which is still usefull and without objections to use? Or is there realy no such thing as a software, that is simply "finished"?

And if there is no way to keep slim alive? Is there any other login/display manager, which simply does the same in terms of shutdown/reboot by users?

Offline

#2 2020-03-01 03:01:12

bgstack15
Member
Registered: 2018-02-04
Posts: 135  

Re: login / Display managers

I have no input for you regarding slim; I'm sorry.

What I do know about is using lightdm with elogind. Another forum user already found the solution: HOWTO: lightdm (with libpam-elogind) + xfce4 (ASCII/Stable) / Documentation / Dev1 Galaxy Forum

My current solution, derived from the above link:

#!/bin/sh
# Reference: https://bgstack15.wordpress.com/2019/09/01/devuan-with-lightdm-and-xfce-will-not-let-user-reboot-or-shutdown-from-user-session/
# Startdate: 2019-08-11

# only for devuan ceres
sudo apt-get install --no-install-recommends libpolkit-backend-elogind-1-0 policykit-1 lightdm lightdm-gtk-greeter

sudo sed -i -r -e '/session\s+optional\s+pam_systemd\.so/s/systemd/elogind/;' /etc/pam.d/lightdm-greeter

This space intentionally left blank.

Offline

#3 2020-03-01 09:03:49

mclien
Member
Registered: 2020-02-29
Posts: 4  

Re: login / Display managers

Well after a nights sleep I'm a bit more calm.

Unfortunately the notebook is now not in my direct reach, I can't test directly (but I have the next Notebook to install lined up).
(the fix here was: install slim and make it the default login manager:

dpkg-reconfigure slim

and entries in sudoers:

# shutdown for users
%shutdown ALL=(root) NOPASSWD: /sbin/shutdown
%shutdown ALL=(root) NOPASSWD: /sbin/halt -p
%shutdown ALL=(root) NOPASSWD: /sbin/reboot

But someone posted in the Debian forum it might be even easier to fix:

/usr/sbin/

is not set in the $PATH by default.

I was about to proof that, but figured, that there is no shutdown in /usr/sbin anyway...

Offline

#4 2020-03-01 09:38:50

rolfie
Member
Registered: 2017-11-25
Posts: 256  

Re: login / Display managers

Ignore that comment that the fix is for Ceres only. I can confirm that lightdm/mate with elogind works as well with ASCII 2.0 as Beowulf (comes that way out of the box) while consolekit causes problems. Gave me a hard time when setting up ASCII directly after release. There are some threads in this forum that deal with this problem. 

rolfie

Offline

#5 2020-03-01 11:04:35

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 556  
Website

Re: login / Display managers

mclien wrote:
/usr/sbin/

is not set in the $PATH by default.

That is also true for /sbin so the normal user's PATH would not include the commands you've listed in /etc/sudoers

To include the {/usr{,/local},}/sbin directories for all users edit /etc/profile and change these lines:

if [ "`id -u`" -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
fi
export PATH

To:

if [ "`id -u`" -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games"
fi
export PATH

Or to include them for specific users add this line to ~/.profile:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games"

Be sure to place that before the lines setting PATH to include the user's private bin.


"Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher." — Antoine de Saint-Exupéry

Offline

#6 2020-03-01 12:14:55

mclien
Member
Registered: 2020-02-29
Posts: 4  

Re: login / Display managers

Thanks for the reply.
I know about the profile or .bashrc configs (using Linux since +20 years).

The problem was there is no shutdown in /usr/sbin and since slim complained about rights last time I set it up, it didn't occur to me to use /sbin as a user.

In this specific case I also made quite move, I confess.
The old machine was running a debian 9 (stretch). I installed the new one with ascii as minimal install and then generated a list of all installed packages on the old machine, which I used to install all of them on the ascii installation.

Worked surprisingly well, even tough I had to change the tde-trinity sources.
Anyway it's running with slim and the sudoers config. (I need to prove, if I removed the standard sudo entry and removed the normal users from the sudo group).

Offline

Board footer