So yeah, there are times when you just need/want a complete X session remotely for some reason.. For example, in my case i have no room to set up a work station at home for my work lappy, so i’d rather use my home PC for the work stuff, however i do not want any work data transfered to my PC.
So, i came to the conclusion that remote controlling the work lappy was a good choice, however i still needed to figure out what to use for that, first option was obviously VNC but thats something i try to stay away from.. So i came to the conclusion that complete X session over SSH was a quite valid idea.. And the tinkering begins!
First of all, we need new local display for the new session.. I figured out that theres 2 good choices here.
Xephyr :2 -screen 1024x768x32 >/dev/null
#2 new X session in new TTY
sudo X -quiet -nolisten tcp -noreset +xinerama :4 vt1
After figuring out that i want it in new TTY, it was just matter of redirecting the window manager session to the display (:4 in this case)
DISPLAY=:4 ssh -Y -C -c arcfour128 firstname.lastname@example.org dwm
And were done! we have new DWM session in TTY1 for the fun tiems!
Also, you might question why -c arcfour128, and the reason for that is cause its the fastest cipher ssh protocol 2 supports. Not secure, but were in local network so were probably good to go w/o worrying.