View previous topic :: View next topic |
Author |
Message |
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Thu Oct 01, 2020 7:25 pm Post subject: LXDE without polkit |
|
|
Continued from https://forums.gentoo.org/viewtopic-t-1119841-highlight-.html
Anon-E-Moose wrote: | The only part of lxde that requires polkit is lxsession, and when I was running lxde, I didn't use lxsession, I think I made a modified meta package without lxsession in it |
Removed lxsession from lxde-meta and it built fine but it crashes on launch from xdm with: Code: | Oct 1 13:17:58 MSI kernel: traps: plugin-containe[4695] trap stack segment ip:7f8aee16d981 sp:7fff18f08800 error:0 in ld-2.31.so[7f8aee159000+20000] |
|
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2963 Location: Edge of marsh USA
|
Posted: Thu Oct 01, 2020 7:42 pm Post subject: |
|
|
I don't think polkit is the problem, or even a problem. I think LXDE (probably lxsession) runs lxpolkit which spawns polkitd. It's part of what makes things work as expected. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Thu Oct 01, 2020 9:38 pm Post subject: |
|
|
How are you starting X, ie what's in your .xinitrc file?
As far as polkit goes, the main thing it's used for is to let the shutdown/reboot (whatever it's called) work for a normal user, at least that's what I remember, but it's been over 5 years since I've used xfce, so just going on my (possibly faulty) memory.
Edit to add: just downloaded the source for lxsession, they've changed a lot since I used it.
It's not that hard to put together a reasonable desktop using openbox, with something like tint or lxpanel and something like pcmanfm. _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Thu Oct 01, 2020 10:08 pm Post subject: |
|
|
I run xdm. The session script installed by lxde launches lxde-session-manager which I didn't emerge. lxpanel does run in openbox. I wasn't impressed with the default.
I might have to scour the code to see where it uses polkit and patch it out. Yet Another Project
Or just accept polkit which I've managed to avoid for what? 14 years? |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Thu Oct 01, 2020 10:18 pm Post subject: |
|
|
You should be able to tell xdm to just start openbox directly, and from openbox autostart whatever else you want, like a panel (I liked tint2 better than lxpanel), pcmanfm (desktop icons) _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Thu Oct 01, 2020 11:42 pm Post subject: |
|
|
Yes, Anon-E-moose, I did do that, but I don't like the looks. But starting pure lxde died because I didn't build lxde-session.
I would continue with Mate but it also needs polkit or elogind or pam or some other seat manger. I only have one seat. |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2963 Location: Edge of marsh USA
|
Posted: Thu Oct 01, 2020 11:48 pm Post subject: |
|
|
In my case, all of the above.
On my main desktop I'm currently using lightdm.
On my old x86 desktop mainly just doing server duties it's usually not logged in but otherwise I use .xinitrc:
Code: | setxkbmap -option terminate:ctrl_alt_bksp
xhost +local:root > /dev/null
/usr/bin/numlockx on
dbus-launch --sh-syntax --exit-with-session startlxde |
On the remote x86 server LXDE or OpenBox is started by x2go. Nobody ever accesses it locally and I usually access it with ssh in a terminal. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Thu Oct 01, 2020 11:51 pm Post subject: |
|
|
The last line of /etc/X11/Sessions/lxde is Code: | exec /usr/bin/startlxde |
This actually a script that exports various things and ends with:
Code: | # Start the LXDE session
exec /usr/bin/lxsession -s LXDE -e LXDE
|
|
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Oct 02, 2020 12:10 am Post subject: |
|
|
Definition of Terms
A seat consists of all hardware devices assigned to a specific workplace. It consists of at least one graphics device, and usually also includes keyboard, mouse. It can also include video cameras, sound cards and more. Seats are identified by seat names, which are short strings (<= 64chars), that start with the four characters "seat" followed by at least one more character from the range a-zA-Z0-9, "_" and "-". They are suitable for inclusion in file names. Seat names may or may not be stable and may be reused if a seat becomes available again.
A session is defined by the time a user is logged in until he logs out. A session is bound to one or no seats (the latter for 'virtual' ssh logins). Multiple sessions can be attached to the same seat, but only one of them can be active, the others are in the background. A session is identified by a short string. systemd ensures that audit sessions are identical to systemd sessions, and uses the audit session id as session id in systemd (if auditing is enabled). The session identifier too shall be considered a short string (<= 64chars) consisting only of a-zA-Z0-9, "_" and "-", suitable for inclusion in a file name. Session IDs are unique on the local machine and are never reused as long as the machine is online.
A user (the way we know it on Unix) corresponds to the person using a computer. A single user can have opened multiple sessions at the same time. A user is identified by a numeric user id (UID) or a user name (string).
A multi-session system allows multiple user sessions on the same seat at the same time. Linux+systemd qualifies.
A multi-seat system allows multiple independent seats that can be individually and simultaneously used by different users. Linux+systemd qualifies.
Did I read this wrong? A multi-seat machine has multiple users on the same hardware.
I do sometimes have multiple sessions on one machine, but there is only one user (me!) using the hardware. |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2963 Location: Edge of marsh USA
|
Posted: Fri Oct 02, 2020 2:36 am Post subject: |
|
|
Tony0945: why are you asking? Unix/Linux is a multi-user OS. In other words, one running OS can have multiple concurrent logins from the same or different users.
The snippet you quoted is exclusive to systemd. I think you need a different thread. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Oct 02, 2020 2:46 am Post subject: |
|
|
Supposedly polkit or elogind or systemd are needed for a multi-seat system. Yes, several seats could logon to my systems. But they won't, because I am the last one standing with a password. So why do I need "kits". I didn't even have them (nor dbus) when my grandkids were here (Gnome 2 days). I don't like installing murky needless software. I'm very leery of Zoom. I did have pam until a few months ago. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Oct 02, 2020 2:53 am Post subject: |
|
|
Anon-E-moose wrote: | As far as polkit goes, the main thing it's used for is to let the shutdown/reboot (whatever it's called) work for a normal user, at least that's what I remember, but it's been over 5 years since I've used xfce, so just going on my (possibly faulty) memory. |
Meh! If worse comes to worse, I can CTL-ALT-F1, log on as root and halt or reboot. I tried openbox with mate-panel and it worked well, but I couldn't logout (probably logs out by killing mate-session-manager), so I CTL-ALT-F1, logged in as root and ran "service xdm restart". That killed the session and gave me a new xdm login prompt. |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2963 Location: Edge of marsh USA
|
Posted: Fri Oct 02, 2020 3:13 am Post subject: |
|
|
Tony0945 wrote: | Supposedly polkit or elogind or systemd are needed for a multi-seat system. Yes, several seats could logon to my systems. But they won't, because I am the last one standing with a password. So why do I need "kits". I didn't even have them (nor dbus) when my grandkids were here (Gnome 2 days). I don't like installing murky needless software. I'm very leery of Zoom. I did have pam until a few months ago. |
I'm pretty happy to run "murky needless software" if they give me useful functionality. Unless you build it yourself, isn't most software "murky?" I'm happy with pam.
I'm only running Zoom on my Android tablet. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Fri Oct 02, 2020 9:26 am Post subject: |
|
|
Tony0945 wrote: | Anon-E-moose wrote: | As far as polkit goes, the main thing it's used for is to let the shutdown/reboot (whatever it's called) work for a normal user, at least that's what I remember, but it's been over 5 years since I've used xfce, so just going on my (possibly faulty) memory. |
Meh! If worse comes to worse, I can CTL-ALT-F1, log on as root and halt or reboot. I tried openbox with mate-panel and it worked well, but I couldn't logout (probably logs out by killing mate-session-manager), so I CTL-ALT-F1, logged in as root and ran "service xdm restart". That killed the session and gave me a new xdm login prompt. |
As far as logging out, you should be able to tell openbox to shut down.
From my ~/.config/openbox/rc.xml
Code: | <keybind key="W-s">
<keybind key="q">
<action name="Exit">
<prompt>yes</prompt>
</action>
</keybind>
<keybind key="x">
<action name="Exit">
<prompt>no</prompt>
</action>
</keybind>
</keybind> |
I can use meta-s/q for a "do you want to exit" or "x" for just exiting without asking.
And this is at the bottom of menu.xml
Code: | <separator/>
<menu id="40" label="OpenBox">
<menu id="client-list-menu"/>
<item label="Reconfigure"> <action name="Reconfigure"/> </item>
<separator/>
<item label="Exit"> <action name="Exit"/> </item>
</menu> |
Edit to add: I just remembered when lxde is running using openbox it doesn't use rc.xml/menu.xml, I believe it prepends the session name like LXDE-rc.xml or something like that, anyway if you add the above (assuming it's not there already) to all xml files under ~/.config/openbox it should provide you with a clean exit.
ETA2: If you're using mate with openbox, there's a gnome-panel-control that comes with openbox, and using this https://forums.linuxmint.com/viewtopic.php?t=109474 (the person made it work with mate) so that you can access the normal mate menu stuff. At least that's my understanding. _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Oct 02, 2020 1:55 pm Post subject: |
|
|
To: Anon-E-moose:
Yes, I had access to the Mate menu. And I recalled that i can end the session by something like "killall openbox <something>" But I didn't remember the exact incantation. Also, I could just run the latest Mate with all it's jits and just surrender to systemd. I also could just install Ubuntu but then I would be stuck with a Win 8 interface and have to prefix everything command line with "sudo". Or just installl Windows. I think you can still get an XP looking Shell.
But if I did either of those, it wouldn't be mine.
To: Figuroa:
"Unless you build it yourself, isn't most software "murky?" " Building it from the ground up was how I made my living, and I enjoyed my job very much.
And "No", it wasn't murky until large corporations decided to make it murky so they could make money on "support". |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2963 Location: Edge of marsh USA
|
Posted: Fri Oct 02, 2020 7:10 pm Post subject: |
|
|
If it's installed, /usr/bin/lxsession-logout gives a nice logout. /usr/bin/lxsession-logout is provided by lxsession. lxsession does not run during an OpenBox session. lxsession-logout is what is in the default OpenBox menu.
FYI - polkitd is started by LXDE, XFCE, and OpenBox, and none of them kill polkitd upon exiting. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1530 Location: South America
|
Posted: Fri Oct 02, 2020 9:05 pm Post subject: |
|
|
Tony0945 wrote: | I might have to scour the code to see where it uses polkit and patch it out. Yet Another Project
Or just accept polkit which I've managed to avoid for what? 14 years? |
It is used to build LXDE's authentication agent, lxpolkit, which links to library libpolkit-agent-1. However, based on this explanation, it would be the polkit daemon the one that communicates with lxpolkit when needed, so if nothing else you install wants to talk to polkitd, lxpolkit would be useless. I don't know how many things you'd have to do without to get to this scenario, though.
You coud try patching lxsession's build system to remove the search of libpolkit-agent-1 in the configure script, and to avoid building lxpolkit and install its autostart file (/etc/xdg/autostart/lxpolkit.desktop, I believe). And see what breaks |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Fri Oct 02, 2020 9:15 pm Post subject: |
|
|
Don't use the meta package, if you don't want polkit/session
This is what the lxde-meta package will pull in
Code: | RDEPEND=">=lxde-base/menu-cache-0.3.3
>=lxde-base/lxappearance-0.5.5
>=lxde-base/lxde-icon-theme-0.5.0
>=lxde-base/lxde-common-0.5.5
>=lxde-base/lxmenu-data-0.1.4
>=lxde-base/lxinput-0.3.2
>=lxde-base/lxpanel-0.5.10
>=lxde-base/lxrandr-0.1.2
>=lxde-base/lxsession-0.5.2
>=x11-libs/libfm-1.2.0
>=lxde-base/lxtask-0.1.6
>=lxde-base/lxterminal-0.1.11
media-gfx/gpicview
x11-misc/pcmanfm
x11-wm/openbox
>=x11-misc/obconf-2.0.3_p20111019" |
If you leave out lxsession then you shouldn't need polkit (pulled in by lxsession along with dbus) BUT you usually lose the use of shutdown/reboot buttons (easy enough to bypass)
I was running openbox and using lxpanel, lxtask, pcmanfm and gpicview, with no loss of functionality (My system stays up all the time, so I don't use shutdown/reboot from within X) _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1530 Location: South America
|
Posted: Fri Oct 02, 2020 9:37 pm Post subject: |
|
|
Tony0945 wrote: | Did I read this wrong? A multi-seat machine has multiple users on the same hardware.
I do sometimes have multiple sessions on one machine, but there is only one user (me!) using the hardware. | Most people's setup would be a single-seat, multi-session system because, as figueroa said, GNU/Linux is multi-user. The session abstraction that the Freedesktop.org people have come up with would be the GUI counterpart to TUI login sessions that you get with the login program, that are recorded in /var/run/utmp and shown by the who command.
Tony0945 wrote: | Supposedly polkit or elogind or systemd are needed for a multi-seat system. | systemd-logind or elogind (and ConsoleKit before them) are used to implement muti-session systems, regardless of how many seats there are. Polkit does authorization. |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2963 Location: Edge of marsh USA
|
Posted: Fri Oct 02, 2020 10:42 pm Post subject: |
|
|
Anon-E-moose wrote: | Don't use the meta package, if you don't want polkit/session
|
That may be simplistic and incomplete. OpenBox, without the session use flag and without the help of lxsession, starts polkitd. But, I don't know where the magic happens. Closing OpenBox, however, does not stop polkitd. But, if you kill it manually, it stays dead.
Code: | $ emerge -pv openbox
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] x11-wm/openbox-3.6.1-r3:3::gentoo USE="branding nls startup-notification svg -debug -imlib -session -static-libs -xdg" PYTHON_SINGLE_TARGET="python3_7 -python3_6 -python3_8" 0 KiB
|
_________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Fri Oct 02, 2020 10:48 pm Post subject: |
|
|
figueroa wrote: | Anon-E-moose wrote: | Don't use the meta package, if you don't want polkit/session
|
That may be simplistic and incomplete. OpenBox, without the session use flag and without the help of lxsession, starts polkitd. But, I don't know where the magic happens. |
How are you starting X, display manager or startx, what's your .xinitrc look like _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Etal Veteran
Joined: 15 Jul 2005 Posts: 1931
|
Posted: Fri Oct 02, 2020 10:51 pm Post subject: |
|
|
Polkit is dbus-activated.
Try Code: | $ gdbus introspect --system -d org.freedesktop.PolicyKit1 -o /zzz | and it should start up again. |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2963 Location: Edge of marsh USA
|
Posted: Sat Oct 03, 2020 1:52 am Post subject: |
|
|
Anon-E-moose wrote: |
How are you starting X, display manager or startx, what's your .xinitrc look like |
See my post from 10/1 at 6:48pm _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 2963 Location: Edge of marsh USA
|
Posted: Sat Oct 03, 2020 2:02 am Post subject: |
|
|
Etal wrote: | Polkit is dbus-activated.
Try Code: | $ gdbus introspect --system -d org.freedesktop.PolicyKit1 -o /zzz | and it should start up again. |
What does "-o zzz" do? Yes, that command starts polkit.
Why doesn't polkit end when the DE or WM exits? It's murky to me. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
Etal Veteran
Joined: 15 Jul 2005 Posts: 1931
|
Posted: Sat Oct 03, 2020 3:40 am Post subject: |
|
|
"/zzz" is nothing valid, I just needed some dbus path in order to call the command. Calling the service org.freedesktop.PolicyKit1 causes dbus to bring up polkit (/usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service)
The reason it doesn't exit with the DE is because it's a system service, it's not running as your user. UDisks is similar. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|