Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Lab setup

I recently setup a lab with 10 RHEL machines for big data computation using Map/Reduce frameworks. The lab was setup in a closed network in such a way that all the machines had static IP addresses assigned to them. They were connected through the switches to the router and the router was used as the default gateway to communicate with the outer world.

Ten Machines - One monitor

I had one monitor for all the 10 machines. During installation of the machines, I had to constantly switch between the machines by unplugging the monitor from one machine and connecting it to the other machine.

Is there an easy solution so that I can view all the machines using the single desktop? I need some solution like ssh which will enable me to view the desktops of all the machines using a single monitor.

share|improve this question
1  
Nice write up, generally people will use ssh to connect to the various servers. If you're doing the same thing on multiple servers you can also use tools to run the same commands simultaneously on all the other computers at the same time too. –  slm Feb 20 at 23:30
    
yeah, it is a very good software. It actually makes the life easier for everyone :) –  Ramesh Feb 20 at 23:32

1 Answer 1

up vote 2 down vote accepted

VNC Server Installation

The VNC server is specifically designed for this purpose. The installation is pretty straight forward as mentioned in this link. However, there are chances you may encounter some issues while installing. So, I am describing the issues that I faced and how I resolved them.

yum install vnc vnc-server

We need to decide which user will be using the vnc-server.

su vncuser

Now, we need to set the password.

vncpasswd

As a root user, perform the below operation.

vim /etc/sysconfig/vncservers

Add the below 2 lines.

VNCSERVERS="1:vncuser"
VNCSERVERARGS[1]="-geometry 1600x1200"

Type the below commands.

service vncserver start
service vncserver stop
chkconfig vncserver on

If the above commands are successful, we need to edit the xstartup file for whom we have configured the vncserver. So, in our case, we have configured it for the user vncuser. So,

su vncuser
vi ~/.vnc/xstartup

Uncomment the below 2 lines.

unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

If the above step is also successful, we are finished with the configuration of the VNC server. However, we need to configure the firewall to permit the vnc communication. In the link, it is mentioned to directly edit the /etc/sysconfig/iptables file which is a very wrong approach. Instead do the below step.

iptables -I INPUT 1 -p tcp --dport 5901 -j ACCEPT

We have made the changes. But we need to change them.

/etc/init.d/iptables save

service iptables restart
service vncserver start

Now, we can view this machine as vncuser from a network machine by typing the below commands.

vncviewer
#Enter the server name as,
servername:1 #1 because, we opened up port 5901. 
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.