You are not logged in.
After one update that broke arch linux I suddenly could not start xmonad. The issue was a haskell thing. I uninstalled the official repository version of xmonad and built it from source. I've since moved away from lightdm and I now use sddm and I have it configured pretty nicely already with the sddm-slice theme. I am getting the same issue, still, though.
So, here is the issue in detail:
When I boot up, sddm starts and it looks and acts normal. When I log in, though, the screen goes black like it is starting the session, then I get a blinking cursor and get kicked back into sddm. I can switch tty's and startx, and xmonad starts. It's also worth noting that I am using the aur package xinitrc-xsession which starts a session and executes ~/.xinitrc. .xinitrc is executable.
Here is the journal entry. You can see the session created and then immediately closed after it is setup.
[EDIT:
I've since tried a couple things so I'll update here until I find the issue.
I made sure that ~/.xinitrc is executable for all users, in case that were some kind of bug with xinitrc-xsession.
I moved my settings.conf from /usr/lib/sddm/sddm.conf.d/ to /etc/sddm.conf.d/ in case running the config for the global system made ~/.xinitrc ambiguous (if $HOME is not set)
I tried this but every time I log in .Xauthority is recreated. Is this what they meant?
]
Let me know if you have any ideas!
Last edited by TheJaava (2021-11-02 14:51:14)
Offline
Please post the xinitrc.
I'd try to make it "exec xterm" and start xmonad from there - which will likely get you some errors instead of the WM?
Offline
My xinitrc is bare bones, because I wasn't using it before. As of right now it contains:
#!/bin/bash
exec st
exec xmonad-x86_64-linuxGood call on the terminal line, because now it logs me in as expected with a st window. xmonad doesn't start, though. When I run xmonad-x86_64-linux from the st window it starts, though.
[Edit: Adding a & after "exec st" so that "exec xmonad-x86_64-linux" is run gets me the original issue with no st window to read errors from.]
Last edited by TheJaava (2021-11-02 14:01:11)
Offline
[Edit: Adding a & after "exec st" so that "exec xmonad-x86_64-linux" is run gets me the original issue with no st window to read errors from.]
Yeah, that's not how it works ![]()
xmonad doesn't start, though. When I run xmonad-x86_64-linux from the st window it starts, though.
What was the plan here?
st -e xmonad-x86_64-linuxwill run st and have it execute xmonad-x86_64-linux
Since xmonad-x86_64-linux runs out of st (resp. the interactive shell inside) but not from the xinitrc, I assume it's some environment variable.
You could add "printenv > /tmp/xinitrc.env" before the "exec st" call and compare that w/ the output of "printenv" inside the shell run by st.
Offline
What was the plan here?
Good question lol
st -e xmonad-x86_64-linuxwill run st and have it execute xmonad-x86_64-linux
That's better ![]()
Since xmonad-x86_64-linux runs out of st (resp. the interactive shell inside) but not from the xinitrc, I assume it's some environment variable.
You could add "printenv > /tmp/xinitrc.env" before the "exec st" call and compare that w/ the output of "printenv" inside the shell run by st.
xmonad-x86_64-linux is a executable in ~/.xmonad/ (which is in $PATH)
Offline
exec st -e xmonad-x86_64-linuxThis gives me a black screen with a mouse cursor that I can move around. I cannot do anything.
When I run startx from tty it works exactly as expected running xmonad in a terminal and if i close the terminal, X exits.
Offline
xmonad-x86_64-linux is a executable in ~/.xmonad/ (which is in $PATH)
But is it? Where is this added to the PATH variable? I'm guessing this is added from a shellrc file which would explain all your symptoms. In any case, the above-mentioned environment variable test would remove a lot of guess work.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I'm pretty sure I found the issue. The environment variables are different. /tmp/xinitrc.env does not have /home/nick/.xmonad/ in the path. So I can fix this by just changing .xinitrc to ~/.xmonad/xmonad-x86_64-linux.
But do you think you could help me understand why my path variable is not accurate at this stage?
Offline
TheJaava wrote:xmonad-x86_64-linux is a executable in ~/.xmonad/ (which is in $PATH)
But is it? Where is this added to the PATH variable? I'm guessing this is added from a shellrc file which would explain all your symptoms. In any case, the above-mentioned environment variable test would remove a lot of guess work.
Yes, you were exactly right.
Offline
As Trilby pointed out, you're probably exorting that PATH from your interactive shell rc, but that is not what runs the xinitrc.
You can either export the path there or in a more general profile, eg. /etc/profile*, ~/.profile or ~/.xprofile - https://wiki.archlinux.org/title/Environment_variables
Offline
Xmonad starts now with only "exec ~/.xmonad/xmonad-x86_64-linux" but for some reason it does not have xmobar. Anything jump out to you for that? It always worked before.......
Offline
As Trilby pointed out, you're probably exorting that PATH from your interactive shell rc, but that is not what runs the xinitrc.
You can either export the path there or in a more general profile, eg. /etc/profile*, ~/.profile or ~/.xprofile - https://wiki.archlinux.org/title/Environment_variables
Ok that makes sense. Thank you.
Offline
type xmobarOffline
type xmobar
xmobar is started by xmonad. Not sure what stopped it from working, but I moved my relevant environment variables from .bashrc to .xprofile and then I sourced .xprofile before starting xmonad. Now xmobar starts as well. It looks like everything is working properly. I'm going to mark this as solved. Thanks for your help again!
Offline
lmg: "type xmobar" would have said ~/.xmonad/xmobar?
That's why.
Offline
lmg: "type xmobar" would have said ~/.xmonad/xmobar?
That's why.
Oh, I guess that makes sense, because in xmonad the command is just "xmobar" and before (instead of sourcing .xprofile containing the environment variables) my fix was just to use the whole path of xmonad. Thank you. I would not have even thought of that if you didn't say something.
Offline