I’m very sorry to disturb you but I just have no idea about it,
I want add 1 more user in vncserver,following some instructions on the internet(useradd user2,passwd user2,su user2,vncpasswd user2,vncserver start),but it just didn’t work.
thanks for your reply,I tried,but it didn’t work.I accepted this but encountered another problem:
when I choose the [no share] mode in vnc and start my DietPi with the console,I can connect my vnc normally whin a short time (maybe about 5 mins?),but as time goes by, I can’t start the vnc desktop normally, it just shows a black screen,any input is in vain,I have confirmed my desktop enviroment was installed and running well,and I tried to modify the parameter [rfbwait] of Xtigervnc from 30000 to 0 but it still doesn’t work.
I also didn’t work with TigerVNC so far, but just what I found:
The vncpasswd command should create: /home//.vnc/passwd
as WarHawk mentioned, then you need to add: /home//.vnc/xstartup
This file needs to be executable by the user, so: chmod +x /home//.vnc/xstartup
But this is only true for XFCE desktop. Using exec startx as last line should work for any Xserver based desktop, AFAIK.
xrdb $HOME/.Xresources seems to be optional again to apply consistent configs.
I am not 100% sure about the last line. Appending & will start the desktop as separate process, while exec will not spawn a child.
I just checked the steps we do in DietPi-Software:
Replace $cmd_launch_desktop by the correct command for your desktop (check the values assigned to this variable in code above) and as this is non-root user, perhaps xsetroot -solid grey needs to be removed, currently not sure what it does.
i have smth like that i setup vnc server but there is no user name and password option.
When i use debian vnc server ask mye user name and password so i can acces my pi everywhere.
Now i must be on local if i want to connect my pi.
Is there any solliton ?
i also created vnc account.
By default TigerVNC comes with VncAuth authentication (AFAIK, at least with our install), which means no UNIX username + password is required but only the password set priorly via vncpasswd command. It then logs in as root user.
We reworked our TigerVNC install script a bid with v6.26 according to some issues (e.g. with the read-only password) reported. Would be great if you could test it: https://github.com/MichaIng/DietPi/issues/3131
You can change the authentication method as well, e.g. by setting securitytypes=tlsvnc in ~/.vnc/config. I just found that our default VncAuth indeed is not very secure since unencrypted, thus should only be used from within the same local network. I think we will rework/harden this with next versions.