Xwindow

To switch to Console mode

Press ‘Ctrl + Alt + F1′ (F2 — F6)

To switch between consoles in Console mode

Press ‘Alt + F1′ (F2 — F6)

or repeatedly Alt+Right

To switch back to GNOME GUI mode

Press ‘Alt + F7′

http://community.linuxmint.com/tutorial/view/641

https://code.google.com/p/partiwm/source/browse/README.xpra
http://plumflowersoftware.com/blog/post/4/Using+xpra+for+fun+and+profit
http://blog.docker.io/2013/07/docker-desktop-your-desktop-over-ssh-running-inside-of-a-docker-container/

http://askubuntu.com/questions/93340/how-to-open-the-display-from-ssh-login

http://www.vogella.com/tutorials/Ubuntu/article.html#commands_find

Xephyr

Xephyr is a X server that runs as a small window within your current X session. it provides a nested X display — drawing into a window on a parent X server instead of drawing directly onto a hardware screen —

on local desktop machine (192.168.1.148)

1) sudo apt-get install xserver-Xephyr
2) Xephyr -ac -screen 800x600 -reset :1 &

-ac : Disables access control restrictions and allows to forward the session
-screen : sets the resolution of the new X session. Set it according to your need.
:1 : This specifies that the new X session is display number “1“. Your current Display is most probably “0“
-reset: Resets the X server when the last X client is closed.

Xephyr is displayed as a new window on screen.

3) ssh 711.1.861.291|resu#711.1.861.291|resu

// notice we do not forward -X here

4) on ssh-ed remote machine(192.168.1.117):

DISPLAY=192.168.1.148:1 xclock

// to mirror the whole gnome session, you can use command: gnome-session instead of xclock
5) now xclock is displayed on local machine

another approach staring from step 3

3') DISPLAY=:1 ssh -XfC -c blowfish 711.1.861.291|resu#711.1.861.291|resu xclock

-X = enable redirection X. Enables X11 forwarding.
-C = use compression
-f = puts your ssh session into the background
-c blowfish = use blowfish (this is the fastest)

however, it shows error:

X11 forwarding request failed on channel 0
xterm: Xt error: Can’t open display:
xterm: DISPLAY is not set

solution:
on remote machine(192.168.1.117):

sudo vim //etc/ssh/sshd_config

add the following two lines after:

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes   <-- new added
AddressFamily inet    <-- new added

now sudo /etc/init.d/ssh restart

then re-try step 3'.

then we do not need step 4.

Note:
- remote small machine(192.168.1.117) needs ssh server installed :
sudo apt-get install openssh-server

- local app can also be displayed in :1 screen
DISPLAY=:1 xterm

ref:

xpra

xpra stands for X Persistent Remote Applications.

https://code.google.com/p/partiwm/source/browse/README.xpra
http://plumflowersoftware.com/blog/post/4/Using+xpra+for+fun+and+profit

sudo apt-get install xpra

Typical usage works like this
ssh into the remote server and start a virtual display, then run some programs, then logout:

@client:~$ ssh server
@server:~$ xpra start :1
@server:~$ DISPLAY=:1 firefox &
@server:~$ DISPLAY=:1 gnome-terminal &
@server:~$ logout

Now connect on the client
(xpra attach ssh:<servername>:<display number>):

@client:~$ xpra attach ssh:server:1

xpra on windows:

on linux server:

xpra start :20 —start-child=gnome-terminal &
cat /home/master/.xpra/:20.log

a virtual x-screen 20 is created.

on windows client:
  • approach one:

C:\Users\user>"C:\Program Files (x86)\Xpra\xpra_cmd.exe" attach ssh:192.168.1.148:20

where 20 is the screen number

  • approach two:

use the xpra launcher

note, select ssh, user name, host is 192.168.1.148, the port select 20

https://www.xpra.org/trac/wiki/Usage

docker

http://blog.docker.io/2013/07/docker-desktop-your-desktop-over-ssh-running-inside-of-a-docker-container/#more-368

multiple virtual x-server

http://ubuntuforums.org/showthread.php?t=271674

sudo xinit — :2 &
sudo X :2 will be black screen
sudo startx — :2 will be a new desktop

ssh

http://jonisalonen.com/2010/5-cool-things-you-can-do-with-ssh-besides-logging-in/

http://chamibuddhika.wordpress.com/2012/03/21/ssh-tunnelling-explained/

run without window manager

http://askubuntu.com/questions/79804/run-a-gui-program-at-startup-on-top-of-x-with-no-window-manager

https://bbs.archlinux.org/viewtopic.php?id=107319

from console

xinit gedit  -- :2
xinit /usr/bin/firefox $* -- :2

http://www.linuxquestions.org/questions/linux-general-1/x-user-not-authorized-to-run-the-x-server-aborting-512864/#post2554894

X: user not authorized to run the X server, aborting.

Edit file /etc/X11/Xwrapper.config:
Change this line:
allowed_users=console

to

allowed_users=anybody

This will let anybody to start X.
Don't forget to change it back

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652249

restart x

http://askubuntu.com/questions/1220/how-can-i-restart-x-server-from-the-command-line

su - oracle -c 'ulimit -aHS'

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License