2011-07-29

Log in to your remote KDE desktop through SSH.

My usual work machine is a laptop, but I also have a desktop where I run a few things as well. I control both using synergy, so that I share my laptops keyboard and mouse between both machines. but since I rarely work on the desktop directly, I took out the keyboard and the mouse to save desktop space. But every so often, it has to restart (like after updates), and logging into it again was a hassle having to plug the keyboard and mouse again. Synergy won't work unless you're logged in (meaning past the KDM log-in screen.). So what's a man to do when you're connected only via SSH?

Well, what you do is simply:
sudo kdmctl -g login :0 now username password
What does that do? The -g lets it connect using the global unix domain socket.
The login means exactly that, log in.
:0 - This tells kdm that you'd like it to happen on display 0.
now - well, it means now.
username and password would be the username and password you normally use to log into your kde desktop.

Sure as heck saves me a lot of backaches from crawling under the table just to reconnect the mouse and keyboard.

My work set-up.
Now, this won't show your desktop machine's screen on your laptop screen, since this isn't a VNC connection. This will only log in to that machines KDE desktop. Controlling it will happen using synergy (link above). Synergy runs on linux, windows and mac.Let's me have the pleasure of having two screens with the full power of two separate computers. The only thing that's missing from the mix is that you can't drag windows from one screeen to another, but I can live with that.

No comments: