View previous topic :: View next topic |
Author |
Message |
plasmid n00b
Joined: 02 May 2005 Posts: 56
|
Posted: Sat Jun 22, 2024 2:00 pm Post subject: Trying to migrate from x11 to wayland on plasma |
|
|
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 |
|
|
ormorph n00b
Joined: 18 Jun 2024 Posts: 27
|
Posted: Sat Jun 22, 2024 6:30 pm Post subject: |
|
|
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 |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22657
|
Posted: Sat Jun 22, 2024 6:44 pm Post subject: |
|
|
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 |
|
|
ormorph n00b
Joined: 18 Jun 2024 Posts: 27
|
Posted: Sat Jun 22, 2024 6:51 pm Post subject: |
|
|
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 |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22657
|
Posted: Sat Jun 22, 2024 7:04 pm Post subject: |
|
|
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 |
|
|
ormorph n00b
Joined: 18 Jun 2024 Posts: 27
|
Posted: Sat Jun 22, 2024 7:15 pm Post subject: |
|
|
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 |
|
|
plasmid n00b
Joined: 02 May 2005 Posts: 56
|
Posted: Wed Jun 26, 2024 2:51 am Post subject: |
|
|
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 |
|
|
|