x11vnc/vncviewer guru wanted for help
Hi, I am not sure where to turn for help with x11vnc and (Tiger) vncviewer that I got from the OpenSuSE 15.4 and 15.5 repositories. Google search does not show any forums dedicated to x11vnc, so I thought I would take a stab at it here. If anyone knows of a better forum or a better place to find documentation that would help be with my issue, I would greatly appreciate links! What documentation I can find just sucks and is incomplete in describing HOW x11vnc actually works... I have been a happy camper using x11vnc and vncviewer for years now to bounce around between computers and desktops on my own SOHO network. (Not always easy to configure, but I have managed...) Recently I bought a new laptop with a high res screen 3456x2160 to add to my network mix, running OpenSuSE15.5. Most of the other computers are older (OpenSuSE15.4) and running using 1920x1080 screens. All systems are running the KDE with Plasma desktops. What I want to do is to be able to VNC from my laptop (client) to display :0 on my other systems, and get a full screen display of the desktop from my remote VNC server systems. I haven't been able to figure out how to do this successfully, God only knows how many hours I have spent trying! The closest I have come is to configuring the x11vnc server and vncviewer client as follows - Remote VNC server - /usr/bin/x11vnc -display :0 -auth /run/user/1000/xauth_DFOoYd -forever -loop -noxdamage -repeat -rfbauth /etc/vncpasswd -o /var/log/x11vnc.log -rfbport 5900 -noipv6 -shared -scale 3456x2160 -quiet; Local VNC client - vncviewer -geometry 3456x2160 -DesktopSize 3456x2160 remote.mydomain.com::5900 This gives me a brief glimpse of a full screen desktop, like I want, but vncviewer immediately crashes. Vncviewer reports the following error messages - Mon Jan 8 10:05:24 2024 CMsgReader: Rect too big: 3223x2102 at 0,65535 exceeds 3456x2160 CConn: Rect too big I feel like I am starting to get above my pay grade now, there is not a lot of helpful information about "Rect" or how to configure, encode, or work with them. It seems that only an x11vnc guru can really deal with this part of the VNC model. Is there anyone on this mail list who can tackle this problem for me and help shed some light on what is going on? A command line example(s) like a picture is worth a thousand words! Much appreciate all offers of help and suggestions. Marc...
On 2024-01-08 19:39, Marc Chamberlin via openSUSE Users wrote:
vncviewer -geometry 3456x2160 -DesktopSize 3456x2160 remote.mydomain.com::5900
Not a guru but a vnc user and a googler. From this link about droidVNC-NG and a comment about tigervnc https://github.com/bk138/droidVNC-NG/issues/94 Or more specific: https://topic.alibabacloud.com/a/vnc-appeared-rect-too-big-problem-solved_8_... Test with: vncviewer -Autoselect=0 -geometry 3456x2160 -DesktopSize 3456x2160 remote.mydomain.com::5900 -- /bengan
Am 08.01.24 um 19:39 schrieb Marc Chamberlin via openSUSE Users:
Hi, I am not sure where to turn for help with x11vnc and (Tiger) vncviewer that I got from the OpenSuSE 15.4 and 15.5 repositories. Google search does not show any forums dedicated to x11vnc, so I thought I would take a stab at it here. If anyone knows of a better forum or a better place to find documentation that would help be with my issue, I would greatly appreciate links! What documentation I can find just sucks and is incomplete in describing HOW x11vnc actually works...
I have been a happy camper using x11vnc and vncviewer for years now to bounce around between computers and desktops on my own SOHO network. (Not always easy to configure, but I have managed...) Recently I bought a new laptop with a high res screen 3456x2160 to add to my network mix, running OpenSuSE15.5. Most of the other computers are older (OpenSuSE15.4) and running using 1920x1080 screens. All systems are running the KDE with Plasma desktops.
What I want to do is to be able to VNC from my laptop (client) to display :0 on my other systems, and get a full screen display of the desktop from my remote VNC server systems. I haven't been able to figure out how to do this successfully, God only knows how many hours I have spent trying! The closest I have come is to configuring the x11vnc server and vncviewer client as follows -
Remote VNC server -
/usr/bin/x11vnc -display :0 -auth /run/user/1000/xauth_DFOoYd -forever -loop -noxdamage -repeat -rfbauth /etc/vncpasswd -o /var/log/x11vnc.log -rfbport 5900 -noipv6 -shared -scale 3456x2160 -quiet;
Local VNC client -
vncviewer -geometry 3456x2160 -DesktopSize 3456x2160 remote.mydomain.com::5900
This gives me a brief glimpse of a full screen desktop, like I want, but vncviewer immediately crashes. Vncviewer reports the following error messages -
Mon Jan 8 10:05:24 2024 CMsgReader: Rect too big: 3223x2102 at 0,65535 exceeds 3456x2160 CConn: Rect too big
I feel like I am starting to get above my pay grade now, there is not a lot of helpful information about "Rect" or how to configure, encode, or work with them. It seems that only an x11vnc guru can really deal with this part of the VNC model. Is there anyone on this mail list who can tackle this problem for me and help shed some light on what is going on? A command line example(s) like a picture is worth a thousand words! Much appreciate all offers of help and suggestions.
Marc...
Please do not use html mails on this list, use plain text. i am also only vnc user. i use it for displaying old low resolution windoofs systems (98) on high resolution tumbleweed screens. for this for me was the easyest solution to use "tight vnc" its a java application. i start it with: -jar /home/simon/tightvnc/tightvnc-jviewer.jar -host=xxx.xxx.xxx.xxx -password=yyy -showConnectionDialog=No -AllowClipboardTransfer=No -ScalingFactor=200 you can zoom it or display at full screen. (should be also possible to start in fullscreen mode) simoN -- www.becherer.de
On 1/8/24 12:39, Marc Chamberlin via openSUSE Users wrote:
I feel like I am starting to get above my pay grade now, there is not a lot of helpful information about "Rect" or how to configure, encode, or work with them. It seems that only an x11vnc guru can really deal with this part of the VNC model. Is there anyone on this mail list who can tackle this problem for me and help shed some light on what is going on? A command line example(s) like a picture is worth a thousand words! Much appreciate all offers of help and suggestions.
Marc...
Alright, It's not that bad, but making friends with how to set it up and how to forward the port so you are securely accessing the remote over ssh is a bit tricky. On the server you want to connect to. It must run vncserver. The computer you connect with runs vncviewer. On Server To Connect To: You have to start vncserver the first time -- it will fail because there is no config and now user associate with your user. Just start it and let it ask you for a password and then let it crash or kill it. You will find you now have a ~/.vnc directory. In my directory (on the server hostname: 2pi that I connect to from openSUSE Leap 15.4) I have: $ l .vnc total 28 drwxr-xr-x 2 david david 4096 Mar 24 2020 . drwx------ 41 david david 4096 Jan 9 21:33 .. -rw-r--r-- 1 david david 4499 Jan 9 21:33 2pi:1.log -rw-r--r-- 1 david david 323 May 7 2019 config -rw------- 1 david david 8 May 7 2019 passwd -rwxr-xr-x 1 david david 620 May 7 2019 xstartup The .log is just that, a log. The 'config' is the vncserver config: e.g. $ cat .vnc/config ## Supported server options to pass to vncserver upon invocation can be listed ## in this file. See the following manpages for more: vncserver(1) Xvnc(1). ## Several common ones are shown below. Uncomment and modify to your liking. ## securitytypes=vncauth,tlsvnc desktop=stpdsktop geometry=1440x864 localhost alwaysshared The passwd file is just the encrypted password you typed when you started vncserver the first time and it prompted for one before crashing (delete it and it will ask again) The xstartup file tells vncserver which WM to start usually by sourcing ~/.xinitrc, just like when you type 'startx' if you don't have a DM enabled, e.g. $ cat .vnc/xstartup #!/bin/sh unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS . /home/david/.xinitrc My .xinitrc is just your normal setup for startx. I just have it start fluxbox (you can have it start any desktop you want, but icewm, fluxbox, etc.. are instantaneously available and blistering fast). You can run full Plasma if you want. It doesn't really matter since you will start the server and it will already have the desktop running before you connect to it. END OF CONFIG ON SERVER - Rest you can do on host. What you do on your box you are connecting from: It's easy. What you want to do is simply forward the X-display port from the server to a local port on your openSUSE box. You ssh into the server and then simply start vncserver from the command line (it will throw up a little dialog asking for your password). Once you start vncserver, you can then connect to the display using vncviewer. Here are the details. You will setup up port forwarding and ssh into your server all with a single short command. The X display your are forwarding (usually display :1) runs on port 5901. X display :2 runs on port 5902, ... and so on. So you are simply forwarding port 5901 from the server to any port you like on your system (I usually use 9901 for the hell-of-it). To ssh into the server and forward port 5901 to my local port 9901 all I do is: $ ssh 2pi -L 9901:localhost:5901 Which just says grab port 5901 on the server an make it 9901 here. Now since you are ssh'ed into the server, just start vncserver from the terminal you just used to ssh in and port forward. I just do: $ sudo systemctl start vncserver@:1.service That starts vncserver for display :1 on port 5901 (if you use :2, it will start display :2 on port 5902, etc..) Now just use the desktop run dialog, or another terminal to connect with vncviewer. REMEMBER you are connecting to your localhost because you already forwarded the display from the server to your box!! So all that is needed to launch vncviewer to connect to localhost port 9901 is: $ vncviewer localhost:9901 Presto! The remote desktop appears in the proper resolution you set in your ~/.vnc/config on the server, the desktop loaded through ~/.vnc/xstartup springs to life in front of you -- fully functional and blisteringly fast -- and it is all happening of a secure SSH encrypted session! Life's good :) Give it a go. You will need to adjust how you start vncserver if the remote is using an init other than systemd, but you can so the same thing with init files. Report back if you get stumped, and don't forget to look at the ~/.vnc/xxx.log file and the journal on the server if things go south. -- David C. Rankin, J.D.,P.E.
Am 10.01.24 um 05:05 schrieb David C. Rankin:
On 1/8/24 12:39, Marc Chamberlin via openSUSE Users wrote:
I feel like I am starting to get above my pay grade now, there is not a lot of helpful information about "Rect" or how to configure, encode, or work with them. It seems that only an x11vnc guru can really deal with this part of the VNC model. Is there anyone on this mail list who can tackle this problem for me and help shed some light on what is going on? A command line example(s) like a picture is worth a thousand words! Much appreciate all offers of help and suggestions.
Marc...
Alright,
It's not that bad, but making friends with how to set it up and how to forward the port so you are securely accessing the remote over ssh is a bit tricky.
On the server you want to connect to. It must run vncserver. The computer you connect with runs vncviewer.
On Server To Connect To:
You have to start vncserver the first time -- it will fail because there is no config and now user associate with your user. Just start it and let it ask you for a password and then let it crash or kill it. You will find you now have a ~/.vnc directory. In my directory (on the server hostname: 2pi that I connect to from openSUSE Leap 15.4) I have:
$ l .vnc total 28 drwxr-xr-x 2 david david 4096 Mar 24 2020 . drwx------ 41 david david 4096 Jan 9 21:33 .. -rw-r--r-- 1 david david 4499 Jan 9 21:33 2pi:1.log -rw-r--r-- 1 david david 323 May 7 2019 config -rw------- 1 david david 8 May 7 2019 passwd -rwxr-xr-x 1 david david 620 May 7 2019 xstartup
The .log is just that, a log. The 'config' is the vncserver config: e.g.
$ cat .vnc/config ## Supported server options to pass to vncserver upon invocation can be listed ## in this file. See the following manpages for more: vncserver(1) Xvnc(1). ## Several common ones are shown below. Uncomment and modify to your liking. ## securitytypes=vncauth,tlsvnc desktop=stpdsktop geometry=1440x864 localhost alwaysshared
The passwd file is just the encrypted password you typed when you started vncserver the first time and it prompted for one before crashing (delete it and it will ask again)
The xstartup file tells vncserver which WM to start usually by sourcing ~/.xinitrc, just like when you type 'startx' if you don't have a DM enabled, e.g.
$ cat .vnc/xstartup #!/bin/sh
unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS . /home/david/.xinitrc
My .xinitrc is just your normal setup for startx. I just have it start fluxbox (you can have it start any desktop you want, but icewm, fluxbox, etc.. are instantaneously available and blistering fast). You can run full Plasma if you want. It doesn't really matter since you will start the server and it will already have the desktop running before you connect to it.
END OF CONFIG ON SERVER - Rest you can do on host.
What you do on your box you are connecting from:
It's easy. What you want to do is simply forward the X-display port from the server to a local port on your openSUSE box. You ssh into the server and then simply start vncserver from the command line (it will throw up a little dialog asking for your password). Once you start vncserver, you can then connect to the display using vncviewer. Here are the details.
You will setup up port forwarding and ssh into your server all with a single short command. The X display your are forwarding (usually display :1) runs on port 5901. X display :2 runs on port 5902, ... and so on. So you are simply forwarding port 5901 from the server to any port you like on your system (I usually use 9901 for the hell-of-it). To ssh into the server and forward port 5901 to my local port 9901 all I do is:
$ ssh 2pi -L 9901:localhost:5901
Which just says grab port 5901 on the server an make it 9901 here. Now since you are ssh'ed into the server, just start vncserver from the terminal you just used to ssh in and port forward. I just do:
$ sudo systemctl start vncserver@:1.service
That starts vncserver for display :1 on port 5901 (if you use :2, it will start display :2 on port 5902, etc..)
Now just use the desktop run dialog, or another terminal to connect with vncviewer. REMEMBER you are connecting to your localhost because you already forwarded the display from the server to your box!!
So all that is needed to launch vncviewer to connect to localhost port 9901 is:
$ vncviewer localhost:9901
Presto! The remote desktop appears in the proper resolution you set in your ~/.vnc/config on the server, the desktop loaded through ~/.vnc/xstartup springs to life in front of you -- fully functional and blisteringly fast -- and it is all happening of a secure SSH encrypted session! Life's good :)
Give it a go. You will need to adjust how you start vncserver if the remote is using an init other than systemd, but you can so the same thing with init files.
Report back if you get stumped, and don't forget to look at the ~/.vnc/xxx.log file and the journal on the server if things go south.
Hi david, this sounds like a nice howtodo, will try in the future if i need vnc one suse to another suse.... -- www.becherer.de
On 1/9/24 22:05, David C. Rankin wrote:
My .xinitrc is just your normal setup for startx. I just have it start fluxbox (you can have it start any desktop you want, but icewm, fluxbox, etc.. are instantaneously available and blistering fast). You can run full Plasma if you want. It doesn't really matter since you will start the server and it will already have the desktop running before you connect to it.
Sorry Marc, I forgot to post the contents of .xinitrc in the earlier post. For completeness, it is shown without comments here: $ noc .xinitrc userresources=$HOME/.Xresources usermodmap=$HOME/.Xmodmap sysresources=/etc/X11/xinit/.Xresources sysmodmap=/etc/X11/xinit/.Xmodmap if [ -f $sysresources ]; then xrdb -merge $sysresources fi if [ -f $sysmodmap ]; then xmodmap $sysmodmap fi if [ -f "$userresources" ]; then xrdb -merge "$userresources" fi if [ -f "$usermodmap" ]; then xmodmap "$usermodmap" fi if [ -d /etc/X11/xinit/xinitrc.d ] ; then for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do [ -x "$f" ] && . "$f" done unset f fi [ -f ~/.xprofile ] && . ~/.xprofile xsetroot -cursor_name left_ptr & session=${1:-fluxbox} case $session in fluxbox ) xscreensaver & exec startfluxbox;; i3 ) exec i3;; esac Usually you just need to worry about the last few lines starting with session=${1:-fluxbox} (or whatever you want) and then you can change the case/esac contents to handle however you want to start your desktop of choice. Check your file already has the 'xsetroot -cursor_name left_ptr &' line or grab that line too. Some distros call .xprofile and .xinit by slightly different names -- double check what your Server uses. Just fit this into the post right before the "END OF CONFIG ON SERVER - Rest you can do on host." in the first post. Good luck. Simon -- make sure you add this is you saved the other as a howto. I hate missing pieces. -- David C. Rankin, J.D.,P.E.
On 1/9/24 22:05, David C. Rankin wrote:
My .xinitrc is just your normal setup for startx. I just have it start fluxbox (you can have it start any desktop you want, but icewm, fluxbox, etc.. are instantaneously available and blistering fast). You can run full Plasma if you want. It doesn't really matter since you will start the server and it will already have the desktop running before you connect to it.
Sorry Marc, I forgot to post the contents of .xinitrc in the earlier post. For completeness, it is shown without comments here:
$ noc .xinitrc userresources=$HOME/.Xresources usermodmap=$HOME/.Xmodmap sysresources=/etc/X11/xinit/.Xresources sysmodmap=/etc/X11/xinit/.Xmodmap if [ -f $sysresources ]; then xrdb -merge $sysresources fi if [ -f $sysmodmap ]; then xmodmap $sysmodmap fi if [ -f "$userresources" ]; then xrdb -merge "$userresources" fi if [ -f "$usermodmap" ]; then xmodmap "$usermodmap" fi if [ -d /etc/X11/xinit/xinitrc.d ] ; then for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do [ -x "$f" ] && . "$f" done unset f fi [ -f ~/.xprofile ] && . ~/.xprofile xsetroot -cursor_name left_ptr & session=${1:-fluxbox} case $session in fluxbox ) xscreensaver & exec startfluxbox;; i3 ) exec i3;; esac
Usually you just need to worry about the last few lines starting with session=${1:-fluxbox} (or whatever you want) and then you can change the case/esac contents to handle however you want to start your desktop of choice. Check your file already has the 'xsetroot -cursor_name left_ptr &' line or grab that line too.
Some distros call .xprofile and .xinit by slightly different names -- double check what your Server uses.
Just fit this into the post right before the "END OF CONFIG ON SERVER - Rest you can do on host." in the first post.
Good luck.
Simon -- make sure you add this is you saved the other as a howto. I hate missing pieces. me too ;-))
Am 10.01.24 um 12:11 schrieb David C. Rankin: thanks, simoN
-- www.becherer.de
On 1/9/24 20:05, David C. Rankin wrote:
On 1/8/24 12:39, Marc Chamberlin via openSUSE Users wrote:
I feel like I am starting to get above my pay grade now, there is not a lot of helpful information about "Rect" or how to configure, encode, or work with them. It seems that only an x11vnc guru can really deal with this part of the VNC model. Is there anyone on this mail list who can tackle this problem for me and help shed some light on what is going on? A command line example(s) like a picture is worth a thousand words! Much appreciate all offers of help and suggestions.
Marc...
Alright,
It's not that bad, but making friends with how to set it up and how to forward the port so you are securely accessing the remote over ssh is a bit tricky.
On the server you want to connect to. It must run vncserver. The computer you connect with runs vncviewer.
On Server To Connect To:
You have to start vncserver the first time -- it will fail because there is no config and now user associate with your user. Just start it and let it ask you for a password and then let it crash or kill it. You will find you now have a ~/.vnc directory. In my directory (on the server hostname: 2pi that I connect to from openSUSE Leap 15.4) I have:
$ l .vnc total 28 drwxr-xr-x 2 david david 4096 Mar 24 2020 . drwx------ 41 david david 4096 Jan 9 21:33 .. -rw-r--r-- 1 david david 4499 Jan 9 21:33 2pi:1.log -rw-r--r-- 1 david david 323 May 7 2019 config -rw------- 1 david david 8 May 7 2019 passwd -rwxr-xr-x 1 david david 620 May 7 2019 xstartup
The .log is just that, a log. The 'config' is the vncserver config: e.g.
$ cat .vnc/config ## Supported server options to pass to vncserver upon invocation can be listed ## in this file. See the following manpages for more: vncserver(1) Xvnc(1). ## Several common ones are shown below. Uncomment and modify to your liking. ## securitytypes=vncauth,tlsvnc desktop=stpdsktop geometry=1440x864 localhost alwaysshared
The passwd file is just the encrypted password you typed when you started vncserver the first time and it prompted for one before crashing (delete it and it will ask again)
The xstartup file tells vncserver which WM to start usually by sourcing ~/.xinitrc, just like when you type 'startx' if you don't have a DM enabled, e.g.
$ cat .vnc/xstartup #!/bin/sh
unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS . /home/david/.xinitrc
My .xinitrc is just your normal setup for startx. I just have it start fluxbox (you can have it start any desktop you want, but icewm, fluxbox, etc.. are instantaneously available and blistering fast). You can run full Plasma if you want. It doesn't really matter since you will start the server and it will already have the desktop running before you connect to it.
Hi David, Many thanks for your write up, I know that it took an effort to do so, and I am sure others will find it useful as well. Unfortunately I am not groking it and have a couple of questions of course. First of all, my systems don't seem to be using .xinitrc, instead the only related file I find in my home directories is some sort of template file called .xinitrc.template and the contents of it are very different from what you posted as your version of .xinitrc So I am not sure how to proceed with setting up vncserver. I did install it on some of my systems just to play around with it a bit, and it does start up at least but I have no way to test it yet. Keep in mind also that the contents of my home directory may not be what is expected for OpenSuSE 15.4. I have /home in it's own partition and just keep remounting it as I upgrade from one version of OpenSuSE to the next. This has bought me problems in the past as the contents of the user configuration files in all the dot directories are sometimes incompatible with the newer version of OpenSuSE that I upgrade to. I don't know whether xinitrc is expected or is used even in OpenSuSE 15.4 but it seems to be working fine without it.
END OF CONFIG ON SERVER - Rest you can do on host.
What you do on your box you are connecting from:
It's easy. What you want to do is simply forward the X-display port from the server to a local port on your openSUSE box. You ssh into the server and then simply start vncserver from the command line (it will throw up a little dialog asking for your password). Once you start vncserver, you can then connect to the display using vncviewer. Here are the details.
You will setup up port forwarding and ssh into your server all with a single short command. The X display your are forwarding (usually display :1) runs on port 5901. X display :2 runs on port 5902, ... and so on. So you are simply forwarding port 5901 from the server to any port you like on your system (I usually use 9901 for the hell-of-it). To ssh into the server and forward port 5901 to my local port 9901 all I do is:
$ ssh 2pi -L 9901:localhost:5901
Which just says grab port 5901 on the server an make it 9901 here. Now since you are ssh'ed into the server, just start vncserver from the terminal you just used to ssh in and port forward. I just do:
$ sudo systemctl start vncserver@:1.service
That starts vncserver for display :1 on port 5901 (if you use :2, it will start display :2 on port 5902, etc..)
Now just use the desktop run dialog, or another terminal to connect with vncviewer. REMEMBER you are connecting to your localhost because you already forwarded the display from the server to your box!!
So all that is needed to launch vncviewer to connect to localhost port 9901 is:
$ vncviewer localhost:9901
I haven't gotten this far and set up vncviewer correctly but I do have a question. With x11vnc (and the reason I originally chose to use it was that) I am able to connect to display :0 which is the actual display that a user sees on his/her desktop at the remote "server" end of a vnc connection. This allows me to interact with what a remote user is actually seeing in real time. Doesn't connecting to other display ports cause a new login/xsession to be created? That doesn't seem to be what I want to do, and simply causes a new desktop to be created for the client which won't be the same as what a user at the remote server is seeing on their screen... I have tried to fool around a little bit with vncviewer, but each time I tried to make a connection to display :0 on port 5900 I got told that that display port was already in use and got slapped away. But I am not sure about setting up and using vncserver without a .xinitrc file so my attempts may have been simply foolish because I am not sure about what I am doing exactly... LOL
Presto! The remote desktop appears in the proper resolution you set in your ~/.vnc/config on the server, the desktop loaded through ~/.vnc/xstartup springs to life in front of you -- fully functional and blisteringly fast -- and it is all happening of a secure SSH encrypted session! Life's good :)
Give it a go. You will need to adjust how you start vncserver if the remote is using an init other than systemd, but you can so the same thing with init files.
Report back if you get stumped, and don't forget to look at the ~/.vnc/xxx.log file and the journal on the server if things go south.
Consider me stumped and reporting back as directed. Sorry for my confusion, but again thanks for your help! Marc
On 1/14/24 12:41, Marc Chamberlin via openSUSE Users wrote:
Hi David, Many thanks for your write up, I know that it took an effort to do so, and I am sure others will find it useful as well. Unfortunately I am not groking it and have a couple of questions of course. First of all, my systems don't seem to be using .xinitrc, instead the only related file I find in my home directories is some sort of template file called .xinitrc.template and the contents of it are very different from what you posted as your version of .xinitrc So I am not sure how to proceed with setting up vncserver. I did install it on some of my systems just to play around with it a bit, and it does start up at least but I have no way to test it yet.
Yes, the .xinitrc.template is what you use to create your .xinitrc if you don't have one. Different distros load different pieces of X-setup in differnt configs. All of the stuff at the top of my file is just boilerplate from the Arch server -- you don't have to mess with that. Also, all the comments are stripped (to make is more concise). When you start vncserver for the first time, it should create ~/.vnc/xstartup or similar to start the desktop. You can simply modify that and not worry about the ~/.xinitrc as long as vncserver will bring up the desktop you want after editing ~/.vnc/xstartup. I use .xinitrc as a generic startup since this box runs headless most of the time. I just modify ~/.vnc/xstartup to source ~/.xinitrc, but start with just ~/.vnc/xstartup that is created when you first start vncserver, let it crash, kill it -- now edit ~/.vnc/xstartup and put the desktop you want at the bottom. openSUSE packages for most desktop contain a 'start....` file to start the desktop, like 'startkde' or 'starttde'. You can just add whichever you want as the last line in ~/.vnc/xstartup. Now try and start vncserver again and look at the journal or any errors you get. If there are error that it can't start the desktop there should be an Xorg.log created in your home dir that can tell you more. Once it will start the desktop you want, kill vncserver (stop it), so you can start it after you set up the port-forward to your current box.
Keep in mind also that the contents of my home directory may not be what is expected for OpenSuSE 15.4. I have /home in it's own partition and just keep remounting it as I upgrade from one version of OpenSuSE to the next. This has bought me problems in the past as the contents of the user configuration files in all the dot directories are sometimes incompatible with the newer version of OpenSuSE that I upgrade to. I don't know whether xinitrc is expected or is used even in OpenSuSE 15.4 but it seems to be working fine without it.
You are good here. I have a separate home. vncviewer / vncviewer doesn't depend on any partition specifics.
END OF CONFIG ON SERVER - Rest you can do on host.
What you do on your box you are connecting from:
It's easy. What you want to do is simply forward the X-display port from the server to a local port on your openSUSE box. You ssh into the server and then simply start vncserver from the command line (it will throw up a little dialog asking for your password). Once you start vncserver, you can then connect to the display using vncviewer. Here are the details.
You will setup up port forwarding and ssh into your server all with a single short command. The X display your are forwarding (usually display :1) runs on port 5901. X display :2 runs on port 5902, ... and so on. So you are simply forwarding port 5901 from the server to any port you like on your system (I usually use 9901 for the hell-of-it). To ssh into the server and forward port 5901 to my local port 9901 all I do is:
$ ssh 2pi -L 9901:localhost:5901
Which just says grab port 5901 on the server an make it 9901 here. Now since you are ssh'ed into the server, just start vncserver from the terminal you just used to ssh in and port forward. I just do:
$ sudo systemctl start vncserver@:1.service
That starts vncserver for display :1 on port 5901 (if you use :2, it will start display :2 on port 5902, etc..)
Now just use the desktop run dialog, or another terminal to connect with vncviewer. REMEMBER you are connecting to your localhost because you already forwarded the display from the server to your box!!
So all that is needed to launch vncviewer to connect to localhost port 9901 is:
$ vncviewer localhost:9901
I haven't gotten this far and set up vncviewer correctly but I do have a question. With x11vnc (and the reason I originally chose to use it was that) I am able to connect to display :0 which is the actual display that a user sees on his/her desktop at the remote "server" end of a vnc connection. This allows me to interact with what a remote user is actually seeing in real time. Doesn't connecting to other display ports cause a new login/xsession to be created? That doesn't seem to be what I want to do, and simply causes a new desktop to be created for the client which won't be the same as what a user at the remote server is seeing on their screen...
Yes this creates a new desktop session (multi-seat). I recall connecting to the running desktop with x11vnc in the suse 10 days, but if I'm recalling correctly, doing that directly has fallen out of favor for security reasons and it remains one of those things Wayland cannot do at all. Now you should be able to do the exact same port-forward setup and if you have a working x11vnc setup that allow you to connect to :0, then you should be able to do that securely over ssh by invoking the x11vnc startup after you ssh-and-port-forward into that host. You would just be forwarding port 5900 (for desktop :0) instead of port 5901 (for desktop :1)).
I have tried to fool around a little bit with vncviewer, but each time I tried to make a connection to display :0 on port 5900 I got told that that display port was already in use and got slapped away. But I am not sure about setting up and using vncserver without a .xinitrc file so my attempts may have been simply foolish because I am not sure about what I am doing exactly... LOL
Yes, that is because invoking vncserver (in the way I described in my original post) starts a new desktop session. I know vncviewer can connect to :0, but it would not involve starting the desktop. (I'll look at that further tonight -- haven't connected to an existing desktop since, well suse 10 days) We will get you going, as it started off with -- it's not that bad, it's just a bit of a learning curve to make friends with how to invoke the viewer and server to get the connection you want. -- David C. Rankin, J.D.,P.E.
On 1/14/24 19:59, David C. Rankin wrote:
Yes, that is because invoking vncserver (in the way I described in my original post) starts a new desktop session. I know vncviewer can connect to :0, but it would not involve starting the desktop. (I'll look at that further tonight -- haven't connected to an existing desktop since, well suse 10 days)
We will get you going, as it started off with -- it's not that bad, it's just a bit of a learning curve to make friends with how to invoke the viewer and server to get the connection you want.
Ping? David have you figured out anything more about getting vncviewer to connect to :0 while using vncserver? I am still stuck trying to figure it out myself... Marc.. -- --... ...-- .----. ... -.. . .-- .- --... .--. -..- .-- -- .- .-. -.-. <b>Computers: the final frontier. These are the voyages of the user Marc.<br> His mission: to explore strange new hardware. To seek out new software and new applications.<br> To boldly go where no Marc has gone before!<br></b>
On 1/8/24 12:39, Marc Chamberlin via openSUSE Users wrote:
I feel like I am starting to get above my pay grade now, there is not a lot of helpful information about "Rect" or how to configure, encode, or work with them. It seems that only an x11vnc guru can really deal with this part of the VNC model. Is there anyone on this mail list who can tackle this problem for me and help shed some light on what is going on? A command line example(s) like a picture is worth a thousand words! Much appreciate all offers of help and suggestions.
Marc...
Here is a screenshot (good 1-day) https://paste.opensuse.org/pastes/50c50f30773f -- David C. Rankin, J.D.,P.E.
participants (4)
-
Bengt Gördén
-
David C. Rankin
-
Marc Chamberlin
-
Simon Becherer