#1417 closed task (invalid)
choose display number automatically
Reported by: | Jens H. Goebbert | Owned by: | Antoine Martin |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | core | Version: | trunk |
Keywords: | DISPLAYID | Cc: |
Description
On multi-user systems is would help a lot, if Xpra could find a free display number automatically.
Recent X servers as of version 1.13 (Xvfb, too) support the -displayfd <fd> command line option: It will make the X server choose the display itself and write the display number back to the file descriptor <fd>.
exec 6>display.log Xvfb -displayfd 6
Change History (7)
comment:1 Changed 5 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 5 years ago by
Thanks! - It seams, that I missed a great feature of Xpra.
Why should one ever wants to set the display id manually?
Shouldn't this be the default way to use Xpra?
Can Xpra report the display number to stdout, if it was automatically chosen?
(eg. "Actual display id is now: localhost:28")
How would you recommend to get the automatically chosen display number
if it is needed in a wrapper script? Is there any smarter way in Xpra than something like this:
xpra start --start-child=xterm 2>&1 > /dev/null | grep "Actual log file name is now" | sed 's#.*:##g' | sed 's#.log##g'
comment:3 follow-up: 4 Changed 5 years ago by
Why should one ever wants to set the display id manually?
When starting xpra from external management scripts I guess.
Shouldn't this be the default way to use Xpra?
It is!
Can Xpra report the display number to stdout, if it was automatically chosen?
Do you mean like this: r14822?
How would you recommend to get the automatically chosen display number if it is needed in a wrapper script?
Is there any smarter way in Xpra than something like this: ...
I don't know, sorry.
Using grep and sed can be brittle.
I guess we could add our own "--displayfd" switch. This could be a bit tricky to implement since we normally daemonize and close all file descriptors before we know the display number.. (except stdout / stderr which are kept for the messages that you saw - that's already a special case)
comment:4 Changed 5 years ago by
Replying to Antoine Martin:
Shouldn't this be the default way to use Xpra?
It is!
Sorry ... www.xpra.org (Get started with Xpra) and the Wiki made me think, this not mend to be the default usage of Xpra. My fault.
Can Xpra report the display number to stdout, if it was automatically chosen?
Do you mean like this: r14822?
Yes ... great!!
How would you recommend to get the automatically chosen display number if it is needed in a wrapper script?
Is there any smarter way in Xpra than something like this: ...
I don't know, sorry.
Using grep and sed can be brittle.
I guess we could add our own "--displayfd" switch. This could be a bit tricky to implement since we normally daemonize and close all file descriptors before we know the display number.. (except stdout / stderr which are kept for the messages that you saw - that's already a special case)
Yes ... great!!
comment:5 Changed 5 years ago by
I tested r14822 and it is just doing, what I was looking for. Thanks.
Can you add this feature to the 1.0.x branch, too?
comment:7 Changed 17 months ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1417
xpra has supported this feature for years, see #172
Just use: