Re: [Hampshire] Ubuntu LTS server problems

Top Page

Reply to this message
Author: Stuart Sears
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Ubuntu LTS server problems
On 21/08/10 20:29, Tim wrote:
> On Friday 20 August 2010 15:51:13 Daniel Spain wrote:
>>> OK not so much problems but more of how do I do it
>>>
>>> I have just installed Ubuntu 10.04 LTS Server onto a new server, it boots
>>
>> to
>>
>>> CLI, I then sudo"user" startx to get a gui interface (yes I know gui and
>>
>> server
>>
>>> are not everybody cup of tea but for me it is).
>>>
>>> But as the server won't be next to me I need to access it remotely, now
>>> if
>>
>> the
>>
>>> server is up and running (and X is running) I can run TightVNC and access
>>
>> the
>>
>>> server. But if the server goes down (reboot or powercut, I can get
>>
>> somebody
>>
>>> to
>>> push the button on the front on the server to start it for me), I can
>>> then
>>
>> ssh
>>
>>> into the server and login as me, but if I try to startX from ssh it won't
>>
>> I
>>
>>> think it is trying to run X just to the ssh client I have open and not
>>
>> start X
>>
>>> globally on the server. How can I start X globally on the server from an
>>
>> ssh
>>
>>> session?
>>>
>>> Tim
>>
>> DISPLAY=:0.0 sudo "user" startx?
>>
>> I may be wrong though....I know that works for launching graphical apps via
>> an ssh session, but may not be correct for startx itself.
>>
>> You could always just have the server start it automatically on boot.
>>
>> Dan.
>>
>>
>> --
>> Please post to: Hampshire@???
>> Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
>> LUG URL: http://www.hantslug.org.uk
>> --------------------------------------------------------------
>
> OK the command that works is
>
> DISPLAY=:0.0 sudo startx
>
> So running SSH and logging in as me (a user) and then running the above command
> starts X on the server, A minor problem is closing the SSH window on the remote
> PC shutsdown X on the server. I then have to open a second SSH window to start
> the vnc server (although I could do that before I start X or put it in a script
> to start on bootup at a later date).


You do realise that you don't actually need X running locally on the
server to use VNC? And that you can forward a VNC connection over ssh,
with a command similar to this:

vncviewer -via user@remoteserver localhost:1
(might not be :1, depends on your configuration. In fact on ubuntu might
not even be vncviewer :) )

I'm not an ubuntu person, so I can't tell you precisely how to configure
or start vnc on that, but it really should be possible to run as a
normal system service, listening only on localhost.

On a Red Hat-like system you can install the vnc-server package and just
configure the /etc/sysconfig/vncservers file, then
vncpasswd
(as the appropriate user
and
service vncserver (or /etc/rc.d/init.d/vncserver) start

I'd assume that similar processes would work on an ubuntu box.

google comes up with some of the following...

http://ubuntuforums.org/showthread.php?t=189555

http://ubuntuforums.org/showthread.php?t=191564&highlight=vnc+gnome

http://theseekersquill.wordpress.com/2010/03/16/vnc-server-ubuntu-windows/

http://www.ehow.com/how_5089245_install-vnc-server-ubuntu.html


Regards,

Stuart
--
Stuart Sears RHCA etc.
"It's today!" said Piglet.
"My favourite day," said Pooh.