New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How to install VNC Server in OpenVZ VPS container (Ubuntu, Debian or CentOS)
Hello, we have created some "scripts" to setup a VNC server in OpenVZ containers.
I think someone can be interested to know it.
Simple steps:
- Run the command via SSH logged with root user.
- During the process, you will be asked to setup your VNC password
- At the end, the VPS will reboot
- When starts, connect using your VNC client, using your VPS IP and the port 1 (Ex: 192.168.20.20:1)
- Caution! You're logged as root, the server won't ask you for sudo escalation provileges. Take care about what you run on the VPS or on what websites you will navigate using the browser.
Ubuntu 12.04 - x86 and x86_64 - View source
apt-get update -y;apt-get upgrade -y;apt-get install nano -y;apt-get install gnome-core firefox flashplugin-installer -y;apt-get install vnc4server -y; vncserver; vncserver -kill :1; cd ~; wget https://ginernet.com/downloads/vnc-ubuntu-12.txt -O .vnc/xstartup; mkdir -p /etc/vncserver; echo 'VNCSERVERS="1:root"' >> /etc/vncserver/vncservers.conf; echo 'VNCSERVERARGS[1]="-geometry 1000x700"' >> /etc/vncserver/vncservers.conf; cd /etc/init.d/; wget https://ginernet.com/downloads/vnc-init-ubuntu-12.txt -O vncserver; chmod 755 vncserver; update-rc.d vncserver defaults 99; reboot;
Debian 7 - x86 and x86_64 - View source
apt-get update -y;apt-get upgrade -y;apt-get install nano -y;apt-get install gnome-core flashplugin-nonfree -y;apt-get install vnc4server -y; vncserver; vncserver -kill :1; cd ~; wget https://ginernet.com/downloads/vnc-debian-7.txt -O .vnc/xstartup; mkdir -p /etc/vncserver; echo 'VNCSERVERS="1:root"' >> /etc/vncserver/vncservers.conf; echo 'VNCSERVERARGS[1]="-geometry 1000x700"' >> /etc/vncserver/vncservers.conf; cd /etc/init.d/; wget https://ginernet.com/downloads/vnc-init-ubuntu-12.txt -O vncserver; chmod 755 vncserver; update-rc.d vncserver defaults 99; reboot;
CentOS 6 - x86_64 (not valid for 32 bit) - View source
yum install nano -y; yum update -y; yum upgrade -y; yum install tigervnc-server -y; yum groupinstall "Desktop" -y; yum install firefox -y; rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm; rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux; yum install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl -y; echo 'echo "nameserver 8.8.8.8" >> /etc/resolv.conf; ' >> /etc/rc.local; echo 'VNCSERVERS="1:root"' >> /etc/sysconfig/vncservers; echo 'VNCSERVERARGS[1]="-geometry 1000x700"' >> /etc/sysconfig/vncservers; vncpasswd; chkconfig vncserver on --level 345; reboot;
Comments
Really helpful :P I saw this a minute before i should google it :P
You had me until "apt-get install nano"...
I don't know how long i can resist the urge to get a vps in Spain.
I think you don't need to reboot VPS, just stop/start vncserver.
You might want to use block code quotes (< pre >) instead of the backticks, as the backticks screw up successive lines pretty badly.
@derp, I install allways if is not
@ehab, Still I have stock, you can wait more
@DewlanceVPS, Just to check that everything starts ok after a reboot
@GoodHosting, Fixed, thanks
Same, I got one about a week ago...
Great article thanks for the info
Debian rulz
I was about to buy the 9.99 deal the other day and then got put off when it added 20%VAT!
that happens to me a lot, ahhhwell ... its part of living in the eu so don't let it spoil the fun
You should look at x2go, much less lag, copy pasting, supports resizing the window while changing the resolution and works over SSH with keyfiles - a lot more secure.
P.S. Are your VPS's in bcn1.ovz1 DDoS protected?
Yar, his services definitely aren't worth the additional €2.
I think he means he should not have to pay VAT, so it is a matter of principle.
No, I'm fairly sure this young man resides in a country where VAT is payable.
Hm, I thought he is from Egypt or something?
I was referring to @asterisk14 and from some of the language he uses, I'm fairly sure he's from the UK.
Masri? Me? La! Ana min Al-Bakistan.
Nope, we were both wrong :P
I wasn't.
fyi
Killing Xvnc4 process ID 3300
--2014-05-27 12:38:09-- https://ginernet.com/downloads/vnc-debian-7.txt
Resolving ginernet.com (ginernet.com)... 2a03:c7c0:1:1000::2, 5.134.117.67
Connecting to ginernet.com (ginernet.com)|2a03:c7c0:1:1000::2|:443... connected.
ERROR: The certificate of
ginernet.com' is not trusted. ERROR: The certificate of
ginernet.com' hasn't got a known issuer.--2014-05-27 12:38:09-- https://ginernet.com/downloads/vnc-init-ubuntu-12.txt
Resolving ginernet.com (ginernet.com)... 2a03:c7c0:1:1000::2, 5.134.117.67
Connecting to ginernet.com (ginernet.com)|2a03:c7c0:1:1000::2|:443... connected.
ERROR: The certificate of
ginernet.com' is not trusted. ERROR: The certificate of
ginernet.com' hasn't got a known issuer.update-rc.d: using dependency based boot sequencing
I think we should have LET tax-avoidance ring going like big businesses such as Google and Amazon have. What we should do is get non-EU residents to buy EU VPS tax free and transfer them to EU citizens afterwards and the EU citizens do likewise for USA citizens. We all save a few more $$ :-) and we can be happy that less tax money = less war funding for our
governmentsregimes in USA/UK.@TarZZ94
Please, try to force using IPv4:
Change: https://ginernet.com
for: http://ipv4.ginernet.com
No, we do blackhole
Very well written.Simple steps.
Script is broken on Debian/Ubuntu sadly:
@Infinity580 you may have missing packages and wrong xstartup file config http://www.namhuy.net/3106/install-vnc-server-ubuntu-14-04.html#comment-843
@namhuy didnt helps:
@Infinity580 can you tell me what you have done so far?
@namhuy that what is mentioned in your URL, all packages are installed and i replaced the xstartup with this.