Score:0

Does VNC require X server running at all times?

bv flag

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.

cn flag
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 )
brovar avatar
bv flag
@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?
cn flag
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 ;-)
brovar avatar
bv flag
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?
muru avatar
us flag
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.
brovar avatar
bv flag
Thanks @muru, that's what I didn't get in the relation between an X server and a graphical manager.
Score:1
vn flag

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.

brovar avatar
bv flag
Thanks. It's getting more complicated than I've thought ;)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.