Set up a secure SSH tunnel by running the following command on your local machine (you can open up a new window or tab in Terminal, for example). Once done, run other commands from its startup, grant executable privileges to your new startup file with the following command: sudo chmod +x ~/.vnc/xstartup Paste the following 3 lines of text into your new file: #!/bin/bash Now use nano text editor to create a new xstartup file: nano ~/.vnc/xstartup Next, create a backup of its default startup script file: mv ~/.vnc/xstartup ~/.vnc/xstartup.bak We also want to set some commands to be run automatically every time vncserver starts up: vncserver -kill :1 ![]() Now that we’ve started the VNC server for the first time, some basic configuration files were created. Log file is /home/myvncuser/.vnc/linuxtips-86:1.log Starting applications specified in /home/linuxtipsuser/.vnc/xstartup Xauth: (argv):1: bad display name "linuxtips-86:1" in "add" commandĬreating default startup script /home/linuxtipsuser/.vnc/xstartup Xauth: file /home/linuxtipsuser/.Xauthority does not exist Would you like to enter a view-only password (y/n)? y Warning: password truncated to the length of 8. The screen output walks you through setting a VNC-specific password (limited to 8 characters), then you’re prompted on whether you wish to create a view-only password: You will require a password to access your desktops. Do not use sudo when running the following command: vncserver Now that the VNC server is installed the next step is to run the vncserver the command which will create the initial configuration and set up the password. Next, add your new user to the sudo group to grant root privileges: sudo usermod -a -G sudo linuxtipsuser ![]() Now create the new user and set its server password with the following commands: sudo useradd -m -s /bin/bash linuxtipsuser
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |