6
6
I use VNC at the office for the vast majority of my work. We have a cluster of Linux servers set up for us to log into via SSH to do our work. They enable us to use VNC so that we can get a persistent desktop environment for ease of workflow. I'm connecting from a dual-monitor Windows system on my desk. I can set up the TightVNC server for my session as I feel appropriate.
What I would like to be able to do is set up the server so that it will create a session that has two separate monitors. They can be stitched together into a single viewport but I don't want my Fluxbox taskbar or maximized windows spanning across the whole screen, as when I just double the horizontal resolution. To X, I want it to see two screens. But to the TightVNC Viewer, it would just appear as a single wide display.
I've looked around online and have seen mention of people being able to do this, but no real tutorials or lists of switches to pass in order to make it happen. I can't use xorg.conf to create multiple adapters, as I don't have root (and we don't have system-wide xorg.conf files anyway). The servers exist on a rack and are headless, so there's no unused physical adapters that I can repurpose as virtual monitors for VNC. I have tried specifying multiple screens on the vncserver
command-line with -screen
and then using xrandr
to try and place "VNC-1" next to "VNC-0", but it keeps reporting that the output named "VNC-1" is not found, even though if I query xrandr
with --screen 1
it shows a display connected to it. If I VNC into a session set up this way, I still only see screen 0 (on output "VNC-0").
I figure there must be something I'm missing. Configuring with xrandr
seems to be key but I can't seem to figure out the prerequisite steps when invoking the VNC server.
Also to note:
- We are using Xvnc TightVNC 1.3.0 as the server. As such, it does not use x11vnc as a back-end.
- My Windows machine is connecting with the latest version of the TightVNC viewer (2.7.10 as of this post).
- I've tried doing this setup with both Fluxbox and Gnome and there was no difference in behavior--only in what desktop/WM was running.
- I don't want to set up two separate DISPLAYs in this session. I want windows created on one monitor to be able to be dragged over to the other.
What am I missing? Or is what I want to do even possible?
EDIT: (6/16/2016) To emphasize, there is no physical display (used or unused) that I can see available. I don't know what the physical machine looks like but it is headless so there very well could be no physical display adapter on it.
When I run xrandr
after connecting via SSH with X forwarding, this is what I see:
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 0 x 0, current 3840 x 1200, maximum 32768 x 32768
default connected 3840x1200+0+0 0mm x 0mm
3840x1200 0.0*
From a VNC session:
Screen 0: minimum 32 x 32, current 1920 x 1200, maximum 32768 x 32768
VNC-0 connected 1920x1200+0+0 0mm x 0mm
1920x1200 60.0*
1920x1080 60.0
1600x1200 60.0
1680x1050 60.0
1400x1050 60.0
1360x768 60.0
1280x1024 60.0
1280x960 60.0
1280x800 60.0
1280x720 60.0
1024x768 60.0
800x600 60.0
640x480 60.0
If I try to add a mode to an unnamed output, it will show this:
> xrandr --addmode VIRTUAL2 1920x1200_60.00
xrandr: cannot find output "VIRTUAL2"
I could use any name for an output (I've tried several), and this error is all that I see.
Here how to map 2 monitor to 2 monitor. Then you have to create the 2 monitors in the Linux System (VNC - I suppose where you are). Did I understand correctly that you do not have root password on Linux environment? Because, if so, I'm afraid you can do really few... BTW can be useful Xdmx? An example of
xorg.conf
just to keep there. – Hastur – 2016-06-15T16:04:13.233Check even for
– Hastur – 2016-06-15T16:07:14.420VNC Viewer
, it can give some hints, see other questions.That's not helpful, unfortunately. The VNC Server is headless. I need to invoke it to create a dual-monitor session, which I can then connect to with a viewer. The viewer side isn't the issue. It's how to set up the server that I'm having difficulties with. – Ben Richards – 2016-06-15T17:21:56.593