Auto Run Vncserver after Ubuntu login account
Problem: If remote Ubuntu is restarted on Remote Desktop, the VNC session fails.
Solution: A solution is to use putty to open the restart of Ubuntu into the account after the VNC session. For convenience, you can set the VNC session to start automatically after the login account, and the session number can be fixed, the VNC Viewer can maintain the original session connection.
Steps: Under Ubuntu, enter the/ETC/PROFILE.D folder and create the file ***.sh, which reads:
That is, a VNC session with session number 5 is turned on.
Note: any. sh files in the/ETC/PROFILE.D folder in the above methods are the command files that are automatically loaded and run when the system enters the account.