You are not logged in.

#1 2015-08-04 05:01:50

zahn01
Member
Registered: 2015-06-07
Posts: 54

[Solved] xserver broken when using .xinitrc to login, systemd

This post has been solved. Please see reply four for a detailed solution, courtesy of the first respondent.

In the old days of Arch a few years ago before systemd, typing startx may or may not have worked with respect to getting a desktop to appear. I had more than one desktop. All I had to type was something vaguely like quote, "exec ck-xfce-session" or "startkde." the bottom line is that is no longer appears to be true, not  without generating errors. One account won't start, nothing flagrantly noteworthy in the log.old. Apparently, If I want an openbox session, I have to first use vi to comment out startkde. Then do a reboot, use "startx" or the whole thing fails. x won't start "can't...establish...sockets. Check...x already running. Using top to find and kill any xorg or xinit does nothing, just respawns. Then nothing starts because x is allegedly still running.

To go from kde to openbox and vice-versa requires editing .xinitrc commenting out or the other and then rebooting. Don't pick the wrong one or x will generate the aforementioned errors and will not start unless everything is restored from a backup, quite annoying.

Here is the output the log old since it would not create the new one. Incidentally the log is "chuck full in the working account and only the old log is blank. For clarity's sake, obviously I refer to the "/home/localuser/.local/share/xorg/Xorg.0.logs" old and current.

[   120.566] _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
[   120.567] _XSERVTransMakeAllCOTSServerListeners: server already running
[   120.567] (EE) 
Fatal server error:
[   120.567] (EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 
[   120.568] (EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
[   120.568] (EE) Please also check the log file at "/home/localuser/.local/share/xorg/Xorg.0.log" for additional information.
[   120.568] (EE) 
[   120.569] (EE) Server terminated with error (1). Closing log file.

Last edited by zahn01 (2015-08-08 03:14:15)

Offline

#2 2015-08-04 05:05:54

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] xserver broken when using .xinitrc to login, systemd

Offline

#3 2015-08-05 05:04:08

zahn01
Member
Registered: 2015-06-07
Posts: 54

Re: [Solved] xserver broken when using .xinitrc to login, systemd

I apologize for responding 24 hours later, but I did not have time to try the above link and it's now the middle of the night here. I hope to have time to apply the above links in the next day or two. It looks to be a very simple two step process, but I make no assumptions. I'll reply with results, whatever they maybe.  I recognize the user name karol from throughout the forums since about late 2009 and beyond. Thanks for the link.

Offline

#4 2015-08-08 02:30:23

zahn01
Member
Registered: 2015-06-07
Posts: 54

Re: [Solved] xserver broken when using .xinitrc to login, systemd

This works like a charm. Thanks, karol

For those who are new, here is what I did:

First I saved the sample .xinitrc (from the link in provided by karol reply #1) as two files “~/Xinitrc1” and “~/Xinitrc-Ref”, respectively. The “~/Xinitrc-Ref” file contained more entries than I need, but I saved it along with the url for future reference.

Next I edited “~/Xinitrc1.” Here edit means I removed unneeded entries from “~/Xinitrc1,” leaving only "needed entries." Then I copied the entries from my old (original “~/.xinitrc” file to “~/Xinitrc1, a few lines below the "needed entries." ensuring that the copied entries were commented out. This was done for backup purposes. Then I saved "Xinitrc1" as ~/.xinitrc

The final step according to the wiki is to :

 $ cp cp -v /etc/X11/xinit/xserverrc ~/localuser/ 

Note 1 : If one is doing this for multiple accounts when logged in as root, please be mindful chown, chgrp and chmod. chown and chgrp are the same for ~/.xintrc with chmod being750 (on my system) and for ~/.xserverrc it's 644 on my system. 

Note 2 : the following, from the wiki, did not function for me. I assume that it applies to “init scripts,” pre systemd.

 $ xinit
$ xinit gnome
$ xinit kde
$ xinit wmaker 

Note: The strikethough indicates what code did not work for me, despite the fact that it came from the wiki:

$ startx ~/.xinitrc kde
$ startx ~/.xinitrc openbox

What does functions for me (serves the purpose, works for me, etc)  is the following mod.

$ startx ~/.xinitrc openbox-session
$ startx ~/.xinitrc startkde 

I hope this helps someone.

Last edited by zahn01 (2015-08-08 04:47:02)

Offline

Board footer

Powered by FluxBB