Enabling tightvnc server

I installed the tightvnc server and use a vnc client on an unbuntu desktop. I am able to connect but only get a grey screen. The same basic configuration works for my Raspberry PI4’s. Has any one got this configuration to work with the BBAI64?

1 Like

Hello,

Usually, I install a GUI OS along w/ the server, i.e. xfce4 or others.

Anyway, under the file .vnc is a xstartup file to change things. It will help to review .vnc files for future reference.

~/.vnc/xstartup is the file in question. You can even make the screen another color or make the terminal pop up when connecting.

Seth

P.S. Reboot after installing tightvncserver.

My GUI OS is xfce4.
I start the server as follows:
$ vncserver -geometry 1280x768 -depth 24

New ‘X’ desktop is Beaglebone:1

Starting applications specified in /home/userxx/.vnc/xstartup
Log file is /home/userxx/.vnc/BeagleBone:1.log

When I connect with a vnc client I am still getting the grey screen. This is my “xstartup” file
#!/bin/sh

xrdb “$HOME/.Xresources”
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title “$VNCDESKTOP Desktop” &
#x-window-manager &
#Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession

1 Like
#!/bin/bash
xrdb “$HOME/.Xresources”
#xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title “$VNCDESKTOP Desktop” &
startxfce4 &
#x-window-manager &
#Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession

The x-terminal-emulator line when uncommented makes the terminal pop up on boot w/ vnc.

Seth

I do get the “terminal emulator” to show on the remote desktop client. Behind the “terminal emulator” i get a mesh type screen for a background. With the “terminal emulator” commented out, this is the image I get.

This is a copy of my vnc logfile.

BeagleBone:1.log.txt (4.9 KB)

1 Like

Hello,

I found some articles I used to use to get up and running w/ TightVNC and RealVNC on Win 11.

Are you using a Linux desktop w/ a particular Distro? If so, I may be able to research from that point forward.

Also…

This is a starter for making things work under Ubuntu.

Seth

P.S. If you are using a Debian development desktop, I can further search ideas. For now, I am using RealVNC under Win 11 to test. I can try another kernel and distro if you are using Debian. Just please let me know.

For debian, a bunch of useful info. is listed here: Xfce - Debian Wiki .

I will try to start my machine and see how far I get.

Update

When is the last time you updated/upgraded the system and have you rebooted the system to start VNC and/or the xfce4 OS?

Another Update

#!/bin/sh

xrdb "$HOME/.Xresources"
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
startxfce4 &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession

That is my start up script under ~/.vnc/xstartup . I am currently receiving a BeagleBoard.org icon for now.

Boris.

Anyway, there may be some files in /etc/systemd/system/ worth looking into for now. I need to check this out myself to see if I can get xfce4 rat to show. So anyway, I think this is as far as I can take you…

The reason I say that is b/c I have one SD Card that works w/ this board so far and a ton of info. on it. Plus, the image is a RT kernel image. I am trying different ideas from the RT kernel right now.

There is some QT app or something showing evidence of the Boris Icon and beagleboard.org on the tightvncserver allocation. I am sure of it. I just currently do not know where it is located or if it is hardcoded in.

Thanks for the help. I am running Ubuntu 22.10 and their “Vinagre Remote Desktop Viewer”. I have never had a problem running this with Raspberry PI 4’s, 64 bit OS. I haven’t run the PI’s that way for several months. I will fire one up tonight and see what OS and Desktop they are running. I also will check one of my Beaglebone Black’s seems like I had VNC working on them some time ago.

PS: The terminal mode with a solid grey background it is the Desktop GUI that won’t work. It makes me believe it is the XFCE Desktop that is the problem.

1 Like

@klindsayjr ,

Remember, when in doubt, reboot the machine. Sometimes it takes a reboot to have the files available for use. Also, sometimes it just takes signing out and then back in again.

You can always change the background too. I use blue at times or the actual xfce4 screen w/ the rat!

Good luck. If I figure things out and try another desktop, I will let you know. Also, did you start w/ a minimal image or the IoT or GUI image?

Seth

Gui image. RPI4 uses tigervncserver not sure what the desktop is.

