Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
Exciting! Working on testing this, need to build a few libs... :) |
This comment was marked as outdated.
This comment was marked as outdated.
0e3a035 to
3d317c1
Compare
3d317c1 to
730d627
Compare
|
@whot I started looking into using libportal to access the clipboard via remote desktop but i do not seam to see any methods related to the clipboard.( landed or in a pr) Does such support exist or for remote desktop do we need to use the clipboard portal directly ? |
|
You need the libportal branch with Jonas' rework for this which adds a |
|
Do you have a link to this branch / pr ? |
|
You can use my branch from flatpak/libportal#214 which has both the session persistence and the clipboard changes. I don't think there's a branch just yet for just the clipboard support. |
730d627 to
7b6f084
Compare
7b6f084 to
c4ba355
Compare
|
@sithlord48 are you happy if I leave this PR to you? |
|
Yes but it maybe a bit before i can get the needed libs to update / test . and im sure ill ask something dumb about the remote desktop side too . |
Use the new libportal API to start a CreateSession2, then set the session persistence and read/write the tokens as required. This allows us to start a server without a permission dialog - provided the portal supports it and the user is ok with that.
guard this based on if we have detected the inputcapture portal has clipboard support
c4ba355 to
b2e1360
Compare
|
I am not sure whats happening but on debian linux this is not working correctly with the newest version i find that Linux to mac is broken. Unable to get it to work. that same connection mac to linux works fine. previous versions of this it just worked with no problem. Save version of linux same mac. |
Description
This adds (a very much in draft state) integration for clipboards via the inputcapture portal, making copy/paste from server to client work OOTB on wayland.
It's based on top of #9415 and will require xdg-desktop-portal, xdg-desktop-portal-gnome, and libportal to run (see flatpak/xdg-desktop-portal#1898). Additionally in the gnome case you will need mutter, other compositors will need similar changes.
It removes the current WlClipboard bits which is probably not ideal but that was yet another layer on top to figure out.
Disclosure of AI use
The second commit was purely written by Claude after I stared at this for too long without seeing any hope of getting started. Turns out Claude wrote something that at least looks correct and it does work. It needs review but also needs knowledge of deskflow's internals that I don't have...
How Has This Been Tested?
I've tested this against a Ubuntu 24.04LTS Xorg GNOME session (vanilla with only deskflow installed as extra package). And whoooah, I can copy on the server and paste on the client. It's like the future!
As of 2026-02-06 the other direction (client->server) does not yet work.
Anyway, I'm filing this so it's at least visible, backed up, and maybe someone really wants to take this and run with it so I don't have to :)
Edit: sithlord48
libportal/clipboard.hto define HAVE_LIBPORTAL_CLIPBOARDHAVE_LIBPORTAL_CLIPBOARDTODO: