It is useful to run a X program in guest and display it on host.
1) Make host's x server listen to localhost:6000
host_shell$ socat -d -d TCP-LISTEN:6000,fork,bind=localhost \
UNIX-CONNECT:/tmp/.X11-unix/X0
2) Start the guest and run X program
host_shell$ lkvm run -k /boot/bzImage
guest_shell$ xlogo
Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
static int run_process(char *filename)
{
char *new_argv[] = { filename, NULL };
- char *new_env[] = { "TERM=linux", NULL };
+ char *new_env[] = { "TERM=linux", "DISPLAY=192.168.33.1:0", NULL };
return execve(filename, new_argv, new_env);
}