You are not logged in.

#1 2013-01-07 21:34:06

Registered: 2012-08-06
Posts: 28

[solved] xpra and tmux

I'm trying to use xpra and tmux to work on a remote machine. The remote machine runs Ubuntu, my laptop on which i work runs Archlinux.

Previsouly i successfully used xpra + screen, but to make my life difficult, i want to swap to tmux.

According to some website, i should do:

tmux ls
tmux attach # nesting seems a bit suspicious to me, though, but alas
xpra start :100 && export DISPLAY=:100
xpra attach :100

Needless to say: it doesn't work. No X forwarding achieved.

So I tried more basic things: just to start an xpra server on the remote machine

 xpra start :7

, and then try to connect there via ssh (on the local laptop):

 xpra attach

(as described on the archlinux wiki).  Which gives me an error "xpra: error: no such option: --socket-dir".

Yet another website suggested to use mosh instead of ssh (which seems a very good idea) and start xpra and tmux as follows:

xpra start :7 && DISPLAY=:7 tmux new -s remote
xpra attach ssh:<hostname>:7 & mosh <hostname> -- tmux attach -t remote

Two distinct strategues, one starting with xpra and then launching tmux, or, launching tmux and then starting an xpra server, but none worked. That is to say: tmux always works, but i don't get any X forwarded (generally i test with xeyes or evince). Anybody an idea of how to set up xpra and tmux? (No, don't tell me to head back for "screen" or any other programs, i want to know how to get xpra and tmux to work). Any examples how you start it?

Last edited by btorb (2013-01-11 14:37:42)


#2 2013-01-09 16:56:37

Registered: 2010-12-01
Posts: 387

Re: [solved] xpra and tmux

Actually, using screen or tmux, is independant of using xpra (screen/tmux does not affect xpra)

On the first example you are starting both the xpra server and client from the local machine, while on the second example you are doing it remotely.

I have got weird errors when the xpra version is not exactly the same both on the client machine and server machine. Check you are using exactly the same version.

And checking for simple mistakes, you can ssh to the remote machine from your laptop? you don't have iptables blocking port 22?
and did changed "user" and "" for your real data, right? ^_^

Check the version is the same (is the thing I suspect more)
EDIT: check the version with

xpra info|grep version

both on the client and server machines.

I have added a systemd service for the server. It will start the xpra server independtly from screen, tmux, etc.

Yes, you can make it work without switching back to screen.

Last edited by chris_l (2013-01-09 17:23:27)

"open source is about choice"
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.


#3 2013-01-11 14:37:13

Registered: 2012-08-06
Posts: 28

Re: [solved] xpra and tmux

Thanks for the suggestions. The local vs. remote did give some insights.

Now it seems to be working well; all operations take place on the remote machine,

 ssh -Y remote_ip 

. Then, during the first session to start xpra and tmux

xpra start :7 
DISPLAY=:7 tmux start -s local

In later sessions, ssh into the remote machine, followed by

xpra attach :7
DISPLAY=:7 tmux attach -t local

Provided that xauth also co-operates, these instructions work well. Also, with a bit of scripting this can easily be combined in one script


Board footer

Powered by FluxBB