Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wayland-compatibility #95

Closed
JoKalliauer opened this issue Sep 21, 2021 · 20 comments
Closed

Wayland-compatibility #95

JoKalliauer opened this issue Sep 21, 2021 · 20 comments

Comments

@JoKalliauer
Copy link

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:

@Daxx
Copy link
Contributor

Daxx commented Sep 29, 2021

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?

@JoKalliauer
Copy link
Author

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.

@userofryzen
Copy link

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

@Ashark
Copy link

Ashark commented Oct 16, 2021

@userofryzen how did you make AllTray to work on wayland?

@userofryzen
Copy link

userofryzen commented Oct 17, 2021 via email

@JoKalliauer
Copy link
Author

@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).

@dreamcat4
Copy link

dreamcat4 commented Nov 4, 2021

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/

@Ashark
Copy link

Ashark commented Nov 4, 2021

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.

@userofryzen
Copy link

userofryzen commented Nov 4, 2021 via email

@3vi1
Copy link

3vi1 commented Dec 22, 2021

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.

@jason-eu
Copy link

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

@frederikb96
Copy link

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

@simonbcn
Copy link

I opened this bug in Wayland bugtracker: https://gitlab.freedesktop.org/wayland/wayland/-/issues/337

@jahway603
Copy link

Would love Wayland support for this

@3vi1
Copy link

3vi1 commented Dec 9, 2023

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.

@promeneur
Copy link

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

@promeneur
Copy link

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

@tbertels
Copy link

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): Betterbird/thunderbird-patches#279
This means that the text will be blurry if you use upscaling.

@promeneur
Copy link

promeneur commented Jun 1, 2024

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.

@user-none
Copy link
Owner

Wayland is not possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests