VNCserver - autostart

Hi!

I have installed DietPi on my Orange PI PC. BTW, I am newbie in linux world.

When I selected VNCserver as autostart option (on boot/reboot) the VNC server is startet but after few seconds it crashes.

When I select manual login on autostart and then manualy start VNC server it works OK.

Is there something I forgot to do (I installed all the software automaticaly as selected on first installation).

And one more quiestion, how can I monitor CPU temp?

Thanx in advnace!

You can find cpu temperature with the command:

cpu

Well, now I feel stupid! :slight_smile:
Thanx!
Now just to resolve problem with vncserver autostart.

Hi Myroman,

Thanks for the report.
I will setup my testbed here with your OPI/VNC installation and see if I can replicate the issue. I’ll be in touch.

Seems to be working for me, does not crash:


I will need to see your system setup/configuration. Could you please run the following command:

dietpi-bugreport

Follow the onscreen instructions. When the text document appears, press CTRL+X to cancel (we don’t need it :slight_smile: ). You will be given a reference CODE, please put it in your reply.

Thanx for Your help. Here is reference code;
8ac2451e8073-0

Everything looks in order.

Few questions:

  • What commands are you running to manually start VNC server?
  • You said the VNC server crashes after a few seconds. Is this after you have connected with a VNC viewer? If so, which VNC viewer are you using?

I manualy start with “vncserver” conmand.
I use android client VNC viewer, but server crushes before I even connect.
I will try tomorow to run bugreport with vncserver as autostart option. Today i run bugreport with manual login option.

The Autostart option runs the following command:

vncserver :0 -geometry 1280x720 -depth 16

Might be worth manually running the above command and see if it crashes.

I tried above but does not crashes.
When I put vncserver autostart option vnc server is not started. And then I start GUI with startx and one error appears:
“GDBus.error.org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject”
Does it have any relation with vncserver not starting?
New reference code from bugreport: 8ac2451e8073-1

Looks like the autostart is indeed broken.

I plugged in a HDMi cable to debug the issue. Appears my OrangePi PC hdmi output is also broken, no display/signal. Happy days :open_mouth:

Can you run the following command for me on the master terminal (eg: keyboard+screen):

echo $(tty)

Let me know what the command returns please.

Also, when vncserver autostart is set, does the master terminal automatically login after a reboot?

It says:
/dev/pts/0

Thanks.

It appears the OPI does not like the screen res/depth variables we set before running the vncserver command.

The following works on my system, please run these commands and reboot:

#Set VNCserver autostart
echo 6 > /DietPi/dietpi/.dietpi-autostart_index
#Override var and run directly
sed -i "/vncserver :0 /c\vncserver :0 -geometry 1280x720 -depth 16" /DietPi/dietpi/login

Let me know if this works for you.

Does not work. Same problem again.
Btw, my tv is full hd, if it matters…

Strange. Your TV resolution is irrelevant when using VNCserver as it spawns a “virtual” screen. VNCserver can be launched with any resolution.

Ok lets try using the patched/updated login script just incase issue with copy/paste:

wget https://raw.githubusercontent.com/Fourdee/DietPi/testing/dietpi/login -O /DietPi/dietpi/login

Make sure you have VNCserver autostart set (should return 6):

cat /DietPi/dietpi/.dietpi-autostart_index

If VNCserver is still not starting after the above, i’d appreciate it if you would send another dietpi-bugreport so I can verify your setup.

Will do tomorow!
My Opi Pc is on remote location, have to go in another town to play with it. :slight_smile:

Above solution does not work. Same thing… Login succesuful, few seconds is ok, then terminal crushes.
Refference: 8ac2451e8073-2

MyroMan

Hi MyroMan,

Thanks for sending the updated bug report, looking into it now. It appears the vnc server is running when you sent the bug report. I’ll need some extra information, please see below.

Login succesuful, few seconds is ok, then terminal crushes.

As I am unable to replicate the issue at my end, is there any possibility you could record the issue when it occurs (Eg: video from a fresh reboot)? I really need to see what happens. WIll help with the debugging process.

Can you also please paste the result from the following command:

cat /root/.bashrc | grep login

cat command returns:

~/.bashrc: executed by bash(1) for non-login shells.

/DietPi/dietpi/login

And the Youtube link is:
r6cgHIAq-ic
Sorry for low quality, I recorded it with my mobile phone.

And this is what I found in the log:
12/01/16 16:38:34 Xvnc version TightVNC-1.3.9
12/01/16 16:38:34 Copyright (C) 2000-2007 TightVNC Group
12/01/16 16:38:34 Copyright (C) 1999 AT&T Laboratories Cambridge
12/01/16 16:38:34 All Rights Reserved.
12/01/16 16:38:34 See http://www.tightvnc.com/ for information on TightVNC
12/01/16 16:38:34 Desktop name ‘X’ (DietPi:0)
12/01/16 16:38:34 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
12/01/16 16:38:34 Listening for VNC connections on TCP port 5900
Font directory ‘/usr/share/fonts/X11/Type1/’ not found - ignoring
Font directory ‘/usr/share/fonts/X11/75dpi/’ not found - ignoring
Font directory ‘/usr/share/fonts/X11/100dpi/’ not found - ignoring
xrdb: No such file or directory
xrdb: can’t open file ‘/root/.Xresources’

No worries. I am capable of squinting my eyes :smiley:

It appears VNCserver is being launched by the autostart correctly. It is running :slight_smile:. Have you tried connecting with a VNC viewer?
https://youtu.be/r6cgHIAq-ic?t=20s

In regards to the “garbled text” afterwards:
What you are seeing is not an error, basically the terminal print is misaligned which only happens on the OrangePi. As my OrangePi PC’s HDMI output is broken (there goes any testing), the only thing I can do is explain how to hide the text.

Edit rc.local

nano /etc/rc.local

Modify the following lines:

/DietPi/dietpi/dietpi-services start &> /dev/null
#/DietPi/dietpi/dietpi-banner 0

Save and exit:
Press CTRL+X and say yes to save changes.


12/01/16 17:39:48 Xvnc version TightVNC-1.3.9
12/01/16 17:39:48 Copyright (C) 2000-2007 TightVNC Group
12/01/16 17:39:48 Copyright (C) 1999 AT&T Laboratories Cambridge
12/01/16 17:39:48 All Rights Reserved.
12/01/16 17:39:48 See http://www.tightvnc.com/ for information on TightVNC
12/01/16 17:39:48 Desktop name 'X' (DietPi-xu4:0)
12/01/16 17:39:48 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
12/01/16 17:39:48 Listening for VNC connections on TCP port 5900
Font directory '/usr/share/fonts/X11/Type1/' not found - ignoring
Font directory '/usr/share/fonts/X11/75dpi/' not found - ignoring
Font directory '/usr/share/fonts/X11/100dpi/' not found - ignoring
xrdb: No such file or directory
xrdb: can't open file '/root/.Xresources'

Yep, I get the same on all devices.
When we install Xserver/Xorg, we only install the minimal xfonts to save resources. xrdb is not installed, you won’t need it either. You can safely ignore those items in the logfile.