Re: question for VE GUI
I still have have the question, is there a way to configure a GUI on the VE's I create?
If so were can I find a tutorial or something?
If you would like to access the gui of an OpenVZ container you can install the vnc-server via the command line and then open a vnc console, NOT using the java based web vnc, but with an actual vnc viewer installed in your machines OS. The java based web utility is a nice feature, but java is a clunky and resource heavy application that complicates the matter. Do this to install vnc-server in a centos/redhat virtual machine:
$ yum install vnc-server
Install blah blah.....
****************************************************
Edit this file:
$ nano /etc/sysconfig/vncservers
Uncomment the following two lines and add a user name
Before:
#VNCSERVERS="1:yourusername"
#VNCSERVERARGS[1]="-geometry 1024x768 -depth 16"
After: (assuming your loging in as root)
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768 -depth 16"
****************************************************
Set a password to log into the vnc server:
$ vncpasswd
Password:
Verify:
****************************************************
This command enables the vncserver on port 5900+1 or 5901:
$ vncserver :1
Starting VNC server: 1:root
New 'linux.root:1 (root)' desktop is linux.root:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/linux.root:1.log
[ OK ]
*****************************************************
Now you have to edit the following file, and I have bolded the directions on what you should do inside the file. (If you can't figure this one out then god help you)
$ nano /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" &
twm &
*****************************************************
Kill the vnc server as such:
$ vncserver -kill :1
Killing Xvnc process ID 13728
*****************************************************
Restart it as such:
$ vncserver :1
Starting VNC server: 1:root
New 'linux.root:1 (root)' desktop is linux.root:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/linux.root:1.log
[ OK ]
*****************************************************
You should be good to go... now just open a vnc viewer from your desktop and go to your.server.ip.address:5901 (5900+1 as you configured your system to go to desktop 1:root)
///////////////////////////////////////////////////////////////////////////////
If THAT doesn't work then install nmap to see what ports you have open:
$ yum install nmap
Install blah blah ....
*****************************************************
Then type this command and it will spit out what is open and closed for ports on your sytem:
$ nmap -sS -O 127.0.0.1
Make sure that port 5901 is open and listen for TCP connections, if it isn't then google: open port iptables linux
Good luck!