You are not logged in.
(Not sure if this is in any way related to Ctrl+Alt+Fx and back to X11 session shows black screen.)
Until recently, I had
if [ -d "$xinitdir"/xinitrc.d ] ; then
for f in "$xinitdir/xinitrc.d"/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
exec gnome-session
in ~mymom/.xinitrc and
[[ -f ~/.bashrc ]] && . ~/.bashrc
[[ ! $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
in ~mymom/.bash_profile, and she could power on the computer, log in with her credentials from VT1, and Gnome would welcome her.
Since one day (after some upgrade I've made from remote, presumably) she couldn't start it anymore. (*)
So I tried cosmic as an alternative to Gnome, but wherease if I log in and run start-cosmic it starts and works (at least as far as me admiring the background and logging out), if instead I put
exec start-cosmic
in ~mymom/.xinitrc and then login with her credentials, it doesn't start, in the sense that I just see a black screen.
---
(*) I've asked on libera's archlinux channel, and I've come to know that Gnome doesn't use x11 anymore, but wayland (since mid Sept 2025?). I've been told that, if I want things to work easily, starting Gnome from VT is not the way to go, but I should use gdm instead, but I'd see a black screen when starting xmonad for my user from the login manger that comes with gdm, so I've decided to see what else is out there in DE/WM land that could be nice for mom, and I chose to try cosmic.
Offline
Cosmic uses Wayland, of course it doesn't run from startx.
Offline
Oh, right.
But shouldn't it work if I put
start-cosmic
in .bash_profile?
Offline
Oh, it works with the ampersand after that.
Is this the way?
Nope. At least, starting it like that, I don't see buttons working, in the sense that they visually react, but don't really result in anything, e.g. logging out doesn't work, opening a terminal doesn't work, opening file manager doesn't work.
Having
exec cosmic-session
in ~/.bash_profile seems to do the job, unless I'm celebrating too early again.
Is this the way?
Last edited by Enrico1989 (Yesterday 18:26:37)
Offline
Maybe, but you should absolutely guard that behind something that verifies that you are logging in from a VT terminal and not try to start cosmic again each time a login shell gets opened.
Offline
Maybe, but you should absolutely guard that behind something that verifies that you are logging in from a VT terminal and not try to start cosmic again each time a login shell gets opened.
You mean something like this, right?
[[ ! $DISPLAY && ( $XDG_VTNR == 1 || $XDG_VTNR == 2 ) ]] && exec cosmic-session
Offline
yep, though DISPLAY is not entierly guaranteed in theory anymore on a wayland session (in practice if you have xorg-xwayland installed and intended to be used, it will most likely be defined within a running session's scope, so same difference).
Offline