Web Masters Site All For Web Masters

7Jan/110

How to Emulate a Remote Linux Desktop From Windows

It's really easy to control linux OS from windows by using remote desktop.  all what you need is several free software and done. first of all you must download SSH client I recommend Putty its free and really nice soft you can download it from here "http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" second step is to login with SSH as root and install VNC server with cent os you can do this with this command "yum install vnc-server" also you must recheck that you have installed Gnome Desktop this is important if you don't have you must install it too " yum groupinstall "GNOME Desktop Environment" " you also can use KDE&XFCE, now edit xstartup file "vi ~/.vnc/xstartup" it must be like this one and plus -Find the section where it says twm & and replace it with your choice. I know there are more, but these seem to be the most popular ones. Don't include what I have in the parenthesis

-startkde & (used for the KDE window manager)
-exec gnome-session & (used for the Gnome window manager)
-startxfce4 & (used for the XFCE4 window manager, my favorite choice)

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

#!/bin/sh
# Uncomment the following two lines for normal desktop:unset SESSION_MANAGERexec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresourcesxsetroot -solid greyvncconfig -iconic &xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &twm &

next step is to set password for VNC you can do it with command "vncpasswd", ok if every thing is done lets start vnc "vncserver :5 -geometry 800x600", this will allow connection to vnc with port 5905, ok only one step is left close Putty and restart it in Hostname write your server Ip leave port 22 to connect with SSH, then go at left side in SSH->Tunnels in secure port add 5905 and in destination add localhost:5 click Add and open, now download Tightvnc this is free clint for vnc server you can download it from here "http://www.tightvnc.com/download.php" install it and open enter localhost:5 in "TightVNC Server" and click Connect, Thats all you must enter password and you'll get remote connection to server, when you finish work you can kill vnc with this command "vncserver -kill :5".

Filed under: Linux SA Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

 

No trackbacks yet.