LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-09-2021, 12:34 PM   #1
Charadon
Member
 
Registered: Mar 2017
Location: Somewhere
Distribution: Slackware Current
Posts: 47

Rep: Reputation: 16
Question Getting Rootless Xorg Working in Slackware-current


I was wondering if anyone has actually gotten Rootless Xorg working in Slackware-current, now that it uses elogind? I've been trying to get it working, but so far i've been stumped. I've tried:

- Setting --enable-systemd-logind in x11's slackbuild.
- Removing the suid bit from /usr/bin/Xorg, /usr/libexec/Xorg.wrap, and /usr/libexec/Xorg.
- Creating a file called /etc/X11/Xwrapper.config and adding the lines:
Code:
needs_root_rights = no 
allowed_users = anybody
(Also tried it with needs_root_rights = yes)

- Adding elogind.so to /etc/pam.d/system-auth.
- Making sure dbus is loaded before startx is called via:
Code:
eval $(dbus-launch --sh-syntax)
- Adding user to the following groups: video, audio, input.

If anyone has any suggestions on how to get this working, i'm all ears. Also, it's not a neccesity that I got rootless xorg working, but it'd be really cool though, wouldn't it?
 
Old 12-09-2021, 02:48 PM   #2
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,783

Rep: Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460
Quote:
Originally Posted by Charadon View Post
I was wondering if anyone has actually gotten Rootless Xorg working in Slackware-current, now that it uses elogind?
Did you try this: https://www.linuxquestions.org/quest...3/#post6274841
 
2 members found this post helpful.
Old 12-09-2021, 02:50 PM   #3
truepatriot76
Member
 
Registered: Apr 2014
Location: California, USA
Distribution: slackware64-current
Posts: 231

Rep: Reputation: 195Reputation: 195
Sounds like a privilege issue. I use the adduser script when adding users, it's pretty handy in assigning the proper groups, then add the wheel group applicable.

https://docs.slackware.com/slackbook:users

Nevermind - (rootless).

Last edited by truepatriot76; 12-09-2021 at 02:56 PM. Reason: Nevermind - rootless
 
Old 12-09-2021, 04:22 PM   #4
Charadon
Member
 
Registered: Mar 2017
Location: Somewhere
Distribution: Slackware Current
Posts: 47

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Petri Kaukasoina View Post
Awesome, that actually worked! I hope that slackware adopts that change, as it doesn't really have any downsides from what I know, and only increases security, even if some would debate that it's marginal. Thanks for pointing me in the right direction =)
 
Old 12-09-2021, 06:15 PM   #5
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
Quote:
Originally Posted by Charadon View Post
Awesome, that actually worked!
I might test this out, but how do you know if it's worked or not?
 
Old 12-09-2021, 06:21 PM   #6
Charadon
Member
 
Registered: Mar 2017
Location: Somewhere
Distribution: Slackware Current
Posts: 47

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by drgibbon View Post
I might test this out, but how do you know if it's worked or not?
To see if it worked, you simply run
Code:
ps -af | grep X
And it should tell you what's running /usr/bin/X, and if it worked, it'll be your username.
Example:
Code:
charadon  3983 31076  0 19:20 pts/2    00:00:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox X
charadon 13619 13598  0 17:19 tty1     00:00:00 xinit /home/charadon/.xinitrc -- /usr/bin/X :0 vt1 -keeptty -auth /home/charadon/.serverauth.13598
charadon 13620 13619  2 17:19 tty1     00:03:23 /usr/bin/X :0 vt1 -keeptty -auth /home/charadon/.serverauth.13598

Last edited by Charadon; 12-10-2021 at 12:05 PM. Reason: Remove the part about adding user to groups.
 
Old 12-10-2021, 12:47 AM   #7
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,783

Rep: Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460
Quote:
Originally Posted by Charadon View Post
Just be sure to add yourself to the video and input group.
https://www.linuxquestions.org/quest...ml#post6275120
Why not?
https://www.linuxquestions.org/quest...ml#post6275119
 
2 members found this post helpful.
Old 12-10-2021, 12:04 PM   #8
Charadon
Member
 
Registered: Mar 2017
Location: Somewhere
Distribution: Slackware Current
Posts: 47

Original Poster
Rep: Reputation: 16
Right... forgot logind makes it so you don't need to be in the video/input group. I think that was my BSD experience peeking lol
 
Old 12-11-2021, 07:40 AM   #9
Thom1b
Member
 
Registered: Mar 2010
Location: France
Distribution: Slackware
Posts: 484

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Quote:
Originally Posted by Petri Kaukasoina View Post
It works perfectly for me too. Thanks a lot!
 
Old 12-11-2021, 09:24 AM   #10
glorsplitz
Senior Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 1,308

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
This is being asked to not allow root privilege for normal user to xorg?
 
Old 12-11-2021, 12:31 PM   #11
Charadon
Member
 
