You are not logged in.

#1 2023-12-27 18:35:31

jamtat
Member
Registered: 2008-03-13
Posts: 229

startx/.xinitrc no longer works but xinit /path/to/dm does

So I got up the other morning to my jwm desktop being unresponsive. Perhaps subsequent to a pacman -Syu I did on Monday. The system has no login manager and I've always started X via startx and .xinitrc. There have been no recent changes to that file, btw. Here is the content of .xinitrc

#!/bin/sh
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
     [ -x "$f" ] && . "$f"
   done
   unset f
fi
export EDITOR="$(if [[ -n $DISPLAY ]]; then echo 'nano'; else echo 'nano'; fi)"
remind -z /home/user/sys-maint.rem &
urxvtd -q -o -f & 
exec /usr/bin/jwm

I killed the unresponsive gui using ctl-alt-del (I have that specified in  /etc/X11/xorg.conf.d/00-keyboard.conf) and tried restarting it by issuing startx. That got me a black, blank display. I looked at X logs but could not find any show-stopping errors, just a couple of warnings. I continued trying to determine where the problem might lie by running commands located in .xinitrc from the command line and they all seemed to run without problems.

Finally, I decided to just issue xinit /usr/bin/jwm. Lo and behold, that got me a working display with the jwm dm desktop I have configured in .jwmrc.

So I'm seeking suggestions for troubleshooting why startx no longer works (meaning I get a blank black display when I run that command). Input will be appreciated. Thanks

Offline

#2 2023-12-27 18:44:54

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: startx/.xinitrc no longer works but xinit /path/to/dm does

jamtat wrote:

I looked at X logs but could not find any show-stopping errors, just a couple of warnings.

Share the full log(s) here, you might have missed something.

Does this work:

startx /usr/bin/jwm

If it does then check

stat ~/.xinitrc

EDIT: and what's that EDITOR check about? And why are you using a bash test with a /bin/sh shebang? Arch links /bin/sh to bash by default but it's still irritating me.

Last edited by Head_on_a_Stick (2023-12-27 18:46:11)


Jin, Jîyan, Azadî

Offline

#3 2023-12-27 21:30:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,573

Re: startx/.xinitrc no longer works but xinit /path/to/dm does

The shebang in xinitrc is meaningless, but the "export EDITOR" line can cause aneurisms when looking at it…

Start with

#!/bin/sh
# [[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
     [ -x "$f" ] && . "$f"
   done
   unset f
fi
### like wtf, seriously # export EDITOR="$(if [[ -n $DISPLAY ]]; then echo 'nano'; else echo 'nano'; fi)"
# export EDITOR=nano
# remind -z /home/user/sys-maint.rem &
# urxvtd -q -o -f & 
exec /usr/bin/jwm

and run startx. If that works uncomment lines one by one until startx fails.

Offline

#4 2023-12-27 21:45:44

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,480
Website

Re: startx/.xinitrc no longer works but xinit /path/to/dm does

Even if you wanted EDITOR set conditionally:

[[ -n "$DISPLAY" ]] && export EDITOR=nano || export EDITOR=nanu-nanu

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2023-12-27 21:49:04

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,573

Re: startx/.xinitrc no longer works but xinit /path/to/dm does

Though in this particular case the test for $DISPLAY is kinda moot.
And for a GUI environment the correct line is oc

export EDITOR=sqriptor # ;P

Offline

#6 2023-12-28 10:39:39

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: startx/.xinitrc no longer works but xinit /path/to/dm does

You're all wrong:

~$ grep '^EDITOR' /etc/environment
EDITOR=ed
~$

tongue

(Sorry OP)


Jin, Jîyan, Azadî

Offline

Board footer

Powered by FluxBB