Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How to install VNC Server in OpenVZ VPS container (Ubuntu, Debian or CentOS)
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.

How to install VNC Server in OpenVZ VPS container (Ubuntu, Debian or CentOS)

jmginerjmginer Member, Patron Provider
edited May 2014 in Tutorials

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;
«1

Comments

  • Really helpful :P I saw this a minute before i should google it :P

    Thanked by 1jmginer
  • derpderp Member

    You had me until "apt-get install nano"...

    Thanked by 2jmginer msg7086
  • ehabehab Member

    I don't know how long i can resist the urge to get a vps in Spain.

    Thanked by 1jmginer
  • DewlanceVPSDewlanceVPS Member, Patron Provider
    edited May 2014



    I think you don't need to reboot VPS, just stop/start vncserver.

    Thanked by 1jmginer
  • @jmginer said:

    You might want to use block code quotes (< pre >) instead of the backticks, as the backticks screw up successive lines pretty badly.

    Thanked by 1jmginer
  • jmginerjmginer Member, Patron Provider
    edited May 2014

    @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

  • joereidjoereid Member

    @ehab said:
    I don't know how long i can resist the urge to get a vps in Spain.

    Same, I got one about a week ago...

  • Great article thanks for the info :)

  • MaouniqueMaounique Host Rep, Veteran
    apt-get install xfce4 iceweasel mc p7zip xrdp
    

    Debian rulz :)

  • @ehab said:
    I don't know how long i can resist the urge to get a vps in Spain.

    I was about to buy the 9.99 deal the other day and then got put off when it added 20%VAT!

  • ehabehab Member

    @asterisk14 said:

    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?

  • NekkiNekki Veteran

    asterisk14 said: I was about to buy the 9.99 deal the other day and then got put off when it added 20%VAT!

    Yar, his services definitely aren't worth the additional €2.

  • MaouniqueMaounique Host Rep, Veteran

    I think he means he should not have to pay VAT, so it is a matter of principle.

  • NekkiNekki Veteran

    Maounique said: 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.

  • MaouniqueMaounique Host Rep, Veteran

    Hm, I thought he is from Egypt or something?

  • NekkiNekki Veteran

    Maounique said: 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.

  • asterisk14asterisk14 Member
    edited May 2014

    @Maounique said:
    Hm, I thought he is from Egypt or something?

    Masri? Me? La! Ana min Al-Bakistan.

  • MaouniqueMaounique Host Rep, Veteran

    asterisk14 said: Masri? Me? La! Ana min Al-Bakistan.

    Nekki said: I was referring to @asterisk14 and from some of the language he uses, I'm fairly sure he's from the UK.

    Nope, we were both wrong :P

  • NekkiNekki Veteran

    Maounique said: Nope, we were both wrong :P

    I wasn't.

  • TarZZ92TarZZ92 Member

    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 ofginernet.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 ofginernet.com' hasn't got a known issuer.
    update-rc.d: using dependency based boot sequencing

  • asterisk14asterisk14 Member
    edited May 2014

    @Nekki said: No, I'm fairly sure this young man resides in a country where VAT is payable.

    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 governments regimes in USA/UK.

  • jmginerjmginer Member, Patron Provider

    @TarZZ94

    Please, try to force using IPv4:

    Change: https://ginernet.com

    for: http://ipv4.ginernet.com

  • jmginerjmginer Member, Patron Provider
    edited May 2014

    @linuxthefish said: P.S. Are your VPS's in bcn1.ovz1 DDoS protected?

    No, we do blackhole

    Thanked by 1linuxthefish
  • Very well written.Simple steps.

  • NeoonNeoon Community Contributor, Veteran

    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

  • NeoonNeoon Community Contributor, Veteran

    @namhuy didnt helps:

  • @Infinity580 can you tell me what you have done so far?

  • NeoonNeoon Community Contributor, Veteran
    edited October 2014

    @namhuy that what is mentioned in your URL, all packages are installed and i replaced the xstartup with this.

Sign In or Register to comment.