Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add monitor number flag #296

Closed
blkmlk opened this issue Nov 5, 2020 · 5 comments
Closed

Add monitor number flag #296

blkmlk opened this issue Nov 5, 2020 · 5 comments

Comments

@blkmlk
Copy link

blkmlk commented Nov 5, 2020

Hi,

I think it would be great to be able to specify an output name or a monitor number to run x11docker in fullscreen mode with the monitor's size. I found it really useful for me because I use two monitors. Xephyr has the "output" flag which allows us to pass a specific monitor but I'm not sure about other X servers.

Thanks.

@blkmlk blkmlk changed the title Add Monitor Number Flag Add monitor number flag Nov 5, 2020
@mviereck
Copy link
Owner

mviereck commented Nov 6, 2020

I am not sure how to implement this.
I found that normally the fullscreen window appears on the monitor where the command is executed, e.g. in a terminal emulator. But that likely depends on the window manager (here xfwm4).
Also there is no comparable --output option for weston or nxagent. And even for Xephyr it might fail in a Wayland/Xwayland environment.

Maybe I could implement an option--xopt that allows to add arbitrary options to the X server command.

@blkmlk
Copy link
Author

blkmlk commented Nov 6, 2020

Yes, I expected that won't be applicable for other servers but I think it might be really useful for other users who have several monitors

@mviereck
Copy link
Owner

mviereck commented Nov 6, 2020

I've added an experimental option --xopt in e205f48 .

Something like this should work:

x11docker --xephyr --xopt="-output VGA-2" [...]

However, my own attempts result in a segmentation fault of Xephyr. Did you try out option -output with Xephyr?

Edit: Just found that I can avoid the segmentation fault with x11docker option --fullscreen. Otherwise x11docker sets option -screen XxY that results in less memory allocation. So you need:

x11docker --xephyr --xopt="-output VGA-2" --fullscreen [...]

@blkmlk
Copy link
Author

blkmlk commented Nov 6, 2020

It works the same way as before. To make it using -output flag we have to remove -fullscreen flag.

Edit: I mean Xephyr's "-fullscreen" flag

@mviereck
Copy link
Owner

mviereck commented Nov 7, 2020

I've made a fix in x11docker that does not set a screen size if --xopt contains Xephyr option -output.
Now I don't get segfaults and can just run:

x11docker --xephyr --xopt="-output eDP" [...]

eDP is my laptop monitor, replace with your intended monitor.
Can you please try out if it works for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants