0

For most of you my question will probably be pretty basic (if not stupid), but I'm new to managing anything Linux-based and need to make sure.

I've recently set-up a home server with Ubuntu Server. It stays in the basement (so physical access is constricted), most of the time I connect with it using SSH, and it's configured to work only in "console-mode" with a need to explicitly start SLiM to work with GUI. However, from time to time I could use a graphical interface.

I decided to install a VNC server there and learned that it requires X server to be installed - that's fine. I just can't find any description how it actually works. Will it just start the X server on its own and stop it upon disconnection? Or will the X have to work all the time?

OR should I maybe use X forwarding over SSH? Although aside from this server I use only Windows machines and I've heard that this method may be problematic.

Thanks in advance for any advice.

brovar
  • 101
  • 1
    Old but still valid: https://askubuntu.com/questions/256095/does-vncviewer-require-x-locally as it answers your title. If you want another alternative: teamviewer. Also capable of logging into a console session (more https://community.teamviewer.com/English/kb/articles/4352-how-to-install-teamviewer-on-linux-without-graphical-user-interface ) – Rinzwind Aug 19 '21 at 09:31
  • @Rinzwind Thanks for the links, especially the one regarding teamviewer. I just still don't get one thing, maybe I just don't understand how linux works (and the first link doesn't dispel my doubts). When using those graphical solutions, does the X server need to be actually running (not just installed)? Or does is run all the time anyways and it's just the graphical manager, that may be turned on and off? – brovar Aug 19 '21 at 09:55
  • 1
    If it does not run you can always start it yourself before you need it ;-) "that may be turned on and off" yes. Generally I would assume you let the x server running though but you can stop/start x. And cuz you like links here is another one: https://askubuntu.com/questions/518454/what-does-startx-command-do It is about the startx command ;-) – Rinzwind Aug 19 '21 at 10:02
  • I know it (and virtually everything ;)) can be stopped/started when it's need, I just want to make it as automatic and maintenance free as I can. Let me maybe rephrase my question(s):
    1. Is X server by default always running? If so, all my worries are negligible and we can just stop here.
    2. If not (1), then does/can vnc server start/stop the x serv depending or an upcoming connection?
    – brovar Aug 19 '21 at 11:03
  • 1
    You say "it's configured to work only in "console-mode" with a need to explicitly start SLiM to work with GUI" - so you run SLIM which in turn starts an X server. So by your own configuration, X is not always running. – muru Aug 19 '21 at 11:17
  • Thanks @muru, that's what I didn't get in the relation between an X server and a graphical manager. – brovar Aug 19 '21 at 12:07

1 Answers1

1

Xvnc has own X-Server Embedded See: https://unix.stackexchange.com/questions/129432/vnc-server-without-x-window-system It starts own X-Server using a script. vncserver is a script that starts the external X-Server if it is not running.