VNCserver - autostart Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: VNCserver - autostart

Post by Fourdee »

myroman wrote:I tried above but does not crashes.
When I put vncserver autostart option vnc server is not started.
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 :o

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

Code: Select all

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?
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
myroman

Re: VNCserver - autostart

Post by myroman »

It says:
/dev/pts/0
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: VNCserver - autostart

Post by Fourdee »

myroman wrote: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:

Code: Select all

#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.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
myroman

Re: VNCserver - autostart

Post by myroman »

Does not work. Same problem again.
Btw, my tv is full hd, if it matters...
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: VNCserver - autostart

Post by Fourdee »

myroman wrote: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:

Code: Select all

wget https://raw.githubusercontent.com/Fourdee/DietPi/testing/dietpi/login -O /DietPi/dietpi/login
Make sure you have VNCserver autostart set (should return 6):

Code: Select all

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.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
myroman

Re: VNCserver - autostart

Post by myroman »

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

Re: VNCserver - autostart

Post by myroman »

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

MyroMan
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: VNCserver - autostart

Post by Fourdee »

myroman wrote: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:

Code: Select all

cat /root/.bashrc | grep login
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
myroman

Re: VNCserver - autostart

Post by myroman »

cat command returns:
# ~/.bashrc: executed by bash(1) for non-login shells.
/DietPi/dietpi/login

And the Youtube link is:

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'
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: VNCserver - autostart

Post by Fourdee »

myroman wrote: Sorry for low quality, I recorded it with my mobile phone.
No worries. I am capable of squinting my eyes :D

It appears VNCserver is being launched by the autostart correctly. It is running :). 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

Code: Select all

nano /etc/rc.local
Modify the following lines:

Code: Select all

/DietPi/dietpi/dietpi-services start &> /dev/null
#/DietPi/dietpi/dietpi-banner 0
Save and exit:
Press CTRL+X and say yes to save changes.

Code: Select all

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.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply