KDocker
KDocker copied to clipboard
Wayland-compatibility
I think it might be already well known that KDocker does not support Wayland, however I wasn't able to find&track&watch an issue in this repro.
related Articles:
- https://github.com/keepassxreboot/keepassxc/issues/6502
- https://www.addictivetips.com/ubuntu-linux-tips/send-linux-app-to-the-system-tray/
- https://nachtimwald.com/2015/02/14/kdockers-future-with-waylands-1-7-0-protocol-done-announcement/
Further reading (sorry ... unconstructive) ;)
Think twice before abandoning Xorg. Wayland breaks everything!
My first Linux experience was with Ubuntu (Gnome). It felt different from Windows, of course, but I thought I might be able to make it usable. At some point, I decided to try Kubuntu. I often look back and wonder why people stick with Gnome and conclude that that's the way the wind blows and it tends to carry people along with it. There might be GTK+ apps that you feel you can't manage without; well, just install them under KDE and look for the next obstacle ... until there are none remaining.
tl;dr KDocker was written for X11. If KDE moved to Wayland (erm, no), I would be tempted to modify KDocker but I wouldn't want to discourage users from doing what I did. Maybe try it in a VM?
Why for me there is no way around Wayland
@Daxx I use Fedora34 (work-politicly, I can't change it) and I was forced to use Wayland, since X11 does neither support screen-wise scaling nor fractional scaling (it is so blurry that you can't use it), see https://unix.stackexchange.com/a/660345/241592 for details. So I can't use Xorg.
My setup on my work-computer: ThinkPad P15 Gen 1: 1920x1080 (Full HD, 141dpi; 34,5cm x 18,8cm) LG 27UK670-B: 3840x2160 (4K UHD, 163dpi; 59,7cm x 33,5cm)
Did you try a external second monitor (more far away than the internal one) with at least 163dpi and a resolution of at least 3840x2160? I maybe do not have the best eyes any more but for me 163dpi as a secondary screen (more far away) is too small, especially if I move a window from the internal Full-HD-Screen (141dpi) to the large external 4K-UHD-Screen(163dpi).
I would like to use KDocker to keep track on my open applications, and using a VM is for me clearly the opposite.
im using wayland to and I had to go alltray way because of not having on kdocker wayland support.. for me is ok wayland right now.. so... advantages i see many, disadvantages not many
@userofryzen how did you make AllTray to work on wayland?
It worked out of the box at least on Spotify without doing nothing weird or special... Don't ask me xD idk. It works
El sáb., 16 oct. 2021 8:30 p. m., Andrew Shark @.***> escribió:
@userofryzen https://github.com/userofryzen how did you make AllTray to work on wayland?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/user-none/KDocker/issues/95#issuecomment-944977159, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH5RQUNMGFQPOEZMKW3ZKQLUHHAELANCNFSM5EN444BA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@userofryzen how did you make AllTray to work on wayland?
I made a Bugreport at: https://bugs.launchpad.net/alltray/+bug/1947554 Any further Comments about AllTray please report them there (not here at KDocker).
i'm going to go out on a limb here. but maybe it was a bit of a misunderstanding to be saying that alltray works in wayland? because according to the current maintainer it for sure does not work in wayland right now
https://mike.trausch.us/software/alltray/
however maybe it can work under xwayland within wayland perhaps... then shouldnt kdocker in that situation work just the same way also?
to test this hypothesis:
it would make sense to force just spotify app itself to be launched as an xorg app, instead of a wayland app. (if it supports both modes?) leaving all your other apps alone.
for other programs you want to launch as true wayland programs... then those ones cannot be used with neither kdocker or alltray. at least... not until there is a new rewritten altray if that ever happens you can follow those ongoing progress and donate here:
https://mike.trausch.us/blog/
Wow, thanks for idea! This workaround works both in AllTray and KDocker.
Run your app of interest (in my case it is gtg) on x11 backend, as follows: GDK_BACKEND=x11 gtg
. See here for info about variables needed to use for different gut libraries.
Launch kdocker as follows: QT_QPA_PLATFORM=xcb kdocker
Now hover mouse over an application, you will see mouse becomes an aim, and after clicking, the app is docked.
Thanks. I ll tray with kdocker wheni can. And yeah, Spotify is xwayland. Maybbe its why alltray worked
El jue., 4 nov. 2021 1:16 p. m., Andrew Shark @.***> escribió:
Wow, thanks for idea! This workaround works both in AllTray and KDocker.
Run your app of interest (in my case it is gtg) on x11 backend, as follows: GDK_BACKEND=x11 gtg. See here https://wiki.archlinux.org/title/Wayland#GUI_libraries for info about variables needed to use for different gut libraries. Launch kdocker as follows: QT_QPA_PLATFORM=xcb kdocker Now hover mouse over an application, you will see mouse becomes an aim, and after clicking, the app is docked.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/user-none/KDocker/issues/95#issuecomment-960779996, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH5RQUMDGRCT5SEVNN6HSSTUKJ2S3ANCNFSM5EN444BA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
One thing I haven't seen mentioned here is how kdocker will not only not work when launched under wayland, but eats 100% of a CPU while it's running.
I tried the 'QT_QPA_PLATFORM=xcb kdocker' workaround mentioned above, and while that prevents it from eating 100% CPU, it does not actually work (I never get the target... clicking all mouse buttons does nothing... have to kill the kdocker process).
if I try "QT_QPA_PLATFORM=xcb kdocker -d 15 thunderbird %u", thunderbird never appears in the panel nor as a window (though I can tell it's launched from the console output) and I eventually get "Could not find a matching window for thunderbird in the specified time: 15 seconds". The same works fine under X11.
- nVidia 495.46 w/ RTX 2070 Super
- Plasma 5.23.4
- Qt 5.15.2 + qtwayland fix: https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/24
- Wayland 1.19
Wow, thanks for idea! This workaround works both in AllTray and KDocker.
Run your app of interest (in my case it is gtg) on x11 backend, as follows:
GDK_BACKEND=x11 gtg
. See here for info about variables needed to use for different gut libraries. Launch kdocker as follows:QT_QPA_PLATFORM=xcb kdocker
Now hover mouse over an application, you will see mouse becomes an aim, and after clicking, the app is docked.
OMG Yes! Thank you for this!
I'm on a Surface Pro 4 running EndeavourOS Artemis KDE Plasma Wayland
Thank you very much!
I managed to create a launcher for evolution to start it as a tray application in Ubuntu 22.04
- If evolution is not opened yet, it will start kdocker to dock evolution to tray
- If evolution is already opened and docked to the tray, it will bring it to the foreground
Launcher:
[Desktop Entry]
Version=1.1
Type=Application
Name=Mail Tray
Comment=Starts mail and sends it to tray for wayland.
Icon=evolution-symbolic
Exec=bash -c "if [ $( pgrep -x evolution ) ] ; then GDK_BACKEND=x11 evolution; else my-mail-tray-wayland.sh; fi"
Actions=
Categories=Email;Utility;
And my-mail-tray-wayland.sh
script, which must be on your path:
#!/bin/bash
GDK_BACKEND=x11 evolution -c mail &
sleep 1
pid=$( pgrep -x evolution )
QT_QPA_PLATFORM=xcb kdocker -q -x $pid
I opened this bug in Wayland bugtracker: https://gitlab.freedesktop.org/wayland/wayland/-/issues/337
Would love Wayland support for this
BTW: Anyone, like me, who wanted Wayland support for this to get Birdtray or some other Thunderbird add-on working should go check out BetterBird. It's a set of patches on top of Thunderbird which include a tray icon that works in both X11 and Wayland.
Hello
I use Chrome web app feature to get on my desktop Facebook, G Messages, G contacts. I use kdocker to dock in kde systray these web apps.
in hte case of Wayland i only use "QT_QPA_PLATFORM=xcb kdocker" in my scripts.
For example, in case of Wayland in case of Facebook my script is :
`#!/bin/bash
bash -c '/opt/google/chrome/google-chrome --profile-directory=Default --app-id=kippjfofjhjlffjecoapiogbkgbpmgej &'
while [ true ] do sleep 5 status=$(wmctrl -l | grep "Facebook") if [ "$status" != "" ] ; then break fi done WID="$(wmctrl -lx | grep "Facebook")"; QT_QPA_PLATFORM=xcb kdocker -qtw "${WID%% *}" -i ~/.local/share/icons/hicolor/32x32/apps/chrome-kippjfofjhjlffjecoapiogbkgbpmgej-Default.png &`
Thanks
Hello
I use QEMU VM. QEMU is not compliant with wayland then I use "GDK_BACKEND=x11".
Here is the script to launch a QEMU VM and to minimize it in the systray with kdocker.
#!/bin/bash
bash -c '
GDK_BACKEND=x11 qemu-kvm -enable-kvm
-m 4G -smp 4 -cpu host
-display gtk,gl=on,zoom-to-fit=off
-device virtio-vga-gl
-device qemu-xhci,p2=5,p3=5,id=xhci
-device usb-kbd
-device usb-mouse
-device intel-hda
-device hda-duplex,audiodev=snd0
-audiodev pipewire,id=snd0
-device usb-host,vendorid=0x046d,productid=0x0825
-device usb-host,vendorid=0x0b05,productid=0x190e
-boot menu=on
-nic bridge,mac=00:16:3e:76:a3:e4
~/QEMU_VM/android_x86_64_8.1-r6.img
' &
while [ true ] do sleep 5s status=$(wmctrl -l | grep "QEMU") if [ "$status" != "" ] ; then break fi done WID="$(wmctrl -lx | grep "QEMU")"; QT_QPA_PLATFORM=xcb kdocker -qtw "${WID%% *}" -i ///usr/share/icons/breeze/devices/64/smartphone.svg &
Thanks to all with your help
BTW: Anyone, like me, who wanted Wayland support for this to get Birdtray or some other Thunderbird add-on working should go check out BetterBird. It's a set of patches on top of Thunderbird which include a tray icon that works in both X11 and Wayland.
Betterbird's minimize to tray feature doesn't actually work on Wayland in Wayland mode (with Exec=env MOZ_ENABLE_WAYLAND=1): https://github.com/Betterbird/thunderbird-patches/issues/279 This means that the text will be blurry if you use upscaling.
Hello
With openSUSE Tumbleweed+KDE+Wayland using "GDK_BACKEND=x11" and "QT_QPA_PLATFORM=xcb" and kdocker in the systray there is a side effect : Icons are poorly designed. They are pixelated.
Curiously, if I launch Firefox then the icons are well designed. If I close Firefox the icons again are pixelated.