Set up laptop as headless server

Hi!

I don’t own a desktop computer, only a bunch of laptops. I would like to set up one of them as a headless server. How can I do stuff like disable the screen, remove bloat, etc? I can assume that the laptop will always be plugged in, screen and keyboard will not be used.

Also, how can I make it so that I can Remote Desktop into it and use KDE, while not having KDE always run?

I’m new to this stuff and help is appreciated!

I don’t know about disabling the screen and I don’t think you’d want to disable it entirely honestly as it’d be quite handy to just get on the laptop directly for some close and personal debugging sometimes.

You don’t need a desktop on it for that though, so you can simply not enable any desktop stuff and you’re good w.r.t. “bloat”.

I’m sure there is a way to do this but I wouldn’t recommend running a desktop environment on a server to begin with.

Why not just SSH in and run your commands from the comfort of the laptop in your lap that you have configured for interactive use?


Using a laptop as a server is absolutely possible but make sure you don’t close its lid. It’s not designed to run like that for prolonged periods and the heat can easily damage the display.

I have a similar setup. I set consoleblank to 300 seconds to disable the screen after 5 minutes of inactivity:

boot.kernelParams = [ 
  "consoleblank=300"
];

Now that I think about it, I don’t remember if this just makes the screen blank or it actually turns it off (and saves power) though.

I also wasn’t aware that running a laptop with it’s lid closed for prolonged periods is bad, you can set this to disable it from turning off when the lid is closed though:

services.logind.lidSwitchExternalPower = "ignore";
1 Like