Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Trying to migrate from x11 to wayland on plasma
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
plasmid
n00b
n00b


Joined: 02 May 2005
Posts: 56

PostPosted: Sat Jun 22, 2024 2:00 pm    Post subject: Trying to migrate from x11 to wayland on plasma Reply with quote

I am trying to move towards wayland in plasma but have been running into monitor/display issues. I am currently running plasma 5 on X11 and I launch plasma from the console and have two monitors. With this setup, KDE correctly sees both monitors and their various resolutions. I tried to use wayland by changing my .xinitrc to "dbus-launch --exit-with-session startplasma-wayland" and plasma starts, however, the display situation makes no sense. The desktop is confined to one monitor only with relatively low resolution however the mouse can move between both monitors and has an X shape that I associate with x.org. Also, when I go to settings to see my displays, the only monitor listed is "X11". It seems like I am in some weird combination of x and wayland. Any clues as to what I might be doing wrong?
Back to top
View user's profile Send private message
ormorph
n00b
n00b


Joined: 18 Jun 2024
Posts: 27

PostPosted: Sat Jun 22, 2024 6:30 pm    Post subject: Reply with quote

The ~/.xinitrc file is used for X11 only. Just run the command in the console:
Code:
$ dbus-launch --exit-with-session startplasma-wayland

Next, you need to think about where you can add it to run when you enter your login; for a bash session, you can add it to ~/.bash_profile.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22681

PostPosted: Sat Jun 22, 2024 6:44 pm    Post subject: Reply with quote

Be careful about putting this in ~/.bash_profile. That is normally run by all login shells, including those started via ssh or in a terminal emulator. Starting a graphical display should only be done if the user logs in via the text console on the system.
Back to top
View user's profile Send private message
ormorph
n00b
n00b


Joined: 18 Jun 2024
Posts: 27

PostPosted: Sat Jun 22, 2024 6:51 pm    Post subject: Reply with quote

Hu wrote:
Be careful about putting this in ~/.bash_profile. That is normally run by all login shells, including those started via ssh or in a terminal emulator. Starting a graphical display should only be done if the user logs in via the text console on the system.

It's easy to get around this by simply adding a condition and processing the output of the tty command so that KDE only starts on a specific tty session. And so sddm works fine with Wayland.
The .xinitrc file is usually launched when the startx command is run, which is executed in the console. And there are also some login managers that use .xinitrc.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22681

PostPosted: Sat Jun 22, 2024 7:04 pm    Post subject: Reply with quote

Yes, those are possible solutions, but your earlier post encouraged the user to add the simple command to ~/.bash_profile with no mention of the risks, nor any suggestion of adding any of those guards.
Back to top
View user's profile Send private message
ormorph
n00b
n00b


Joined: 18 Jun 2024
Posts: 27

PostPosted: Sat Jun 22, 2024 7:15 pm    Post subject: Reply with quote

Hu wrote:
Yes, those are possible solutions, but your earlier post encouraged the user to add the simple command to ~/.bash_profile with no mention of the risks, nor any suggestion of adding any of those guards.

Yes it's my mistake. Then it will be correct:
Code:
if [ "$(tty)" = "/dev/tty3" ] ; then
      dbus-launch --exit-with-session startplasma-wayland
fi
Back to top
View user's profile Send private message
plasmid
n00b
n00b


Joined: 02 May 2005
Posts: 56

PostPosted: Wed Jun 26, 2024 2:51 am    Post subject: Reply with quote

Thanks for the help. Putting the line in xinitrc was the error and carelessness on my part. Thanks for pointing it out.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum