pietrob71
November 5th, 2013, 09:41 AM
I've rented a VPS with ubuntu 12.04 server 64bit and I would like to obtain a server with an ubuntu desktop and the possibility to connect to it with NoMachine 4.
I've googled a little bit and I've found some tutorials that help me to reach my goal.
So I do this:
apt-get update
apt-get install gnome-desktop
wget http://web12.nomachine.com/download/4.0/Linux/nomachine_4.0.362_1_amd64.deb
dpkg -i nomachine_4.0.362_1_amd64.deb
Now, the server start without desktop enviroment and when I need, I connect to the server with ssh shell and type this 4 commands:
xauth -f /var/run/Xvfb-0.auth add :0 .d41d8cd98f00b204e9800998ecf8427e
xauth add :0 .d41d8cd98f00b204e9800998ecf8427e
Xvfb :0 -auth /var/run/Xvfb-0.auth -screen 0 1280x1024x24 &
DISPLAY=:0 /etc/X11/Xsession gnome-session &
/etc/init.d/nxserver restart
After this I use my NoMachine client to connect to the desktop enviroment of my server, and all works fine.
I have some questions and I hope someone can help me to optimize my configuration:
Is correct to use Xvfb or there's an alternative way?
How can I avoid to launch commands through ssh shell and automate them at the boot? I've tried to make a /etc/init.d/script and launch it as service:
!/bin/bash
xauth -f /var/run/Xvfb-0.auth add :0 .d41d8cd98f00b204e9800998ecf8427e
xauth add :0 .d41d8cd98f00b204e9800998ecf8427e
Xvfb :0 -auth /var/run/Xvfb-0.auth -screen 0 1280x1024x24 &
DISPLAY=:0 /etc/X11/Xsession gnome-session &
but it seems doesn't works and I can't to connect with my NoMachine client.
I've installed NoMachine, but it doesn't start at boot and i'm forced to start/restart it through ssh shell. Any idea?
If I decide to start the desktop enviroment only when I need it, how can I terminate it when I've finished?
Any suggestions are appreciated
Thanks in advance
Pietro Beccegato
I've googled a little bit and I've found some tutorials that help me to reach my goal.
So I do this:
apt-get update
apt-get install gnome-desktop
wget http://web12.nomachine.com/download/4.0/Linux/nomachine_4.0.362_1_amd64.deb
dpkg -i nomachine_4.0.362_1_amd64.deb
Now, the server start without desktop enviroment and when I need, I connect to the server with ssh shell and type this 4 commands:
xauth -f /var/run/Xvfb-0.auth add :0 .d41d8cd98f00b204e9800998ecf8427e
xauth add :0 .d41d8cd98f00b204e9800998ecf8427e
Xvfb :0 -auth /var/run/Xvfb-0.auth -screen 0 1280x1024x24 &
DISPLAY=:0 /etc/X11/Xsession gnome-session &
/etc/init.d/nxserver restart
After this I use my NoMachine client to connect to the desktop enviroment of my server, and all works fine.
I have some questions and I hope someone can help me to optimize my configuration:
Is correct to use Xvfb or there's an alternative way?
How can I avoid to launch commands through ssh shell and automate them at the boot? I've tried to make a /etc/init.d/script and launch it as service:
!/bin/bash
xauth -f /var/run/Xvfb-0.auth add :0 .d41d8cd98f00b204e9800998ecf8427e
xauth add :0 .d41d8cd98f00b204e9800998ecf8427e
Xvfb :0 -auth /var/run/Xvfb-0.auth -screen 0 1280x1024x24 &
DISPLAY=:0 /etc/X11/Xsession gnome-session &
but it seems doesn't works and I can't to connect with my NoMachine client.
I've installed NoMachine, but it doesn't start at boot and i'm forced to start/restart it through ssh shell. Any idea?
If I decide to start the desktop enviroment only when I need it, how can I terminate it when I've finished?
Any suggestions are appreciated
Thanks in advance
Pietro Beccegato