主頁 > Computers and Internet > Debian vnc4server

Debian vnc4server

#aptitude update
#aptitude install vnc4server
#/usr/bin/vnc4passwd
#/usr/bin/vnc4server :1
#/usr/bin/vnc4server -kill :1
 
#~/.vnc/passwd
#~/.vnc/xstartup
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER #unmarkup
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic
#x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop" & twm
#x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop" & x-window-manager
x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop" & gnome-session &
 
 

NOW WITH UBUNTU YOU DNT GET ROOT YOU GET SUPERUSER, UNTIL YOU CREATE ROOT WITHThis TUT is how to install VNC off a windows pc via SSH to your LINUX server.. If you use MAC or LINUX as your home pc then you might use a dif tool to SSH to the server, BUT THE SETUP PROCES IS THE SAME FROM SECTION 2 TO THE END….

Code:
SUDO BASH

THEN ENTER PASSWORD “"WHICH YOU NOW CREATE FOR ROOT"" LATER TO ACCESS ROOT JUST USE “SU" TO ACCESS ROOT.
SO IF YOU USER SUPER USER TO SETUP VNC, WHERE EVER YOUR ASKED TO USE ROOT, IN THIS POST, ALL YOU NEED TO DO IS USE SUDO AND THAT WILL GOVE YOU THE CREDENTIALS NEEDED.

First of all, You will need root credentials to be able to complete this tutorial…

After you receive your server, 9/10x the server already come with Linux OS installed.

1: Your first step is to download and run PUTTY for WINDOWS on your PC. After downloaing putty, double click on the .exe file & enter the host name or IP into the required section & enter port 22, in the port section next to the IP. Then down below you will see a section called Saved Session, Give your session a name & save.

Now you can always start your session, by highlighting your newly named session and clicking on Load then Open

OK now we have PUTTY installed and we are able to connect to our Server

2: Your next step is to make sure your Server is up to date, with all the latest UPDATES
So open PUTTY & login, then your first command would be

Code:
apt-get update

Let it run and install all the updates needed. Then reboot your server by typing the following command.

Code:
reboot

Now re-open PUTTY

3: Now we want to install vnc4server, by typing the following command.

Code:
apt-get install vnc4server
 
4: After all is installed you should complete the following as normal user and not root.
 
 
 

So Login As what ever user you have, if not create a user by using the command
 
 
 
 
 

Code:
useradd

Because it is very unsafe to login to vnc as root, your just asking for trouble..

5: Again in PUTTY type the following. NOTICE AFTER vncserver there is a :1 that is the port numver of the user, so for 2nd user it would be vncserver :2 and so on…

Code:
vncserver :1 -geometry 1024×768 -depth 16 or vncserver :1 -geometry 1024×768 -depth 24
 
6: Once you type the above command u will be prompted for a password. This is the password u will set for vnc to connect to the server.
Enter any password you like
Now that its installed, we can change the setting for the vnc4server.But before we do that we have to kill the server.
7: Type the following command into PUTTY
 
 

 

Code:
vncserver -kill :1

8: Then

Code:
nano /home/userXX/.vnc/xstartup

(userXX = your user name) This will open a text editor, where we will configure vnc.

Paste all this code into the text editor we just opened

Code:
Code: #!/bin/sh # Uncomment the following two lines for normal desktop: unset SESSION_MANAGER # exec /etc/X11/xinit/xinitrc gnome-session & [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & # xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop" & twm

Now everything is done. All you have to do is to restart the system which is good for the setting to work properly.

9: Type the following

Code:
reboot



10: Once you have restarted your server, we need to start the vnc server by typing the following into PUTTY & your done.

Code:
vncserver

11: Install and Run VNC Viewer on your PC, and ENJOY

Now you can do the same for the following users, if required. For the next user, login as that user & follow on from step (4) to step (11)

Quote:
i.e (4) #vncserver :2 -geometry 1024×768 -depth 16

to (10) Restart the server again and start vnc server..

Also make sure to start vnc server in the same order as the ports originally assigned for each user, otherwise which ever user u start first will be on port :1 etc

YOU CAN ALSO FOLLOW THE SAME STEPS, IF YOU ARE INSTALLING A HOME SERVER AND WANT TO SETUP VNC4SERVER SO YOU CAN CONNECT FROM WORK, ONLY YOU WOULDN’T NEED PUTTY. ALL YOU WOULD DO IS REPLACE THE PUTTY STEP FOR TERMINAL, SINCE YOU ARE WORKING ON THE SERVER LOCALLY

廣告
  1. 仍無迴響。
  1. No trackbacks yet.

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com 標誌

您的留言將使用 WordPress.com 帳號。 登出 /  變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 /  變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 /  變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 /  變更 )

連結到 %s

%d 位部落客按了讚: