DietPi VNC Server Headless....head wrecked! Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
feardamhan
Posts: 21
Joined: Tue Apr 28, 2020 12:51 pm

Re: DietPi VNC Server Headless....head wrecked!

Post by feardamhan »

I take it back. Its working now with the realVNC client, pointing to 5901 as per the ss -alnp | grep Xvnc-core output

So it looks like the install process is somehow borked by some of the settings in the dietpi.txt or by some clash of installs of the chosen software in that. I will try to narrow down the cause tomorrow and report back.

If anyone can see anything in the dietpi.txt I posted in the OP that would be great!
User avatar
Joulinar
Posts: 2617
Joined: Sat Nov 16, 2019 12:49 am

Re: DietPi VNC Server Headless....head wrecked!

Post by Joulinar »

dietpi.txt doesn't do anything. The installation will be triggered due to software code you enter. At the end installation process should be same independent on the way triggered. I will do some testing on my RPi3B+ with your settings
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
feardamhan
Posts: 21
Joined: Tue Apr 28, 2020 12:51 pm

Re: DietPi VNC Server Headless....head wrecked!

Post by feardamhan »

That’s was my expectation too. I don’t think software installed manually or via dietpi.txt should make any difference. So it must be something to do with other settings. Let me know if you find anything. I will do likewise.
User avatar
Joulinar
Posts: 2617
Joined: Sat Nov 16, 2019 12:49 am

Re: DietPi VNC Server Headless....head wrecked!

Post by Joulinar »

ok it took a while but I found the issue on your config. It's basically one of the VNC server settings you changed

Code: Select all

SOFTWARE_VNCSERVER_SHARE_DESKTOP=1
Sorry that I did not spotted it before but if you set it to 1, the xserver seems not to start. You would need to set it to 0. I guess it should be 0 as there is no other desktop running except VNC.

Next to that I have seen you enabled AUTO_SETUP_AUTOSTART_TARGET_INDEX=7. Any reason for this? I guess you are running a headless system. So setting could be default. No need to change it.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
feardamhan
Posts: 21
Joined: Tue Apr 28, 2020 12:51 pm

Re: DietPi VNC Server Headless....head wrecked!

Post by feardamhan »

Thanks Joulinar. I have also found some strange behaviour when mariadb is installed. I'm currently trying to see if that was a one off gremlin or reproducable.
feardamhan
Posts: 21
Joined: Tue Apr 28, 2020 12:51 pm

Re: DietPi VNC Server Headless....head wrecked!

Post by feardamhan »

Ok, so the gremlins were more to do with the choice of VNC server. I was testing both TigerVNC and RealVNC. For some reason TigerVNC keeps shutting down when you disconnect from a session, where as RealVNC keeps running so you can connect/disconnect/connect as many times as you like

Perhaps my next question is for another thread, but now that I an reliably connect to a desktop session, I've been mucking around with trying to get the session I connect to be something other than the root login. I've tried multiple things and configurations, but nothing seems to work.

Goal is to create a new administrative user and be logged into the desktop as that user when I connect to RealVNC. Is this achievable? I've seen other folks struggling with it too.
User avatar
Joulinar
Posts: 2617
Joined: Sat Nov 16, 2019 12:49 am

Re: DietPi VNC Server Headless....head wrecked!

Post by Joulinar »

I'm able to login as user dietpi without issues, however inside VNC i'm user root. I guess this happen because the VNC session was started as root. See picture attached.
  1. On the VNC Server Information, you see that I'm login as dietpi
  2. On the LXTermianl you see that I'm root on CLI level
Attachments
picture.png
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
feardamhan
Posts: 21
Joined: Tue Apr 28, 2020 12:51 pm

Re: DietPi VNC Server Headless....head wrecked!

Post by feardamhan »

So I'm in the exact same situation. Can get connected to the session fine (as root or another user, but giving the other user permissions to connect). However, when connected to the session I need it to be a different unix user (one that has the correct file permissions on network attached drives etc)

I've tried loads of different things to try and have the desktop session autologged in as a different user, but when I try those, I lose ability to make the connection through vnc at all.
User avatar
Joulinar
Posts: 2617
Joined: Sat Nov 16, 2019 12:49 am

Re: DietPi VNC Server Headless....head wrecked!

Post by Joulinar »

What is the reason for being a different user on VNC?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
feardamhan
Posts: 21
Joined: Tue Apr 28, 2020 12:51 pm

Re: DietPi VNC Server Headless....head wrecked!

Post by feardamhan »

However, when connected to the session I need it to be a different unix user (one that has the correct file permissions on network attached drives etc)
Post Reply