Hi,
I just installed CentOS7 and managed to start the vncserver service, but once I connect to the machine, the desktop resolution isn't the one which I set in the vncserver@:3.service file located in /lib/systemd/system/ directory.
The content of the mention file: ---------------------------------------- [Unit] Description=Remote desktop service (VNC) After=syslog.target network.target
[Service] Type=forking # Clean any existing files in /tmp/.X11-unix environment ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' ExecStart=/sbin/runuser -l foo -c "/usr/bin/vncserver %i -geometry 1400x800 -nolisten tcp -localhost" PIDFile=/home/foo/.vnc/%H%i.pid ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
[Install] WantedBy=multi-user.target ------------------------------------------
The desktop resolution is different (more than my NB display can display) and the scroll bars appear.
The same behaviour occurs when I start the vncserver from commant line: vncserver :4 -geometry 1400x800 -nolisten tcp -localhost and then connect via ssh vncconfig -display :4 -connect localhost:49999
In CentOS6 I had no problem with this. The desktop resolution adjusted according the -geometry parameter.
Please, let me know, if you have any idea.
thanks
martin
On 07/09/2014 08:24 AM, Martin Moravcik wrote:
Please, let me know, if you have any idea.
Hi,
You need to copy the file from /lib/systemd/system/vncserver@.service to /etc/systemd/system/ as per the instructions in the vncserver@.service file (the 4 points under "Quick HowTo" at the beginning).
I copied mine to /etc/systemd/system/vncserver@:1.service and it works (I get the geometry specified there). I'm in Fedora 20 (haven't tested this on CentOS/RHEL 7) but it should be the same.
HTH, Jorge
On 10/07/14 02:22, Jorge Fábregas wrote:
On 07/09/2014 08:24 AM, Martin Moravcik wrote:
Please, let me know, if you have any idea.
Hi,
You need to copy the file from /lib/systemd/system/vncserver@.service to /etc/systemd/system/ as per the instructions in the vncserver@.service file (the 4 points under "Quick HowTo" at the beginning).
I copied mine to /etc/systemd/system/vncserver@:1.service and it works (I get the geometry specified there). I'm in Fedora 20 (haven't tested this on CentOS/RHEL 7) but it should be the same.
HTH, Jorge _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Thanks for your response.
The part of setting, described by you, I did, and the vncserver works fine. But the resolution of the desktop after connecting via VNC is not the one, which I set in the vncserver@:3.service. I can change the resolution in the graphic environment, but the available resolutions do not suit my needs.
As I said before, in CentOS6 the desktop resolution corresponds with the parameter -geometry in /etc/sysconfig/vncservers file. And I would like to behave my centos7 the same way.
On 07/11/2014 09:13 AM, Martin Moravcik wrote:
As I said before, in CentOS6 the desktop resolution corresponds with the parameter -geometry in /etc/sysconfig/vncservers file. And I would like to behave my centos7 the same way.
I see. The only time I had trouble with the display geometry I fixed it with the RANDR extension. You might want to try that. Like this:
...-geometry 1400x800 -nolisten tcp -localhost -extension RANDR
On 11/07/14 18:35, Jorge Fábregas wrote:
On 07/11/2014 09:13 AM, Martin Moravcik wrote:
As I said before, in CentOS6 the desktop resolution corresponds with the parameter -geometry in /etc/sysconfig/vncservers file. And I would like to behave my centos7 the same way.
I see. The only time I had trouble with the display geometry I fixed it with the RANDR extension. You might want to try that. Like this:
...-geometry 1400x800 -nolisten tcp -localhost -extension RANDR
Thanks for your advice, but it didn't helped. The behaviour is still the same.
Any other ideas/hints? ... thanks in advance