Switch to Wayland with side effect to Clipboard
Posted
#1
(In Topic #967)
Regular

Code (gambas)
Posted
Guru

01McAc said
Since I switched from X11 to Wayland the Clipboard command does not work anymore:Any idea what's wrong with this?Code (gambas)
It's Wayland.
Loads of stuff does not work with wayland
I'd switch back to x11 if you want decent "has worked for years" tried and tested functionality.
If you want a restricted/limited/incomplete os , go for wayland.
Could be worth trying to use a different toolkit.
Ie. gb-qt5-wayland might work better than gb-gtk-wayland
Posted
Guru

Maybe get on the BugTracker and report it.
Posted
Guru

wl-clipboard command?
Posted
Regular

Thanks Bruce. I installed wl-clipboard to follow up on this but it doesn't help unfortunately. Since you mentioned gb-qt5-wayland I checked its status on my system:BruceSteers said
maybe you could install
wl-clipboard command?
Both wayland components gtk3 and qt5 are installed. But when I open the Gambas project settings I cannot find any wayland components. Do I have to enable them somewhere?
Posted
Guru

the wayland switching part is handled by gambas.
so to use gb-qt5-wayland just use gb.qt5
I tried to help by installing wayland plasma-desktop on my laptop here but it was completely unusable.
i could not get any menus to open via mouse click, (not just gambas, everywhere)
I could not type text in the gambas IDE as the font changes size on editing a line and the cursor gets miss positioned.
It changed my language/keyboard from GB to US!
What a mess !!
Like i say if you can install an x11 version of whatever desktop you are using i'd recommend doing so and removing wayland completely
(like i just did
Not only is wayland rubbish but also gambas does not support it very well yet.
You have to understand the GUI system in gambas.
It is full of features/functions that when coded will operate the same for the gtk or qt toolkits.
Then comes wayland and there are many things that cannot be done, or work very differently.
So to get the best from gambas use x11 not wayland.
Wayland is still usable with gambas you will just find many problems with some features/functions not working as expected.
Like moving windows via code, using Clipboard, many other things.
Posted
Regular

My display manager gdm shows the option to start KDE with X11 or Wayland so the choice is up to me.
Posted
Guru

01McAc said
Thanks Bruce. I installed wl-clipboard to follow up on this but it doesn't help unfortunately. Since you mentioned gb-qt5-wayland I checked its status on my system:BruceSteers said
maybe you could install
wl-clipboard command?
Really?
Can you not do something like this…
Check out the wl-copy help for other options you may want/need
Code
wl-copy --help
Usage:
wl-copy [options] text to copy
wl-copy [options] < file-to-copy
Copy content to the Wayland clipboard.
Options:
-o, --paste-once Only serve one paste request and then exit.
-f, --foreground Stay in the foreground instead of forking.
-c, --clear Instead of copying anything, clear the clipboard.
-p, --primary Use the "primary" clipboard.
-n, --trim-newline Do not copy the trailing newline character.
-t, --type mime/type Override the inferred MIME type for the content.
-s, --seat seat-name Pick the seat to work with.
-v, --version Display version info.
-h, --help Display this message.
Mandatory arguments to long options are mandatory for short options too.
Posted
Guru

if any of them work you could use their shell commands to add text to the clipboard.
(pretty sure clipman is for wayland)
Posted
Regular

It is very interesting, that the exec command doesn't work either.
Code (gambas)
- ...
- ...
So I tried instead of Exec the Shell command. I found out the Shell command only works with this options on my desktop.
Thank you again for the help and your patient. Happy new year and a very good start into year 2023.
1 guest and 0 members have just viewed this.



