Score:0

I get 'refused by the computer' message when connecting to VNC server.. (ubuntu-22.04.)

za flag

Tdoay, I received a new ubuntu 22.04 machine.
After setting the static IP network, I followed https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-22-04 to setup vncserver and when I typed in (etri is the account name)

ssh -L 5900:localhost:5901 -C -N -l etri 129.254.32.172

it hung up. So I waited a minute and pressed ctrl-C. (why are there so many tutorials not working for me.. I have set-up vnc server many times and I use it everyday)
I called the person who delivered this machine and he says he already checked he has seen vnc connection working already. (I should have asked him earlier. so I was doing unnecessary thing..)

When I start vncserver, I get this responsed.

etri@etri:~$ vncserver :2

New Xtigervnc server 'etri:2 (etri)' on port 5902 for display :2.
Use xtigervncviewer -SecurityTypes VncAuth -passwd /home/etri/.vnc/passwd :2 to connect to the VNC server.


=================== tail /home/etri/.vnc/etri:5902.log ===================
/usr/bin/startxfce4: X server already running on display :2
xfce4-session: Another session manager is already running
==========================================================================

Session startup via '/home/etri/.vnc/xstartup' exited with status 1!

Maybe try something simple first, e.g.,
    tigervncserver -xstartup /usr/bin/xterm
The X session exited with status 1!
Killing Xtigervnc process ID 3404... success!

And this is the .vnc/xstartup code.

#!/bin/bash
xrdb $HOME/.Xresources
exec startxfce4

I'm afraied the ssl -L ... command has made something wrong... Can anyone tell me what is wrong? (I created .Xresources by touch .Xresources earlier).

Score:0
za flag

I recevied a phone call from the person who delivered the machine.
The correct method to make it work is :
You change the ./vnc/xstartup to its original below.

#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec startxfce4

And then start the vnc server using this command. (when the display is :2)

vncserver -localhost no -geometry 7680x2160 :2

And the vnc works just fine.
(I had tried -localhost no option and the SESSION_MANAGER, DBUS_SESSION_BUS_ADDRESS stuff, but I don't know why they are used sometimes and why the shouldn't... But hope this will help someone later.)

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.