b683c8a8489501969822dfdd5320488e982c0647
faq-remote-X11-beta.md
... | ... | @@ -0,0 +1,117 @@ |
1 | +# Remote X11 (beta) - x2go and xpra |
|
2 | + |
|
3 | +In general x2go is easier to use and sufficient for most scenarios. Xpra has better performance and uses less resources. Both clients connect through ssh and are generally faster than ssh -Y. Support for these is beta, x2go is more familiar to the support staff. Most linux systems do not have these tools installed, so you may need to request them. |
|
4 | + |
|
5 | +We recommend using x2go. x2go is more familiar to the support staff and it is easier ti use. |
|
6 | + |
|
7 | +# x2go |
|
8 | + |
|
9 | +## download |
|
10 | +x2go can be downloaded from this page. |
|
11 | + |
|
12 | +https://wiki.x2go.org/doku.php/download:start |
|
13 | + |
|
14 | +## Additional Steps |
|
15 | +You will need to open System Preferences - Security - General - Temporarily 'Allow from anywhere' open the application, make sure you can reopen it. Then change your security setting back to 'App Store and Identified Developers' |
|
16 | + |
|
17 | +For all systems off of the sbgrid network it will be easiest if you use the [cmcd-vpn](faq-connecting-to-cmcd-vpn). |
|
18 | + |
|
19 | +x2go requires XQuartz - see [faq-using-sbgrid-programs](faq-using-sbgrid-programs) if you do not already have it installed. |
|
20 | + |
|
21 | +From the x2go application - |
|
22 | +Create a new session |
|
23 | +Make sure you fill out the following - |
|
24 | + 1. host - the host that you want to connect to. |
|
25 | + 2. login - your username |
|
26 | + 3. port - 22 |
|
27 | + 4. Session type - Mate |
|
28 | + |
|
29 | +You can adjust the resolution after the session has started. |
|
30 | + |
|
31 | + |
|
32 | +# Xpra |
|
33 | + |
|
34 | +xpra has been described as 'tmux for X11' and we are evaluating its usefullness. |
|
35 | + |
|
36 | +## OSX to Linux workstation usage |
|
37 | + |
|
38 | +For Mac OSX newer than 10.9 the installer is on their downloads page |
|
39 | +https://www.xpra.org/trac/wiki/Download |
|
40 | + |
|
41 | +For our usage please us the 'pkg' installer located here - |
|
42 | +https://xpra.org/dists/osx/x86_64/Xpra.pkg |
|
43 | + |
|
44 | +The other version is built around a gui that we are not covering for now. |
|
45 | + |
|
46 | +### xpra, keep it simple! |
|
47 | + |
|
48 | +On your local Mac OSX system open a terminal window and run |
|
49 | +`xpra start ssh/oconnor@sch-boltzmann/42 --start-child=xterm` |
|
50 | + |
|
51 | +With this one command you should have a remote xterm window come up. From there you can launch whatever application you need to run on the other system, including applications that need GLX extensions such as coot. |
|
52 | + |
|
53 | +To disconnect, just ^c from the original terminal window(not the xterm that you connected to), or if you connect from another system it will automatically detach. |
|
54 | + |
|
55 | +So to reattach to attach - |
|
56 | + |
|
57 | +`xpra attach ssh/oconnor@sch-boltzmann/42` |
|
58 | + |
|
59 | +Note the number 42. You need to pick a number that someone else on the system is not using. Do not use a low number that could be inuse by the system like 0 - 5, instead pick a higher number up to 999. |
|
60 | + |
|
61 | +Note, if you simply close all the windows, including xterm, the remote server is still running |
|
62 | +`ssh oconnor@sch-boltzmann` |
|
63 | +`xpra list` |
|
64 | +Found the following xpra sessions: |
|
65 | +/run/user/46627/xpra: |
|
66 | + LIVE session at :666 |
|
67 | +`xpra stop :666` |
|
68 | +xpra at :666 has exited. |
|
69 | + |
|
70 | +Or one might have run |
|
71 | +`xpra start ssh/oconnor@sch-boltzmann/42 --start-child=xterm --window-close=shutdown` |
|
72 | +,but if you accidentally close the window everything will close. |
|
73 | + |
|
74 | +For all systems off of the sbgrid network it will be easiest if you use the [cmcd-vpn](faq-connecting-to-cmcd-vpn). |
|
75 | + |
|
76 | +If you are more linux saavy you can try tunneling your connections as well for exapmle - |
|
77 | + |
|
78 | +'ssh -L 4444:ja-gpu1:22 -N oconnor@crystal.harvard.edu' |
|
79 | +open a new terminal and then - |
|
80 | +`xpra start ssh/oconnor@localhost:4444/617 --start-child=xterm --window-close=shutdown` |
|
81 | + |
|
82 | +## Troubleshooting tips. |
|
83 | + |
|
84 | +Ideally you would have already set up [SSH Without a Password](faq-setting-up-passwordless-ssh) |
|
85 | + |
|
86 | +Make sure you can ssh to the host without error. You should not need to type 'yes' for ssh keys, etc. |
|
87 | + |
|
88 | +Press enter one time - is it waiting for password input? |
|
89 | + |
|
90 | +connect to the remote host and type - |
|
91 | +`xpra list` |
|
92 | + |
|
93 | +If there is an active session you can connect to it via `xpra attach ssh/user@host/42' from your client. |
|
94 | + |
|
95 | +There could be an active session with no windows open. Stop the session and start again. |
|
96 | +'xpra stop :42` |
|
97 | + |
|
98 | +Lastly try to launch a session from the host in a tmux or screen session on the remote server - |
|
99 | +`ssh user@myhost" |
|
100 | +`tmux` |
|
101 | +`xpra start :617 --daemon=no --start-child=xterm` |
|
102 | +You should see a line that that contains `xpra is ready.` |
|
103 | +Detach with CTRL-b - d keys and then you can attach from your own system like so |
|
104 | +`xpra attach ssh/oconnor@sch-boltzmann/617` |
|
105 | + |
|
106 | +The launching from within a tmux or screen session might be easier to experiment with other flags like "start-desktop" |
|
107 | +`xpra start-desktop --start=mate-session :618 --daemon=no' |
|
108 | + |
|
109 | +See Also |
|
110 | +`man xpra' |
|
111 | + |
|
112 | +There are a lot of features, but for our usage keep it simple. |
|
113 | + |
|
114 | +## xpra via https |
|
115 | + |
|
116 | +Work in progress - Not currently functional. |
|
117 | + |
faq-setting-up-passwordless-ssh.md
... | ... | @@ -1,19 +1,25 @@ |
1 | 1 | # Setting up password-less ssh |
2 | - * NOTE: All sbgrid bound Servers and Workstations require 'pub' key to be ***uploaded***: See Below |
|
2 | + * ***NOTE***: All SBGrid bound Servers and Workstations on the SBGrid network in the Longwood area require 'pub' key to be ***uploaded*** to our. authentication servers. Please follow the steps named "Generate SSH Keys" and "For Systems on the SBGrid network at Longwood" below. |
|
3 | + |
|
4 | + Off Quad systems (at MCB, HU, Tufts, Genzyme) please following the steps named "Generate SSH Keys" and "For Off-Quad SBGrid Systems" below. |
|
3 | 5 | |
6 | +### Generate SSH Keys |
|
7 | + |
|
4 | 8 | 1. Generate ssh key-pair for local workstation: `ssh-keygen -t rsa` ; accept default options and hit return when prompted for passphrase. |
5 | - 2. Copy public key (`~/.ssh/id_rsa.pub`) to remote system: `scp ~/.ssh/id_rsa.pub remotesys:~/` If this is the first connection to the remote system, type `yes` to accept the remote system key. |
|
6 | - 3. Login to remote system, configure remote system to trust public key: |
|
9 | + |
|
10 | +#### For Off-Quad SBGrid Systems |
|
11 | + 1. Copy public key (`~/.ssh/id_rsa.pub`) to remote system: `scp ~/.ssh/id_rsa.pub remotesys:~/` If this is the first connection to the remote system, type `yes` to accept the remote system key. |
|
12 | + 2. Login to remote system, configure remote system to trust public key: |
|
7 | 13 | |
8 | 14 | * `ssh remotesys` |
9 | 15 | * create ~/.ssh if it doesn't exist: `mkdir ~/.ssh` |
10 | 16 | * `cat ~/id_rsa.pub >> ~/.ssh/authorized_keys` |
11 | 17 | * `chmod 700 ~/.ssh` |
12 | 18 | * `chmod 640 ~/.ssh/authorized_keys` |
13 | - 1. Logout of remote system, and repeat login to check that everything works correctly. If so, `~/id_rsa.pub` can be removed from the remote system. |
|
19 | + 3. Logout of remote system, and repeat login to check that everything works correctly. If so, `~/id_rsa.pub` can be removed from the remote system. |
|
14 | 20 | |
15 | -###For SBGrid Systems |
|
16 | -There is no need for ~/.ssh/authorized_keys, the file is ignored on all our linux systems. The 'pub' key ***must*** be uploaded to our authentication servers. These examples assume you copied the pub key over, you can also copy and paste the entire contents of the .pub file between systems. |
|
21 | +###For Systems on the SBGrid network at Longwood |
|
22 | +There is no need for ~/.ssh/authorized_keys, the file is ignored on all our linux systems on the SBGrid network at Longwood. The 'pub' key ***must*** be uploaded to our authentication servers. These examples assume you copied the pub key to your Linux home directory, you can also copy and paste the entire contents of the .pub file between systems. |
|
17 | 23 | |
18 | 24 | You will need to run these commands on **crystal.harvard.edu**. If you are a Consortium member use shell.sbgrid.org. |
19 | 25 |
faq-sshfs.md
... | ... | @@ -34,3 +34,15 @@ between the local system and the remote system. |
34 | 34 | 4. Run SSHFS installer `pkg` |
35 | 35 | 5. Create a folder to access the remote filesystems (aka a mount point): `mkdir /sshfs/` |
36 | 36 | |
37 | +## OS X (Mac) helpful hints |
|
38 | + |
|
39 | +A good example of mounting from OSX on your local system is as follows - |
|
40 | +`sudo mkdir -p /sshfs/userdocs` |
|
41 | +`sudo chown -R $USER /sshfs` |
|
42 | +`/usr/local/bin/sshfs oconnor@crystal.harvard.edu:/nfs/userdocs /sshfs/userdocs -o volname=userdocs,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,idmap=user,auto_xattr,dev,suid,defer_permissions,noappledouble,noapplexattr,IdentityFile=$HOME/.ssh/sshfs-id_rsa` |
|
43 | + |
|
44 | +Basically, your local user needs to own the destination $PATH. We mount one complete filesystem from the remote site(avoids local Apple Finder issues). We give the volume a name (shows mount point on your desktop), add some additional options for server connections, etc. If you are using an [ssh key](faq-setting-up-passwordless-ssh.md) you would add it's path to the IdentityFile paramater. |
|
45 | + |
|
46 | +On occasion the mount wll become stuck and unresponsive, so you may be required to force unmount it before mounting it again. |
|
47 | +`umount -f /sshfs` |
|
48 | + |
faq-using-sbgrid-programs.md
... | ... | @@ -35,6 +35,11 @@ emulate an 8-bit color scheme for running applications such as WEB. |
35 | 35 | If you need to download a newer version of X11 for OS X, you can find the |
36 | 36 | binaries here: <http://xquartz.macosforge.org/trac/wiki> |
37 | 37 | |
38 | +To enable GL required by some programs like coot you will need to run this in a terminal from your account. |
|
39 | +``` |
|
40 | +defaults write org.macosforge.xquartz.X11 enable_iglx -bool true |
|
41 | +``` |
|
42 | + |
|
38 | 43 | ## Running SBGrid Programs |
39 | 44 | |
40 | 45 | Running programs from the SBGrid software tree should be as simple as opening |