You are not logged in.
Pages: 1
Hello. I have this problem: when starting gnome from a bash script a lot of gnome sessions are started, which leads to no sessions being started.
I have this line in my .bash_profile file
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]] && if $(lsusb|grep mouse > /dev/null) ; then startplasma-wayland; else XDG_SESSION_TYPE=wayland dbus-run-session gnome-session; fi
When mouse is not connected nothing happens, blinks _ and that's it. through another tty in htop you can see a lot of running gnome sessions.
Offline
Can you run "XDG_SESSION_TYPE=wayland dbus-run-session gnome-session" manually from the login?
Chances are that your gnome session ends up sourcing .bash_profile thus causing a recursion - either export DISPLAY or a special safe-guard
Also "[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]] " isn't proper syntax at all?
[ -z $GNOME_INCOMING ] && [ -z $DISPLAY ] && [ $XDG_VTNR -eq 1 ] && if $(lsusb|grep mouse > /dev/null) ; then startplasma-wayland; else GNOME_INCOMING=1 XDG_SESSION_TYPE=wayland dbus-run-session gnome-session; fiEdit: code tags.
Last edited by seth (2023-10-15 16:16:33)
Offline
Sorry. I've already fixed it. I've added another condition where I check if XDG_SESSION_TYPE is equal to wayland. I have another problem. I'd be glad if you could help me when I create another post.
Offline
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline
Pages: 1