Figured out what the problem is. If I have logged on to my desktop where the hdmi port is connected to my BBAI64, I can only get the “terminal emulator” sitting on top of a grey background which is my desktop. If I have not logged on I get the GUI plus the “terminal emulator”. Conclusion, I can only have one GUI session open at a time. Their maybe something in settings with the session manager.

So thanks for your help I am now able to use the GUI remotely.

1 Like

Okay…

So, no two GUI instances open at a time. That is new to me.

Seth

P.S. Live and learn I guess!

I can have 2 sessions with the Raspberry PI’s. The only reason is to keep me from modifying the GUI. I think I will see if I can do that on the PI’s. Also I may try to launch “vncserver” as :2 instead of the default :1.

PS: Launching “vncserver” as :2 doesn’t work either.

Summarizing what I have learned:

  1. This is a copy of my vnc “xstartup” with the “x-terminal-emulator” line commented out, GUI only.
    #!/bin/sh

xrdb “$HOME/.Xresources”
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title “$VNCDESKTOP Desktop”
#x-window-manager &
#Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession

Note: BBAI64 image and Kernel version are:
bbai64-emmc-flasher-debian-11.7-xfce-arm64-2023-05-03-10gb.img.xz
Linux BeagleBone 5.10.168-ti-arm64-r103 #1bullseye SMP Fri May 12 23:47:21 UTC 2023 aarch64 GNU/Linux

  1. If you log into a monitor/GUI display connected to the BBAI64 Display HDMI port as userxx1. You can not connect to a VNC Remote Viewer as userxx1. But you can connect to a VNC Remote Viewer as userxx2.

  2. If you have logged into a monitor/GUI display connected to the BBAI64 HDMI port as userxx1. And your /home/userxx1/.vnc/xstartup has the “x-terminal-emulator” line uncommented. You can connect to a VNC Remote Viewer as userxx1 with the GUI screen as a blank grey background behind the “x-terminal-emulator” in the foreground.

1 Like

@klindsayjr ,

Hello. I think vnc in general has many uses and varieties of ways to put in the script something worth noting. I never really learned enough about it outside of using them and learning how to secure them w/ .service files w/ the @ symbol w/in the .service file naming scheme.

I am sure there are a million ways to handle scripts w/ and w/in VNC.

Seth

P.S. Thank you for acknowledging the correct way to handle multiple screens. I learned something!

I think already mentioned you cannot have USERX logged in locally and also log in as USERX over VNC at the same time on Debian 12. On Debian 11 you can have two sessions logged in as described but things get Wonky if you try to open Evolution over VNC. Over the past few months I’ve been connecting to Debian 11 remotely to write some code. I found that works fine but I don’t check email and when I get home I typically reboot box to normalize everything for a local session. At start of day before I leave the house I reboot box, open a tty as USERX and launch vncserver. When I get home reboot again for local session.
Also on Debian 12 if I have vncserver running when I try to log in to local Xwindows session I keep getting returned to login prompt. I need to kill vncserver first.
Inconvenient but that’s the only way to operate that I’ve figured out so far.
Similar operation on BBB and AI-64 running Debian.

1 Like

Hello,

W/ Bookworm, I have been able to do some stuff too. I never, or not yet, had thought about it…

1. tightvncserver is what I use w/ one server only
2. vncserver // This is the command to start it
3. I use xfce4 usually w/ my beagleboard.org Distros they provide
4. W/ two Bookworm distros, I have had some issues. Never thought twice but...
5. A workaround I found to work is to delete the current session on my VNC Viewer
6. Start a new VNC Viewer session so I can sign in again. 

That was the trouble. You are right, I think. I can sign into one server but it needs to be new and not stale.

Seth

P.S. @n1ety , there is a site called Medium and another called Digital Ocean. I find some of their tutorials well thought out and spoken to readers like me looking for more than a quick fix. Do not get my wrong. I like fixes if I can do anything about it. But…extra oomph and knowledge is always fun too.

Anyway, thank you. Oh! Just to reiterate…

  1. vncserver
  2. Open a new VNC Viewer instance each time
  3. I can and might test later in the week for dual vncserver applications
  4. Thank you for the heads up…