-
Notifications
You must be signed in to change notification settings - Fork 62
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
Attempting to use wl-clipboard in an app launched from a KDE keyboard shortcut breaks clipboard copying #153
Comments
Well, does it output anything? Any error messages? Can you get me |
I was able to redirect the standard error to a file, and with WAYLAND_DEBUG=1, i got this
|
See, the data source is getting cancelled immediately, without anyone even requesting the data from the source — but not before the compositor accepts the source (and publishes it back as a data offer). So this is not the case of the compositor rejecting the data source (or the Does this still happen if you disable your clipboard manager (Klipper)? |
Disabling klipper (i think i was able to? its not clear how to do so, but i set it to disabled) did not seem to help, it still isnt working |
I encountered the same issue when running a script using a shortcut. Whilst playing around, trying to get Debug-output, i got it working.. Here the stderr-outputs of both versions with debug enabled:
|
That is helpful, thank you! What version of wl-clipboard do you have, does it include aa4633b (which is in 2.1.0 and newer)?
This is certainly concerning. What could happen here is that Would it be possible for you to find out whether |
I'll try to check how its launched and what state the pipes have. |
# Check if stdin exists
if [ -t 0 ]; then
echo "stdin exists" >> /tmp/output
else
echo "stdin does not exist" >> /tmp/output
fi
# Check if stdout exists
if [ -t 1 ]; then
echo "stdout exists" >> /tmp/output
else
echo "stdout does not exist" >> /tmp/output
fi
# Check if stderr exists
if [ -t 2 ]; then
echo "stderr exists" >> /tmp/output
else
echo "stderr does not exist" >> /tmp/output
fi Ran once with a shortcut and once directly: stdin does not exist
stdout does not exist
stderr does not exist
stdin exists
stdout exists
stderr exists |
Thank you! In this case it clearly is an issue with how KDE spawns processes from shortcuts. It absolutely should provide the standard descriptors. It would be best to connect stdout and stderr to the system journal in this case, like it's done for services, but if that's not available, it should at least open So please report this to KDE, it's their bug. However, seeing how multiple people have reported it against wl-clipboard, I'll add a check that the Wayland fd is > 2. If it isn't, wl-clipboard will try to log a message (which is tricky when you might not have stderr...) explaining what's going on and abort. Thank you again for figuring this out! |
Bug is filed: https://bugs.kde.org/show_bug.cgi?id=469328 |
Everyone (@Beyley, @Ruakij, @QazCetelic, @OhaDerErste), please try the So please all state whether or not this is happening in your case. |
I have compiled and tested the branch. I get the error-message in stderr you set and wl-copy exits with code 134. When stderr is not attached, this prints in the journal: Log
|
Awesome -- so if you didn't already know what's going on, would that be enough to point you in the right direction? |
I think the visibility might be a problem, but you dont really have other choices :) |
If i attempt to copy to the clipboard from an app launched from a terminal, it works fine, but if i do it from an app launched from a KDE keyboard shortcut, then nothing seems to happen, googling has not provided much help here
its a very simple C# script im using
https://gist.github.com/Beyley/b807d522019e2e681204c2ffeb5be616
The text was updated successfully, but these errors were encountered: