Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

Thinnest way to start KDE

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
Goverp
Advocate
Advocate
User avatar
Posts: 2404
Joined: Wed Mar 07, 2007 6:41 pm

Thinnest way to start KDE

  • Quote

Post by Goverp » Tue Dec 20, 2022 1:18 pm

I've been trying to switch from X11 to Wayland, but (a) for some programs, notably zoom, I still need X11 (b) Wayland is still flaky in various ways, and (c) SDDM makes a right mess of starting as a new user.

SDDM and display managers in general seem a totally unnecessary software layer. There's a perfectly good linux logon mechanism without them, so I'm writing a trivial shell script to put at the end of .bashrc or similar, to start Wayland, X11 or character-mode terminal, depending on TTY number, so I can easily choose which to start.

There's an aesthetically displeasing asymmetry between the two: Wayland starts with simple

Code: Select all

exec dbus-launch --exit-with-session startplasma-wayland
but X11 needs a call to startx, and then as far as I can tell, the startup command hidden in .xinitrc

Code: Select all

#!/bin/sh
exec dbus-launch --exit-with-session startplasma-x11
I presume there's a suitable call to startx or xinit, but when I tried the simple

Code: Select all

exec startx dbus-launch --exit-with-session startplasma-X11
X started, then closed down again, all by itself, and only then plasma complained about the missing display.
What am I doing wrong?
Greybeard
Top
Zucca
Administrator
Administrator
User avatar
Posts: 4706
Joined: Thu Jun 14, 2007 10:31 pm
Location: Rasi, Finland
Contact:
Contact Zucca
Website

  • Quote

Post by Zucca » Tue Dec 20, 2022 5:22 pm

I don't quite remember how X startup process went as I haven't used X after sway beta hit the scene, but shouldn't the command be like this

Code: Select all

exec dbus-launch --exit-with-session startx startplasma-X11
?
Or even drop 'startx' altogether. 'startplasma-X11' could itself run startx or commands similar to it.
..: Zucca :..

Code: Select all

0100100100100000011000010110110100100000
0100111001100001010011100010000100100000
0100100100100000011000010110110100100000
0110000100100000011011010110000101101110
00100001
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2116
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

Re: Thinnest way to start KDE

  • Quote

Post by GDH-gentoo » Tue Dec 20, 2022 5:48 pm

Goverp wrote:There's an aesthetically displeasing asymmetry between the two:
AFAIK, that's because on X11, there's both the X server, Xorg, and the window manager, kwin_x11. startx (indirectly xinit) takes care of starting both the server and some client (startplasma-x11, and indirectly kwin_x11), and kills the former when the latter terminates. On Wayland, there's just the Wayland compositor, kwin_wayland.
Goverp wrote:I presume there's a suitable call to startx or xinit, but when I tried the simple

Code: Select all

exec startx dbus-launch --exit-with-session startplasma-x11
[...]
What am I doing wrong?
startx is a shell script, and, AFAICT, the first argument is taken as the client program only if it starts with '/' or './'. Otherwise, it is taken as the first argument of a call to xterm. Therefore, try:

Code: Select all

exec startx /usr/bin/dbus-launch --exit-with-session startplasma-x11
Ionen wrote:As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Tue Dec 20, 2022 6:33 pm

startx ultimately winds up calling xinit, you just don't have to remember all the details (it does it for you)

BUT

this is the output from startx <--> xinit /home/user/.xinitrc -- /usr/bin/X :0

Where it calls your .xinitrc (if there is one, otherwise uses some default), then the server, display and any options.

For reference:
xinit [ [ client ] options ... ] [ -- [ server ] [ display ] options ... ]

the only other thing startx does is keep your .Xauthority file up to date
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2404
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Wed Dec 21, 2022 9:18 am

Thanks for both bits of info. I've fixed the first problem with

Code: Select all

exec startx /usr/bin/dbus-launch ...
and note that the xinit documentation explains about the special handing of client names (eugh).
A quick try with

Code: Select all

