Kmaiti

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Tuesday, 28 December 2010

How to remotely access the linux desktop from any linux or windows machine?

Posted on 22:11 by Unknown
Guys,

I referred the following steps :

=======================
1. On server-linux(Which will be accessed) : yum install vnc*

2. On client-linux(who will access the remote desktop of the server ) : yum install vncviewer


Note : You can install the tigerVNC instead of yum. Just download the package and install it on both client and server. Here is the URL :

----------
http://sourceforge.net/projects/tigervnc/files/
----------


3. On server :
Enter command : vncpasswd
now setup a password to connect it via vnc

4. vi /etc/sysconfig/vncservers

Do the following (You can setup another user):

VNCSERVERS="1:root"

PS : here user is root

5. chkconfig vncserver on
6. service vncserver start
7. allow port 5901 at firewall

8. restart vncserver like " service vncserver restart

9. vi /root/.vnc/xstartup and comment following lines :

----
#unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc
----

Note : In case of tigerVNC you don't need to do this.

10. On client :

Execute command : vncviewer
Enter IP of the server and password of the server. Now remote desktop will appear. OR you can access the rdesktop like :

-----
[kmaiti@kmaiti ~]$ vncviewer 10.65.211.80:1
-----

Here 10.65.211.80 is the IP of the remote linux server and 1 is the 1st user which is root.

To access the server from windows machine please install vncviewer on it and execute the binary. Then put IP of the server and password. that's it.

Here are the content of the files on linux server.

----------------

[root@vm80 /]# cat /etc/sysconfig/vncservers
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# .

# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.

# Use "-nohttpd" to prevent web-based VNC clients connecting.

# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.

VNCSERVERS="1:root"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"

[root@vm80 /]#
[root@vm80 /]# cat /root/.vnc/xstartup
#!/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" &
gnome-session &
#twm &
[root@vm80 /]#

----------------
========================

Try :)
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • unable connect to socket: No route to host (113)
    Guys, This error message usually comes when you try to access remote linux desktop using vncviewer. Please check the firewall in the linux s...
  • NDMP communication failure error
    Guys, Issue : Netbackup server sends alert NDMP communication failure once everyday. But there is no issue to run scheduled backup jobs. Env...
  • How to verify UDP packet communication between two linux system?
    Guys, Today, I had to check UDP packet communication between linux and a windows system. Main purpose of the windows system was to capturing...
  • what does it mean by "cman expected_votes="1" two_node="1" in cluster.conf ?
    For two node clusters ordinarily, the loss of quorum after one out of two nodes fails will prevent the remaining node from continuing (if bo...
  • Details about NFS timeout on Red Hat Enterprise Linux 5
    There are two mount options for timeouts of an NFS request. # timeo: a timeout value. the unit is 1/10 seconds. # retran...
  • configure: error: could not find library containing RSA_new
    Guys, It seems you have enabled the SSL option during configuring the package. Please either resolve that dependency or disable the SSL opti...
  • How to configure NFSv4 with kerberos on linux?
    Guys, Please refer the following steps to do the same : Used Environment : kerberos(i.e NFSv4) server : RHEL 5.5, 64 bit arch NFS client : R...
  • How to redirect output of script to a file(Need to save log in a file and file should be menioned in the script itself?
    Expectation : @subject Steps : 1. Create a bash script. 2. add line : exec > >(tee /var/log/my_logfile.txt) That's it. All output ...
  • "cluster is not quorate. refusing connection"
    Guys, Environment : Red Hat Enterprise Linux 5.6, RHCS Error : subject line Issue : I am not sure while I got this error in the system log s...
  • How to redirect tomcat log to syslog server?
    I assume that you are going to use log4j tool to log the tomcat messages. In order to redirect these messages in syslog file, you should mod...

Categories

  • ACL
  • ESX
  • Linux
  • Storage
  • UCS

Blog Archive

  • ►  2013 (5)
    • ►  May (1)
    • ►  April (3)
    • ►  February (1)
  • ►  2012 (10)
    • ►  July (1)
    • ►  June (1)
    • ►  April (1)
    • ►  March (3)
    • ►  February (3)
    • ►  January (1)
  • ►  2011 (86)
    • ►  December (3)
    • ►  November (2)
    • ►  September (19)
    • ►  August (9)
    • ►  July (5)
    • ►  June (9)
    • ►  May (12)
    • ►  April (3)
    • ►  March (4)
    • ►  February (5)
    • ►  January (15)
  • ▼  2010 (152)
    • ▼  December (9)
      • unable connect to socket: No route to host (113)
      • How to install frysk on linux rhel5?
      • Flow diagram of systemtap debugging scripting tool?
      • How to remotely access the linux desktop from any ...
      • How to install luci and ricci for managing the clu...
      • How to configure a High Availability Cluster (Hear...
      • How to configure autofs with NFS4?
      • How to install and configure NFSv4 server and clie...
      • Which desktop is used by my linux machine?
    • ►  November (34)
    • ►  October (20)
    • ►  September (14)
    • ►  August (24)
    • ►  July (19)
    • ►  June (3)
    • ►  May (25)
    • ►  April (3)
    • ►  January (1)
Powered by Blogger.