Posts: 71
jtwdyp
Joined: 08 Apr 2012
#1
NEW startx permission problem after switching sources to testing for rolling release

I'll admit to being stubborn. But I insist on booting to runlevel 3 and then, when/if I'm ready for the GUI, I run startx as a user. OK I'll also admit to the fact that nine times out of ten, startx is the first thing I run after logging in.

That said, it used to work properly with my new antiX-15.1 installation.

I disabled slim so that I'd boot to runlevel 3.

Then after making Xorg setuid, my regular user could get openbox running via startx. I was about to start installing my usual applications when I realized that anything I installed BEFORE I switched my sources lists to the testing repos was likely going to need to be reinstalled by the apt-get dist-upgrade.

So I edited my sources... and ran

Code: Select all

apt-get update
apt-get dist-upgrade
These are the active repos:

Code: Select all

deb http://antix.daveserver.info/testing testing main nosystemd
deb http://ftp.us.debian.org/debian/ testing main contrib non-free
deb http://security.debian.org/ testing/updates main contrib non-free 
deb http://www.deb-multimedia.org testing main non-free
deb http://deb.opera.com/opera/ stable non-free
I note that I had already added the opera repo to the liveUSB because I wanted Opera 12.16, which the hard drive install kept. But the apt-get dist-upgrade tossed out because it needed gstreamer0.10-plugins-good, which is no longer installable

But that's for a different thread...

I wasn't surprised that I needed to make Xorg setuid again. But I was disappointed that even after I did so, I got:

user startx run wrote: X.Org X Server 1.18.3
Release Date: 2016-04-04
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.2-gnu-antix-sid.1-amd64-smp x86_64 antiX
Current Operating System: Linux MyAntix-5 4.3.0-antix.3-amd64-smp #3 SMP PREEMPT Thu Feb 4 17:50:57 EET 2016 x86_64
Kernel command line: root=LABEL=MyAntix-5 nosplash vga=normal
Build Date: 05 April 2016 05:00:18PM
xorg-server 2:1.18.3-1.0nosystemd1 (
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.debian.org/support"
linktext was:"http://www.debian.org/support"
====================================
)
Current version of pixman: 0.33.6
Before reporting problems, check
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://wiki.x.org"
linktext was:"http://wiki.x.org"
====================================

to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file:"/home/jtwdyp/.local/share/xorg/Xorg.0.log", Time: Sun Jun 26 15:33:03 2016
(==) Using config directory:"/etc/X11/xorg.conf.d"
(==) Using system config directory"/usr/share/X11/xorg.conf.d"
ional information.(EE) (EE) Server terminated with error (1). Closing log file./xorg/Xorg.0.log" for additxinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
So I quickly checked that root could startx. Root had no problem starting up openbox with startx. Then I tried again with my user account, only this time I used:

Code: Select all

sudo startx
Which sort of worked. Openbox started up using my configuration files {not root's} and everything seemed to work just fine. Until I noticed that everything I did was working with sudo permissions.

Which I tested by opening a regular roxterm, going to /root where my regular user was able to chown root's .bashrc to belong to another user. Of course I chowned it right back. But if the sudo permissions are going to apply to everything I do, it's unsafe to run X that way...


Does anybody know what (besides Xorg) could be refusing ordinary users to connect to the X server with testing repos configured, that doesn't care when using stable????
Posts: 71
jtwdyp
Joined: 08 Apr 2012
#2
On a guess, I tried also making xinit setuid...

Works now!
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#3
thanks for posting the update with solution!
Posts: 71
jtwdyp
Joined: 08 Apr 2012
#4
dolphin_oracle wrote:thanks for posting the update with solution!
Well if I was gonna mark it solved... I thought the solution was called for...

I still don't really know what caused the problem, I've never had to touch xinit before. But while I was buzy scratching my head, I focused on this line from that terminal output:

Code: Select all

xinit: unable to connect to X server: Connection refused
And suddenly it hit me. it was xinit that was being refused. So while I doubted it could be so easy I gave it a try. Maybe someday, somebody else who wants startx to work will find my post useful. __{{emoticon}}__