exec xinit ...
failed, so I need to look at what startx is doing properly. Its comments say it's a mess and should be rewritten - always a good sign! I suspect the whole lot can be shrunk to a line or two for my use case.
Next is to check that KDE logoff/restart/sleep and so forth work satisfactorially, and setup some sensible logging (at least with timestamps, better with colour).
I noticed that exiting from wayland leaves a broken akonadi and crash, which worried me until I compared it with SDDM's wayland log (~/.local/share/sddm/...), which shows the same crash! More eugh.
Greybeard
Top
Zucca
Administrator
Administrator
User avatar
Posts: 4706
Joined: Thu Jun 14, 2007 10:31 pm
Location: Rasi, Finland
Contact:
Contact Zucca
Website

  • Quote

Post by Zucca » Wed Dec 21, 2022 9:42 am

Out of curiosity: You specifically want a choice to start KDE with X11.
Is there still something in regular KDE usage that might need X11, or do you have some speciality software that doesn't work even with Xwayland?
..: Zucca :..

Code: Select all

0100100100100000011000010110110100100000
0100111001100001010011100010000100100000
0100100100100000011000010110110100100000
0110000100100000011011010110000101101110
00100001
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Wed Dec 21, 2022 3:23 pm

startx doesn't "exec" xinit it simply calls it, when it returns, startx finishes up and cleans up.
-----------
Startx looks for a the first display it can use (without the vt arg)
Does the xauth stuff (if needed)
-----------
# This is just a sample implementation of a slightly less primitive
# interface than xinit. It looks for user .xinitrc and .xserverrc
# files, then system xinitrc and xserverrc files, else lets xinit choose
# its default.

xinit "$client" $clientargs -- "$server" $display $serverargs
-----------
xinit needs at least the client (so it knows what to do)
AND the server (typically X) AND which display to use.

That's all there is to startx (lots of crap, but it really doesn't do much)
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2404
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Wed Dec 21, 2022 7:17 pm

Zucca wrote:Out of curiosity: You specifically want a choice to start KDE with X11.
Is there still something in regular KDE usage that might need X11, or do you have some speciality software that doesn't work even with Xwayland?
Se the first line of the first post in this thread. I could also have mentioned a firefox issue where background tabs monopolize a cpu, but that might? also occur with X11.
Greybeard
Top
Zucca
Administrator
Administrator
User avatar
Posts: 4706
Joined: Thu Jun 14, 2007 10:31 pm
Location: Rasi, Finland
Contact:
Contact Zucca
Website

  • Quote

Post by Zucca » Thu Dec 22, 2022 8:38 am

Goverp wrote:Se the first line of the first post in this thread.
Oh. I think I'm going illiterate or blind. :P
Have you tried running zoom (for example) by unsetting WAYLAND_DISPLAY?

Code: Select all

env -u WAYLAND_DISPLAY /path/to/zoom.bin
I assume Zoom is an electron based program. Some of those electron projects are tricky to run on wayland, since the developer might stick with quite old version of electron while sill making updates to the program itself. These old versions of electron are the problem usually. And I think It's not trivial or even possible to unpack the program archive and repack it with newer version of electron.
  • (Really electron should have been a library or runtime environment like java... That would end up Chrome being a dependency. :P But it's still better than old, vulnerable, skeleton of chrome?)
..: Zucca :..

Code: Select all

0100100100100000011000010110110100100000
0100111001100001010011100010000100100000
0100100100100000011000010110110100100000
0110000100100000011011010110000101101110
00100001
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Thu Dec 22, 2022 10:51 am

I usually add this to my .desktop files (for those that need Xwayland instead of wayland)

For gtk apps

GDK_BACKEND=x11

for qt

QT_QPA_PLATFORM=xcb

This should override the selection of wayland backend.

I usually modify the .desktop file to something like
Exec=env GDK_BACKEND=x11 GDK_DPI_SCALE=1 <rest of line>
for my gtk apps

do the same thing for qt apps but use QT* env variables


Edit to add: If the screensharing is the problem with zoom, then xwayland might not fix it, you might need to start X only.

From the zoom site

Last Updated:

The screen sharing options in Wayland are currently limited. To share just a specific application, you need to launch your Linux session with Xorg instead. This is a known issue and will be fixed in a future Zoom client release.
Evidently screen sharing works (for the whole screen)
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
Post Reply

10 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic