You are not logged in.

#1 2023-10-15 15:45:01

wzhxycl
Member
Registered: 2023-02-06
Posts: 23

Problems with gnome launch

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

#2 2023-10-15 16:16:10

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

Re: Problems with gnome launch

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; fi

Edit: code tags.

Last edited by seth (2023-10-15 16:16:33)

Online

#3 2023-10-15 16:29:41

wzhxycl
Member
Registered: 2023-02-06
Posts: 23

Re: Problems with gnome launch

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

#4 2023-10-15 18:36:09

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

Re: Problems with gnome launch

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.

Online

Board footer

Powered by FluxBB