Xpra: Ticket #1518: Ports opening and session start

Hello, finally i got the reason!!!!! It could be because of some specifics of Centos or virtual server or something specific else with my server. But then the user is completely deleted from the system after the session usage

userdel -r "username"

and then is created again - the session starts and port is open!!! Tested several (many) times:

I've checked and the folder "/run/user/" is deleted after then the session ends.

Could you please help and say what other files or settings in Centos are linked with the user profile (and which are not closed/deleted after the session)? What else can be checked to understand better the situation?

Thanks a lot in advance!

Tue, 16 May 2017 14:36:15 GMT - Antoine Martin: owner changed

Please provide clear steps to reproduce the problem you are describing.

Tue, 16 May 2017 14:54:40 GMT - Denis01:

So 1) user creation

adduser CCC
passwd CCC
usermod -a -G xpra CCC

2) from Putty (login under user) session start

xpra start --bind-tcp=XXX.XXX.XXX.XXX:10000 --start-child=/bin/libreoffice5.2 --exit-with-children --attach=no --auth=allow

3) Close Putty 4) Enter with HTML client 5) some actions inside the application (text typing, screen size adjustment) 6) Close the application inside HTML browser (by clicking on the cross in right-top)

Wed, 17 May 2017 09:23:47 GMT - Antoine Martin:

Those steps are very well tested, on all supported platforms, including centos. I don't see what the problem is, works fine every time here.

Maybe you're not describing your problem very well. What is "from Terminal"? (a terminal? a specific terminal application called "Terminal"? is this running from an X11 server, or via ssh? does it matter?) Does "--exit-with-children" make any difference? Does the bug also occur if you run "xpra stop" instead? Does "libreoffice" matter? Can you reproduce with an xterm instead?

port is closed. Doesn't work

I am certain that this is not the message that you saw. Copy that message, don't make one up.

Anyway, you're also not reporting: exact version used, centos version, etc..

Thu, 18 May 2017 08:59:54 GMT - Denis01:

Hello, xpra X11 version 2.1-r15785 64-bit Centos 7.3 Sorry, will be more precise. Terminal = Putty which connects to the server via SSH. Tried with/without "--exit-with-children" with gedit and libreoffice5.2 - the same result "xpra stop" doesn't change the situation.

I think that it may happen after the start of xpra from py script. So if a new user created and commands to start xpra are executed only with Putty (xpra start..... or xpra start ssh/.....) i've never seen problem with ports and sessions. But if the session even ONCE is started from simple *.py script asking the server to create session -> prb can appear. Script like

cmd = xpra start ssh/user:pass@XXX.XXX.XXX.XXX:22 --bind-tcp=XXX.XXX.XXX.XXX:10000 --start=/bin/libreoffice5.2 --attach=no
PIPE = subprocess.PIPE
p = subprocess.Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=subprocess.STDOUT, close_fds=True)
s = p.stdout.read()

or the call for session via Paramico and command

xpra start --bind-tcp=XXX.XXX.XXX.XXX:10000 --start=/bin/libreoffice5.2 --attach=no

And just to have a look on this situation from other hand (probably it will give smth) what i noticed is: then xpra is started from command line in Putty (doesn't matter "xpra start" or "xpra start ssh" HTML client perfectly and properly manages the "desktop−scaling" but then session is called from *.py script -> there is no reaction on "desktop−scaling" option: on, off, desktop−size. Doesn't matter- all the time the same result: session is open (and in the case of libreoffice) but with very very very wide screen (in the attach) so it needs to pull the screen with mouse pointer till the right end and click on screen resize icon and just then application screen fits properly in browser screen. So could it be that in such case X screen just doesn't understand smth with screen settings (then called from script), open the application then saved somewhere in user's setting something and upon the next start is frozen because of such settings? P.S. Apologize in advance if have not been clear somewhere in the description of situation

Thu, 18 May 2017 10:35:17 GMT - Denis01:

some additional details. So if there are the following files in User's folder (Login under user by Putty via SSH and command "ls -a")

.  ..  .bash_logout  .bash_profile  .bashrc  .mozilla

xpra starts from *.py script. Normally such situation then user is just created. Then after the first start from script and then the close of the application (with --exit-with-children option activated) There are the following files

.  ..  .Xauthority  .bash_history  .bash_logout  .bash_profile  .bashrc  .cache  .config  .esd_auth  .mozilla  .xpra

xpra doesn't start (session is started but port is not open) neither from Putty command nor from script.

And then just deleted by "rm -rf" command from Putty the following files and folders


(without deleting a user completely). Session starts with port opened

P.S. should i create for the situation with "desktop−scaling" another ticket?

P.P.S Test script file is in the attach file. XXX.XXX.XXX.XXX should be remplaced with IP address Script to be put in /Home/ folder. And then start of script (commands in Putty) {{ cd .. python test.py }}

Thu, 18 May 2017 10:36:07 GMT - Denis01: attachment set

Thu, 18 May 2017 12:00:26 GMT - Denis01:

And another point. It seems that only ".cache" has to be deleted. So if this folder is deleted from script then Session can be started correctly from script.py without any problem. And in this case it seems that "desktop−size" problem disappears as well

Thu, 18 May 2017 15:03:22 GMT - Antoine Martin: type, component changed

The .cache folder is not used or created by xpra. It is very likely that the problem is with your client application, it probably exits which makes xpra exit since you specified --exit-with-children. You should try running an xterm instead and launch the application from there to simplify things. You may even get some useful log messages there. I am likely to close this ticket as notabug.

Fri, 19 May 2017 05:02:53 GMT - Denis01: status changed; resolution set

Yep, let's close it. Tested with some other applications (but just "open-close" -> works perfectly! And if the prb appears again it will be easy to unblock the situation. P.s almost happy :-)

Sat, 23 Jan 2021 05:26:30 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1518