Closed totaam closed 9 years ago
xpra-clipboard-bug.zip
(30.6 KiB)I can reproduce this problem only with clipboard support enabled. If I use --no-clipboard with both sessions, there is no problem.
When you connect to the same session again, the previous connection should get dropped before it even has a chance to try to do clipboard synchronization. I am not seeing this problem here with a win xp client and fedora server.
Please include the server log and each client's output, as well as the command lines used. (and maybe add
-d clipboard
to all the command lines used)It would be worth attaching gdb to the xpra server process to try to get a backtrace of when it crashes.
ok, so I can not reproduce this with only xterm running in the xpra session, but with gnome-terminal I can reproduce it with just one session. It seems like the problem is not related to attaching twice, but rather to attaching with clipboard support to a session where a gnome-terminal is already running. Starting gnome-terminal in an already attached session works fine. Below is terminal output from server and client, and the server log. This session produces an all-black window on the client that has the correct title and icon, while the tray icon tooltip says "1 clipboard requests in progress". It is possible to disconnect from the client.
server side terminal:
~@ xpra --version xpra v0.14.20 ~@ uname -a Linux x 3.13.0-46-generic #79-Ubuntu SMP Tue Mar 10 20:06:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux ~@ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.2 LTS Release: 14.04 Codename: trusty ~@ xpra start :109 -d clipboard --start-child=gnome-terminal ~@ Entering daemon mode; any further errors will be reported to: /home/USER/.xpra/:109.log
server side terminal after client disconnected:
x~@ xpra list Found the following xpra sessions: LIVE session at :109 x~@ xpra list Found the following xpra sessions: LIVE session at :109 x~@ xpra list Found the following xpra sessions: LIVE session at :109 x~@ xpra list Found the following xpra sessions: LIVE session at :109 x~@ xpra list Found the following xpra sessions: LIVE session at :109 x~@ xpra list Found the following xpra sessions: LIVE session at :109 x~@ xpra list Found the following xpra sessions: DEAD session at :109 (cleaned up) x~@ xpra list xpra initialization error: No xpra sessions found x~@ ps -fuxa|grep 109 USER 19932 0.0 0.0 11740 932 pts/6 S+ 12:02 0:00 | | \_ grep --color=auto 109 USER 19541 8.8 1.7 1429424 70736 ? Sl 11:38 2:03 /usr/bin/python /usr/bin/xpra start :109 -d clipboard --start-child=gnome-terminal USER 19542 0.0 1.3 193984 54500 ? Ssl 11:38 0:00 \_ Xvfb-for-Xpra-:109 +extension Composite -screen 0 3840x2560x24+32 -nolisten tcp -noreset -auth /home/USER/.Xauthority :109
client side terminal:
C:\>"Program Files (x86)\Xpra\Xpra_cmd.exe" attach ssh:USER@DOMAIN.TLD:109 -d clipboard --session-name=x --border=magenta,1 --title='@title@' --encoding=vp8 --min-speed=100 2015-03-17 11:39:40,084 xpra client version 0.14.20 2015-03-17 11:39:42,329 OpenGL_accelerate module loaded 2015-03-17 11:39:42,329 Using accelerated ArrayDatatype 2015-03-17 11:39:42,454 detected keyboard: layout=se 2015-03-17 11:39:42,454 desktop size is 2560x1024 with 1 screen(s): 2015-03-17 11:39:42,454 '2\WinSta-Default' (677x270 mm) 2015-03-17 11:39:42,454 DISPLAY1 1280x1024 (452x361 mm) 2015-03-17 11:39:42,454 DISPLAY2 1280x1024 at 1280x0 (452x361 mm) 2015-03-17 11:39:48,569 server: Linux Ubuntu 14.04 trusty, Xpra version 0.14.20 (8766) 2015-03-17 11:39:48,569 make_clipboard_helper() server_clipboards=['CLIPBOARD', 'PRIMARY', 'SECONDARY'], local clipboards=['CLIPBOARD'], common=['CLIPBOARD'] 2015-03-17 11:39:48,585 make_clipboard_helper() clipboard_options=[('xpra.clipbo ard.translated_clipboard', 'TranslatedClipboardProtocolHelper', {}), ('xpra.clip board.gdk_clipboard', 'GDKClipboardProtocolHelper', {'clipboards': ['CLIPBOARD'] }), ('xpra.clipboard.clipboard_base', 'DefaultClipboardProtocolHelper', {'clipbo ards': ['CLIPBOARD']})] 2015-03-17 11:39:48,585 setup_clipboard_helper(<class 'xpra.clipboard.translated _clipboard.TranslatedClipboardProtocolHelper'>, (), {}) 2015-03-17 11:39:48,601 <class 'xpra.clipboard.translated_clipboard.TranslatedCl ipboardProtocolHelper'>.init_proxies : {'CLIPBOARD': <ClipboardProxy object at 0 x5b67030 (xpra+clipboard+clipboard_base+ClipboardProxy at 0x4c41960)>} 2015-03-17 11:39:48,694 Attached to ssh:USER@DOMAIN.TLD:109 (press Control-C to detach) 2015-03-17 11:39:48,694 clipboard_toggled((<XpraClient object at 0x3c3c288 (xpra +client+gtk2+client+XpraClient at 0x284c460)>,)) enabled=True, server_supports_c lipboard=True 2015-03-17 11:39:48,694 send clipboard token: CLIPBOARD 2015-03-17 11:39:48,710 local_to_remote(CLIPBOARD) local_clipboard=CLIPBOARD, re mote_clipboard=CLIPBOARD 2015-03-17 11:39:48,710 clipboard_notify(0) 2015-03-17 11:39:48,710 do_owner_changed((<gtk.Clipboard object at 0x5b67058 (Gt kClipboard at 0x2847118)>, <gtk.gdk.Event at 0558E4D0: GDK_OWNER_CHANGE reason=G DK_OWNER_CHANGE_NEW_OWNER, selection=CLIPBOARD>)) greedy_client=False, block_own er_change=False 2015-03-17 11:39:48,773 process_clipboard_packet(['clipboard-pending-requests', 1]) level=1 2015-03-17 11:39:48,773 process_clipboard_packet(['clipboard-request', 0, 'CLIPB OARD', 'TARGETS']) level=1 2015-03-17 11:39:48,993 process clipboard packet type=clipboard-pending-requests 2015-03-17 11:39:49,009 clipboard_progress(None, 1) 2015-03-17 11:39:49,009 clipboard_notify(1) 2015-03-17 11:39:49,009 process clipboard packet type=clipboard-request 2015-03-17 11:39:49,009 remote_to_local(CLIPBOARD) local_clipboard=CLIPBOARD, re mote_clipboard=CLIPBOARD 2015-03-17 11:39:49,009 process clipboard request, request_id=0, selection=CLIPB OARD, local name=CLIPBOARD, target=TARGETS 2015-03-17 11:39:49,009 get_contents(TARGETS,<function got_contents at 0x05B8577 0>) selection=CLIPBOARD 2015-03-17 11:39:49,026 got_targets(<gtk.Clipboard object at 0x5b67058 (GtkClipb oard at 0x2847118)>, ('UTF8_STRING',), (None,)) 2015-03-17 11:39:49,026 got_contents(ATOM, 32, <type 'tuple'>:1) data=0x28275554 46385f535452494e47272c29.. 2015-03-17 11:39:49,026 _filter_targets(('UTF8_STRING',))=['UTF8_STRING'] 2015-03-17 11:39:49,026 clipboard raw -> wire: ('ATOM', 32, ('UTF8_STRING',)) -> ('atoms', ['UTF8_STRING']) 2015-03-17 11:39:49,134 using audio codec: MPEG 1 Audio, Layer 3 (MP3) 2015-03-17 11:40:42,232 do_owner_changed((<gtk.Clipboard object at 0x5b67058 (Gt kClipboard at 0x2847118)>, <gtk.gdk.Event at 0558E668: GDK_OWNER_CHANGE reason=G DK_OWNER_CHANGE_NEW_OWNER, selection=CLIPBOARD>)) greedy_client=False, block_own er_change=False 2015-03-17 11:40:53,622 do_owner_changed((<gtk.Clipboard object at 0x5b67058 (Gt kClipboard at 0x2847118)>, <gtk.gdk.Event at 0558E560: GDK_OWNER_CHANGE reason=G DK_OWNER_CHANGE_NEW_OWNER, selection=CLIPBOARD>)) greedy_client=False, block_own er_change=False 2015-03-17 11:40:57,279 do_owner_changed((<gtk.Clipboard object at 0x5b67058 (Gt kClipboard at 0x2847118)>, <gtk.gdk.Event at 0558E560: GDK_OWNER_CHANGE reason=G DK_OWNER_CHANGE_NEW_OWNER, selection=CLIPBOARD>)) greedy_client=False, block_own er_change=False 2015-03-17 11:41:01,006 do_owner_changed((<gtk.Clipboard object at 0x5b67058 (Gt kClipboard at 0x2847118)>, <gtk.gdk.Event at 0558EE90: GDK_OWNER_CHANGE reason=G DK_OWNER_CHANGE_NEW_OWNER, selection=CLIPBOARD>)) greedy_client=False, block_own er_change=False 2015-03-17 11:41:20,410 re-starting speaker because of overrun 2015-03-17 11:41:47,838 do_owner_changed((<gtk.Clipboard object at 0x5b67058 (Gt kClipboard at 0x2847118)>, <gtk.gdk.Event at 0558E950: GDK_OWNER_CHANGE reason=G DK_OWNER_CHANGE_NEW_OWNER, selection=CLIPBOARD>)) greedy_client=False, block_own er_change=False 2015-03-17 11:41:47,881 re-starting speaker because of overrun
server side log:
Initializing built-in extension Generic Event Extension Initializing built-in extension SHAPE Initializing built-in extension MIT-SHM Initializing built-in extension XInputExtension Initializing built-in extension XTEST Initializing built-in extension BIG-REQUESTS Initializing built-in extension SYNC Initializing built-in extension XKEYBOARD Initializing built-in extension XC-MISC Initializing built-in extension SECURITY Initializing built-in extension XINERAMA Initializing built-in extension XFIXES Initializing built-in extension RENDER Initializing built-in extension RANDR Initializing built-in extension COMPOSITE Initializing built-in extension DAMAGE Initializing built-in extension MIT-SCREEN-SAVER Initializing built-in extension DOUBLE-BUFFER Initializing built-in extension RECORD Initializing built-in extension DPMS Initializing built-in extension Present Initializing built-in extension DRI3 Initializing built-in extension X-Resource Initializing built-in extension XVideo Initializing built-in extension XVideo-MotionCompensation Initializing built-in extension SELinux Initializing built-in extension GLX [dix] Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list! [dix] Could not init font path element /usr/share/fonts/X11/100dpi/:unscaled, removing from list! [dix] Could not init font path element /usr/share/fonts/X11/75dpi/:unscaled, removing from list! [dix] Could not init font path element /usr/share/fonts/X11/100dpi, removing from list! [dix] Could not init font path element /usr/share/fonts/X11/75dpi, removing from list! Xlib: extension "RANDR" missing on display ":109". Xlib: extension "RANDR" missing on display ":109". 2015-03-17 11:38:59,833 server uuid is 75a69b059fe64e68b2be6ebe57a80060 Xlib: extension "RANDR" missing on display ":109". 2015-03-17 11:38:59,899 <class 'xpra.clipboard.gdk_clipboard.GDKClipboardProtocolHelper'>.init_proxies : {'CLIPBOARD': <ClipboardProxy object at 0x7fa9608f3fa0 (xpra+clipboard+clipboard_base+ClipboardProxy at 0x1949f30)>, 'PRIMARY': <ClipboardProxy object at 0x7fa96026f190 (xpra+clipboard+clipboard_base+ClipboardProxy at 0x1d19510)>, 'SECONDARY': <ClipboardProxy object at 0x7fa96026f320 (xpra+clipboard+clipboard_base+ClipboardProxy at 0x1d19660)>} 2015-03-17 11:38:59,966 using notification forwarder: DBUSNotificationsForwarder(org.freedesktop.Notifications) 2015-03-17 11:38:59,988 pulseaudio server started with pid 19559 2015-03-17 11:39:00,002 started child 'gnome-terminal' with pid 19561 2015-03-17 11:39:00,002 xpra server version 0.14.20 (8766) 2015-03-17 11:39:00,002 running with pid 19541 (gnome-terminal:19562): GLib-GIO-CRITICAL **: g_settings_get: the format string may not contain '&' (key 'monospace-font-name' from schema 'org.gnome.desktop.interface'). This call will probably stop working with a future version of glib. 2015-03-17 11:39:00,332 xpra is ready. 2015-03-17 11:40:05,585 New connection received: SocketConnection(/home/USER/.xpra/x-109) 2015-03-17 11:40:05,589 Handshake complete; enabling connection 2015-03-17 11:40:05,601 Python/Gtk2 Microsoft Windows Vista client version 0.14.20 connected from 'LOCALCOMPUTER' as 'user' ('user') 2015-03-17 11:40:05,601 using vp8 as primary encoding, also available: h264, png, png/P, png/L, webp, rgb24, jpeg, rgb32 2015-03-17 11:40:05,601 client root window size is 2560x1024 with 1 displays: 2015-03-17 11:40:05,601 '2\WinSta-Default' (677x270 mm) 2015-03-17 11:40:05,602 DISPLAY1 1280x1024 (452x361 mm) 2015-03-17 11:40:05,602 DISPLAY2 1280x1024 at 1280x0 (452x361 mm) 2015-03-17 11:40:05,603 ClipboardProxy(CLIPBOARD).set_greedy_client(True) 2015-03-17 11:40:05,603 ClipboardProxy(PRIMARY).set_greedy_client(True) 2015-03-17 11:40:05,603 ClipboardProxy(SECONDARY).set_greedy_client(True) 2015-03-17 11:40:05,603 set_want_targets_client(False) 2015-03-17 11:40:05,603 ClipboardProxy(CLIPBOARD).set_enabled(True) 2015-03-17 11:40:05,603 ClipboardProxy(PRIMARY).set_enabled(False) 2015-03-17 11:40:05,603 ClipboardProxy(SECONDARY).set_enabled(False) 2015-03-17 11:40:05,604 setting key repeat rate from client: 500ms delay / 33ms interval 2015-03-17 11:40:05,605 setting keyboard layout to 'se' The XKEYBOARD keymap compiler (xkbcomp) reports: > Warning: Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols > Ignoring extra symbols Errors from xkbcomp are not fatal to the X server 2015-03-17 11:40:05,912 process clipboard packet type=clipboard-token 2015-03-17 11:40:05,912 process clipboard token selection=CLIPBOARD, local clipboard name=CLIPBOARD, proxy=ClipboardProxy(CLIPBOARD) 2015-03-17 11:40:05,913 got token, selection=CLIPBOARD, targets=None, target_data=None 2015-03-17 11:40:05,913 do_owner_changed((<gtk.Clipboard object at 0x7fa96026f050 (GtkClipboard at 0x1d46a80)>, <gtk.gdk.Event at 0x7fa95d75cda0: GDK_OWNER_CHANGE reason=GDK_OWNER_CHANGE_NEW_OWNER, selection=CLIPBOARD>)) greedy_client=True, block_owner_change=True 2015-03-17 11:40:05,913 remove_block(()) 2015-03-17 11:40:05,914 do_selection_request_event(<gtk.gdk.Event at 0x7fa95d75cda0: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=TARGETS, property=GDK_SELECTION>) 2015-03-17 11:40:05,914 target for CLIPBOARD: 'TARGETS' 2015-03-17 11:40:05,914 do_selection_request_event(<gtk.gdk.Event at 0x7fa95d75cda0: GDK_SELECTION_REQUEST selection=CLIPBOARD, target=TARGETS, property=GDK_SELECTION>) target=TARGETS, selection=CLIPBOARD 2015-03-17 11:40:05,914 do_selection_get(<GtkSelectionData at 0x7fff18e27170>, 0, 90785476) selection=CLIPBOARD 2015-03-17 11:40:05,914 get clipboard from remote handler id=0 2015-03-17 11:40:06,021 starting sound capture using pulseaudio device: Monitor of Null Output 2015-03-17 11:59:45,359 internal error: read connection SocketConnection(/home/USER/.xpra/x-109) reset: [Errno 104] Connection reset by peer 2015-03-17 11:59:45,368 internal error: write connection SocketConnection(/home/USER/.xpra/x-109) reset: [Errno 32] Broken pipe (END)
I see that you also have sound enabled, you may want to turn that off to see if it helps too (see #669 - I am actually working on this issue right now).
It isn't the first time that problems have been reported with gnome-terminal, it seems that it does some weird things with processes and clipboard and whatever. I'm not saying we can't fix it, just that newer versions behave more oddly than before. Can you include the full version number you have installed?
~@ gnome-terminal --version GNOME Terminal 3.6.2
Starting the client with --no-microphone and --no-speaker works. I can attach to a session that runs gnome-terminal, and use clipboard in the server->client direction, but client->server direction does not work. Tell me what logs you want from such a session, if any.
The fact that turning the sound off fixes things confirms that we are dealing with #669. And I have a fix for that pending!
Now the fact that clipboard only works in one direction is something else, could be:
- another application or tool is trying to synchronize the clipboard (virtualbox, clipper, etc..)
- application doing weird things (like claiming or requesting the clipboard contents too eagerly)
See: Clipboard
For debugging, the best would be to capture
-d clipboard
(both client and server) of around the time when the clipboard cut&paste does not work.
About one direction clipboard: Scratch that, I was merely confusing primary and secondary.
Looking forward to the sound fix!
And, for the record I found a pretty usable workaround in the meantime:
xpra start :100 --no-speaker --no-microphone --start-child=gnome-terminal xpra start :101 --no-clipboard --pulseaudio
Connecting to both sessions then produces an experience where both clipboard and audio work just fine.
Connecting to both sessions then produces an experience where both clipboard and audio work just fine. [[BR]] I'm not sure how clipboard could work if you have
--no-clipboard
specified on the server command line! It shouldn't, that would be a bug.I think we can close this ticket as duplicate of #669?
FYI: I've just posted beta builds of 0.15.0 with the sound changes, you should now be able to use both clipboard and sound without problems. (at least without the problems that #669 is meant to address..)
I'm not sure how clipboard could work if you have
--no-clipboard
specified on the server command line! [[BR]] It wouldn't. In the workaround example, :100 would be a session with clipboard but without sound. The :101 session would have no windows at all, it's sole purpose to stream the sound. [[BR]] [[BR]] I think we can close this ticket as duplicate of #669? [[BR]] Yes. If any problem persists, I'll open a new ticket for version 0.15.
Issue migrated from trac ticket # 823
component: server | priority: major | resolution: duplicate
2015-03-17 09:35:46: mnbvc created the issue