PDA

View Full Version : FC15 KDE How to convert to headless?



mozzie
15th August 2011, 04:21 AM
I currently have an FC15 KDE, set up as I like it as a media server, and with squeezeboxserver (for Logitechs media system) running fine. But I'd like to set it up as headless - and it presently needs to have a monitor attached.
No keyboard or mouse and it will boot to the login screen (so not a BIOS issue).

I need to get it to boot without needing a monitor or requiring a graphical log in.
I can administer via SSH and Squeezebox server puts up a webpage.

FC15 doesn't use inittab any more, so changing run levels is fraught.
I don't want to play with targets without a safety line ...

What's the approved best pratcice? Or workable solution?

Thanks!

Doug G
15th August 2011, 05:44 AM
I don't know if it's an "approved best practice", but for my headless servers I connect via ssh, tunnel vnc over ssh, and start a vnc server from a script (so vnc isn't running all the time), then connect via vnc over the tunnel.

You can't share the actual desktop on the remote machine (if there were a monitor). I once tweaked
Works for me with either KDE or Gnome. I don't use the "remote desktop" which doesn't like to run without being logged on first. I once tweaked x11vnc to allow me to share the gui login screen, but I seldom need to share a desktop and it was kind of a pain to get it working.

flyingfsck
15th August 2011, 06:08 AM
Howdy,

You don't need to run a whole GUI environment. You already have a desktop environment on your local machine, so why run one on the distant machine? Doing so is completely redundant. Leave the server in run level 3.

Simply use SSH with X forwarding to do what you need to do:
$ ssh -X -C -c blowfish user@server "gedit /etc/fstab"
$ ssh -X -C -c blowfish user@server "system-config-whatever"
etc.

If you install Cygwin on Windows, then the above works on Windows too.

Cheers,

F.

mozzie
15th August 2011, 01:21 PM
Thanks.
You're right, I don't need the X server, and will happily use PuTTY & Winscp, or browser. VNC is probably overkill, and I haven't tried it. I did a full GUI install as I had to play around with the Squeezebox install (Perl version update madness). So X is no longer needed, and I don't care if it is loaded or not, so long as the sshd service starts.

But I can't find how (in FC15 KDE) to set the startup to the equivalent of runlevel 3 using the FC15 replacement for inittab. "systemd uses 'targets' instead of runlevels."
Without a monitor, the install stops before loading sshd. So I have no way in. Attach a monitor, and its ok. No monitor, not Ok.

inittab has a hint

# inittab is no longer used when using systemd.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# Ctrl-Alt-Delete is handled by /etc/systemd/system/ctrl-alt-del.target
#
# systemd uses 'targets' instead of runlevels. By default, there are two main targets:
#
# multi-user.target: analogous to runlevel 3
# graphical.target: analogous to runlevel 5
#
# To set a default target, run:
#
# ln -s /lib/systemd/system/<target name>.target /etc/systemd/system/default.target.
but looking at these files makes my head hurt. There is an existing default.target, so the existing link would need to be renamed/ removed.
I'd prefer not to risk my system without some degree of oversight and advice ...

flyingfsck
16th August 2011, 08:17 AM
To set the level for next boot:
# ln -s /lib/systemd/system/runlevel3.target /etc/systemd/system/default.target

and to change it right now:
# init 3