Registered: Mar 2017
Location: Somewhere
Distribution: Slackware Current
Posts: 47

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by glorsplitz View Post
This is being asked to not allow root privilege for normal user to xorg?
No, I was asking why Xorg wasn't defaulting to not escalting itself to root, since by default, Xorg tries to deescalate itself back to your user after it's done doing hardware things. And this is possible thanks to logind, which Slackware has now thanks to elogind. As it turned out, the xorg-server package in slackware was built without support for logind, which is why xorg was still running itself as root. Hopefully, they enable logind support in Xorg before Slackware 15 comes out
 
Old 12-12-2021, 08:05 AM   #12
Thom1b
Member
 
Registered: Mar 2010
Location: France
Distribution: Slackware
Posts: 484

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Quote:
Originally Posted by Thom1b View Post
It works perfectly for me too. Thanks a lot!
Finally, it doesn't work perfectly. Resuming after hibernation fails on one of my computer when X is not running by root.

Code:
[   82.124452] radeon 0000:00:01.0: scheduling IB failed (-12).
[   82.124454] [drm:radeon_vce_get_create_msg [radeon]] *ERROR* radeon: failed to schedule ib (-12).
[   82.124497] [drm:radeon_vce_ib_test [radeon]] *ERROR* radeon: failed to get create msg (-12).
[   82.124529] [drm:radeon_ib_ring_tests [radeon]] *ERROR* radeon: failed testing IB on ring 6 (-12).
[   82.124562] radeon 0000:00:01.0: scheduling IB failed (-12).
[   82.124563] [drm:radeon_vce_get_create_msg [radeon]] *ERROR* radeon: failed to schedule ib (-12).
[   82.124594] [drm:radeon_vce_ib_test [radeon]] *ERROR* radeon: failed to get create msg (-12).
[   82.124625] [drm:radeon_ib_ring_tests [radeon]] *ERROR* radeon: failed testing IB on ring 7 (-12).
[   82.332877] OOM killer enabled.
[   82.332879] Restarting tasks ... done.
[   82.335955] video LNXVIDEO:00: Restoring backlight state
[   82.336085] PM: hibernation: hibernation exit

Last edited by Thom1b; 12-12-2021 at 08:12 AM.
 
1 members found this post helpful.
Old 12-12-2021, 01:48 PM   #13
Charadon
Member
 
Registered: Mar 2017
Location: Somewhere
Distribution: Slackware Current
Posts: 47

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Thom1b View Post
Finally, it doesn't work perfectly. Resuming after hibernation fails on one of my computer when X is not running by root.

Code:
[   82.124452] radeon 0000:00:01.0: scheduling IB failed (-12).
[   82.124454] [drm:radeon_vce_get_create_msg [radeon]] *ERROR* radeon: failed to schedule ib (-12).
[   82.124497] [drm:radeon_vce_ib_test [radeon]] *ERROR* radeon: failed to get create msg (-12).
[   82.124529] [drm:radeon_ib_ring_tests [radeon]] *ERROR* radeon: failed testing IB on ring 6 (-12).
[   82.124562] radeon 0000:00:01.0: scheduling IB failed (-12).
[   82.124563] [drm:radeon_vce_get_create_msg [radeon]] *ERROR* radeon: failed to schedule ib (-12).
[   82.124594] [drm:radeon_vce_ib_test [radeon]] *ERROR* radeon: failed to get create msg (-12).
[   82.124625] [drm:radeon_ib_ring_tests [radeon]] *ERROR* radeon: failed testing IB on ring 7 (-12).
[   82.332877] OOM killer enabled.
[   82.332879] Restarting tasks ... done.
[   82.335955] video LNXVIDEO:00: Restoring backlight state
[   82.336085] PM: hibernation: hibernation exit
What GPU do you have? Because that seems like a driver issue. Seems to be the ancient radeon driver instead of amdgpu.
 
Old 12-12-2021, 02:53 PM   #14
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,186

Rep: Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378
So my question is - thats it? Is a rootless X working ? Also I wonder - is if feasible for Pat to implement it in Slackware down the line? I rather like the idea of rootless X too - primarily for hardening/securing Slackware.
 
2 members found this post helpful.
Old 12-12-2021, 03:05 PM   #15
Charadon
Member
 
Registered: Mar 2017
Location: Somewhere
Distribution: Slackware Current
Posts: 47

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Jeebizz View Post
So my question is - thats it? Is a rootless X working ? Also I wonder - is if feasible for Pat to implement it in Slackware down the line? I rather like the idea of rootless X too - primarily for hardening/securing Slackware.
For me, it's working perfectly. I've had zero issues. And I agree, I would like for this to atleast be an option.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How does rootless Podman work? LXer Syndicated Linux News 0 02-11-2019 04:30 PM
Xming access to CentOS 7.3 (remote desktop/rootless) DarkSmurf Linux - Newbie 1 07-24-2017 07:19 PM
LXer: Apple's fruitless rootless security broken by code that fits in a tweet LXer Syndicated Linux News 0 03-30-2016 04:24 PM
[SOLVED] X refuses to kick in. rootless related? kaz2100 Debian 1 12-14-2015 08:07 PM
Can one launch a rootless Xorg server in Xgl suger Linux - Software 2 05-13-2006 10:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration