You are not logged in.

#1 2015-06-01 13:44:08

stiler1st
Member
Registered: 2015-06-01
Posts: 17

Can't boot in after editing /etc/X11/xinit/xinitrc

I wanted to install DWM. I followed this tutorial. I've skipped the part about Xorg, bc I know it have been already installed in the past. I started with step about installing DWM. The desktop stopped booting after editing xinitrc, as described in the tutorial above I commented special lines and added exec dwm. So, it didn't boot. I pressed Ctrl+Alt+F2 and edited the xinitrc back, i.e. uncommented lines and removed "exec dwm" line. Now my PC freezes at logging stage(I can freely press Ctrl+Alt+F2 BTW):

My problem

My xinitrc is looking like this right now:

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then






    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then






    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
done
unset f
fi

twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login

Last edited by stiler1st (2015-06-01 14:43:57)

Offline

#2 2015-06-01 14:17:07

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

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

Please use thumbnails instead of full-screen pictures and read the wiki instead of some other tutorial. Post the text only: https://wiki.archlinux.org/index.php/Fo … s_and_code

Offline

#3 2015-06-01 14:24:08

stiler1st
Member
Registered: 2015-06-01
Posts: 17

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

Sorry, I'll replace it within few minutes.

karol wrote:

Please use thumbnails instead of full-screen pictures and read the wiki instead of some other tutorial. Post the text only: https://wiki.archlinux.org/index.php/Fo … s_and_code

Offline

#4 2015-06-01 19:08:53

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

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

stiler1st wrote:

That guide is utterly useless.

The first command it lists can potentially break your system and is specifically prohibited in the ArchWiki pacman page:
https://wiki.archlinux.org/index.php/Pa … nsupported

The correct procedure is to copy /etc/X11/xinit/xinitrc to ~/.xinitrc and edit to taste.
https://wiki.archlinux.org/index.php/Xi … figuration

Your "guide" then advises creating an xorg configuration file with hwd -- remove the file this has created and see if your desktop boots then.

xorg.conf files haven't been needed in most systems for quite a while.

The "guide" is from 2008!

In Arch terms this is antediluvian.

Do yourself a favour and follow this guide instead:
https://wiki.archlinux.org/index.php/Dwm

BTW, which guide did you follow when installing Arch?


Jin, Jîyan, Azadî

Offline

#5 2015-06-01 22:31:41

stiler1st
Member
Registered: 2015-06-01
Posts: 17

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

Though, I didn't use the first command nor the "hwd" command, I started with "dwm" installation. My biggest mistake is that I didn't try more than once after I failed with official guide, and start seeking easy ways instead of fixing build problems. Agree, this is my fault. I will never ignore official guides anymore since now.

You've asked about Arch installation. I was following the official guide, it's ok. What about my problem, since there is no "xorg.conf" I didn't delete it. I can try to use official guide to install dwm, but at this moment I just want to fix my problem and successfully log in. If you see any solution here it would be amazing.

Thanks for the pointing out that we must use only official guides, it would be a big lesson for me.

Do you have any minds how we can fix this?

Last edited by stiler1st (2015-06-01 22:32:12)

Offline

#6 2015-06-01 23:58:50

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

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

Stiler1st, I'm glad you have learned from that - nothing wrong with mistakes as long as we do learn.  It seems the only real problem (at least described in this thread so far) is that you've edited the systemwide xinitrc rather than creating one for your user (as described in the wiki).  You can just reinstall xorg-xinit or re-extract the original file from that package in your cache (the former is easier).  This will undo everything you've told us about in this thread.

EDIT: scratch that, this will not work as that is a BACKUP file in pacman terms.  But unless there is a simpler way I'm not thinking of, you can just do the following:

pacman -Rn xorg-xinit
pacman -S xorg-xinit

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

Offline

#7 2015-06-02 02:37:17

stiler1st
Member
Registered: 2015-06-01
Posts: 17

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

Unfortunately, It didn't help. Maybe "xinitrc" has an effect on other files? i.e after editing it there appears some changes in other files, configs, settings. I think so, because I've just commented lines and add one, then did a reverse steps - it had to be ok. But we can see that it's not.

Offline

#8 2015-06-02 03:01:32

scryan
Member
Registered: 2014-07-01
Posts: 50

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

Your using a display manager to log in arent you?
If I am not mistaken, and your not using "startx" to launch your graphical environment.... .xinitrc shouldnt even be read?
You must have done something else, or its an unrelated problem?
Did you install DWM with pacman -Sy DWM (as the guide does for xorg?)

If it freezes X, but you can still switch to other terminals... Maybe its time to start digging in logs?

Offline

#9 2015-06-02 06:55:21

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

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

scryan wrote:

Maybe its time to start digging in logs?

+1

@OP: What is that display manager?

Did you use `pacman -Sy $package`?

If so, you need to run `pacman -Syu` as soon as possible (read the news page first!).

In your OP you said you were following the linked guide, now you say you didn't follow some of it -- please explicitly list all the steps you have taken.


Jin, Jîyan, Azadî

Offline

#10 2015-06-02 07:39:56

stiler1st
Member
Registered: 2015-06-01
Posts: 17

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

1) I'm using SDDM
2) I'm sorry if i'm messing definitions, but I'm using "autostart" in ~/.config/openbox/ to start some programs.
3) Nope. I didn't use "pacman -Sy" only "-S".
4) About logs. I'm ready, just tell me what should I show and I'll post it here.

scryan wrote:

Your using a display manager to log in arent you?
If I am not mistaken, and your not using "startx" to launch your graphical environment.... .xinitrc shouldnt even be read?
You must have done something else, or its an unrelated problem?
Did you install DWM with pacman -Sy DWM (as the guide does for xorg?)

If it freezes X, but you can still switch to other terminals... Maybe its time to start digging in logs?

Offline

#11 2015-06-02 07:46:21

stiler1st
Member
Registered: 2015-06-01
Posts: 17

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

Head_on_a_Stick wrote:

In your OP you said you were following the linked guide, now you say you didn't follow some of it -- please explicitly list all the steps you have taken.

Hm, I've described this part:

stiler1st wrote:

I've skipped the part about Xorg, I started with step about installing DWM.

But you're right, I should describe this part more clearly. What I've done:
1) sudo pacman -S dwm
2) cd /etc/X11/xinit
3) sudo nano xinitrc
4) I commented lines like this:

#twm &
#xclock -geometry 50x50-1+1 &
#xterm -geometry 80x50+494+51 &
#xterm -geometry 80x20+494-0 &
#exec xterm -geometry 80x66+0+0 -name login
exec dwm &

5) sudo reboot

Boom.. I can't log in.

Offline

#12 2015-06-02 07:49:22

stiler1st
Member
Registered: 2015-06-01
Posts: 17

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

scryan wrote:

You must have done something else, or its an unrelated problem?

Hm, I remember how I failed when put "dwm &" line instead of "exec dwm &". It happened after I wrote incorrect line. Maybe it has something to do with my problem. Actually, I don't think so, bc I edited it to correct "exec dwm &".

Offline

#13 2015-06-02 08:08:34

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,737
Website

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

The correct line would be without the ampersand. Why do you think backgrounding your exec line is a good idea?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#14 2015-06-02 08:35:05

stiler1st
Member
Registered: 2015-06-01
Posts: 17

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

I tried both. It didn't work. But now I just want to log in. I will install DWM after using official guide.

WorMzy wrote:

The correct line would be without the ampersand. Why do you think backgrounding your exec line is a good idea?

Offline

#15 2015-06-02 09:21:59

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

As trilby said, replace your system wide xinitrc with the default system wide xinitrc. Try also restoring SDDM's config. Next time you want to edit that file copy it to ~/.xinitrc and edit it just for your user.

If the problem persists after restoring xinitrc, your problem is elsewhere.

Offline

#16 2015-06-02 09:58:29

stiler1st
Member
Registered: 2015-06-01
Posts: 17

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

Wow, I've managed to start my desktop using "openbox-session" command. Is it supposed to be? Does it give us a forward step or not?
My problem

EDIT: I have to add that "openbox-session" runs only if I write

$ xinit -- :1 -nolisten tcp vt$XDG_VTNR

command which starts some screen:
My problem
and in this screen I write "openbox-session" command.

Without "xinit -- :1 -nolisten tcp vt$XDG_VTNR" it gives me following error:

Failed to open the display from the DISPLAY environment variable.

ALSO, I have to sorry, bc I miss something - I forgot about "exec dwm &" command in "~/.config/openbox/autostart". I catched this omission when looked at the log of " openbox-session". Of course, I've erased it, but it's still freezing at log stage.

Last edited by stiler1st (2015-06-02 10:58:48)

Offline

#17 2015-06-02 11:37:39

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

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

stiler1st wrote:

2) I'm sorry if i'm messing definitions, but I'm using "autostart" in ~/.config/openbox/ to start some programs.

What?  Why?  What is in that file?  That is for openbox only, and only when invoked as "openbox-session" not as "openbox".  You are trying to run dwm, not openbox ...

stiler1st wrote:

ALSO, I have to sorry, bc I miss something - I forgot about "exec dwm &" command in "~/.config/openbox/autostart". I catched this omission when looked at the log of " openbox-session". Of course, I've erased it, but it's still freezing at log stage.

Of course it is.  This is completely the wrong place to put this command.  Read (and follow) the wiki guide on running X.  All your symptoms now make perfect sense.

Please post your *actual* xinitrc from your users home directory:

cat ~/.xinitrc

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

Offline

#18 2015-06-02 12:42:28

stiler1st
Member
Registered: 2015-06-01
Posts: 17

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

As we already know, I don't have xinitrc in home directory. Because I did a mistake at the beginning by editing xinitrc in the root directory.

Offline

#19 2015-06-02 15:42:06

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

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

And did you originally launch openbox from the systemwide xinitrc?  If not, how did you ever start openbox?  Does you display manager use it's own session files or does it use xinit(rc)?

EDIT: I'm sorry, I've just been rereading this thread - it is a complete mess of assumptions and missteps.  I don't even know where to start.  Some of the time you are using a display manager (SDDM) which doesn't use xinitrc, so your edits to xinitrc are irrelevant.  Some times you launch X with xinit, in which case the systemwide xinitrc is used because you still haven't created one for your user - then, assuming this was after you reverted your edits, you would have been in twm with some xterms (is this true) from which you launched an openbox-session which would start openbox which may or may not have tried to start dwm from it's autostart file depending on whether that is still in the autostart file.

My only advice: start from the beginning.  Read the wiki.  And if you need more help, clarify the current state of everything as you have a handful of conflicting approaches listed in this thread with many edits of many files - we don't know what state your system is currently in.


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

Offline

#20 2015-06-02 16:35:03

stiler1st
Member
Registered: 2015-06-01
Posts: 17

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

I think you're right. 99% that my problem is about using different commands which were not supposed to be used in different configurations, etc. I should get rid of mess in my head and read, read, read. Then I want to reinstall my Arch wink

Trilby wrote:

And did you originally launch openbox from the systemwide xinitrc?  If not, how did you ever start openbox?  Does you display manager use it's own session files or does it use xinit(rc)?

EDIT: I'm sorry, I've just been rereading this thread - it is a complete mess of assumptions and missteps.  I don't even know where to start.  Some of the time you are using a display manager (SDDM) which doesn't use xinitrc, so your edits to xinitrc are irrelevant.  Some times you launch X with xinit, in which case the systemwide xinitrc is used because you still haven't created one for your user - then, assuming this was after you reverted your edits, you would have been in twm with some xterms (is this true) from which you launched an openbox-session which would start openbox which may or may not have tried to start dwm from it's autostart file depending on whether that is still in the autostart file.

My only advice: start from the beginning.  Read the wiki.  And if you need more help, clarify the current state of everything as you have a handful of conflicting approaches listed in this thread with many edits of many files - we don't know what state your system is currently in.

Offline

#21 2015-06-02 17:13:23

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

Re: Can't boot in after editing /etc/X11/xinit/xinitrc

There should be no need to reinstall - though another run through can be a good way to be sure you know what is going on.

If you do reinstall, try not to jump ahead.  We can all have that tendency to just want to get a quick fix.  But quick fixes rarely work (and are never quick) in archlinux.  Archlinux is the tortoise, not the hare.  But if you go step by step through building your system, you might look back and be surprised at how quick and easy it really was.

After a base install, get X running with no display manager - if you're new to all this, I'd stick strictly to the guide in the wiki that has you install and test TWM.  TWM isn't very nice itself, but it is a great check that everything is right at that stage before you try to move on.  Then, continue step by step in the wiki guides and get your own xinitrc set up.

Only then should you consider trying display managers - I'd don't know that they serve any purpose at all, but if they do, it is to *augment* the basic functioning of X and starting X.  So first get the basics, then build on them with a display manager if you want.


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

Offline

Board footer

Powered by FluxBB