https://wiki.archlinux.org/api.php?action=feedcontributions&user=T%21m&feedformat=atomArchWiki - User contributions [en]2024-03-28T20:53:12ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=X2Go&diff=270545X2Go2013-08-09T20:44:50Z<p>T!m: /* Configuration of the Client */</p>
<hr />
<div>[[Category:Networking]]<br />
With [http://wiki.x2go.org X2Go] you can access your desktop using another computer -- that means both LAN and internet connections. The transmission is done using the ssh protocol, so it is encrypted. By using the free nx libraries from NoMachine, a very acceptable performance in both speed and responsiveness is achieved. Even an ISDN connection runs smoothly.<br />
<br />
This makes it possible to connect your laptop to any computer with the environment, applications, and performance of the remote desktop. It is also possible to have a bunch of computers connected to a single server (terminal-server, thin-client).<br />
<br />
Clients are available for Linux (Qt4), Windows, and Mac. The latter two can be downloaded directly as binary from the X2Go homepage.<br />
<br />
== X2Go and Arch Linux ==<br />
<br />
Arch Linux X2Go packages are available in the [[official repositories]]. Currently the {{Pkg|x2goserver}} and {{Pkg|x2goclient}} are available. The LDAP based usermanagement suite is not yet finished, nor are tools that make X2Go more convenient for use in schools and thin client environments.<br />
<br />
== Installation and configuration ==<br />
<br />
=== Configuring the Server ===<br />
====Install the x2goserver package:====<br />
Install {{Pkg|x2goserver}} from the [[official repositories]].<br />
<br />
====Install the ssh-daemon:====<br />
# pacman -S openssh<br />
# systemctl start sshd.service<br />
<br />
To have sshd started at boot time:<br />
<br />
# systemctl enable sshd.service<br />
<br />
====Load the fuse module:====<br />
This makes it possible for the server to access files on the client computer.<br />
<br />
# modprobe fuse<br />
<br />
To have this module loaded at boot time, you also have to put it into the MODULES line in /etc/rc.conf, e.g.<br />
<br />
====Initialize the SQL database (and start the SQL server):====<br />
<br />
You can choose to use either Postgres or SQLite database, the latter does not need a running server.<br />
<br />
Initialize SQLite db:<br />
x2godbadmin --createdb<br />
<br />
Start the x2goserver:<br />
# systemctl start x2goserver.service<br />
<br />
If you want to have the X2Go server started at boot time:<br />
<br />
# systemctl enable x2goserver.service<br />
<br />
====Check SSH daemon configuration to allow non-English session:====<br />
<br />
If you are using other than POSIX (C) locale, you may want to add the following line to /etc/ssh/sshd_config:<br />
<br />
# Allow client to pass locale environment variables<br />
AcceptEnv LANG LC_*<br />
<br />
Then restart the daemon (as root):<br />
# systemd restart sshd.service<br />
<br />
== Configuration of the Client ==<br />
<br />
'''Install the client:'''<br />
<br />
{{Pkg|x2goclient}} is available in the [[official repositories]]. It is a Qt GUI app, although you can also check-out the command line options by running<br />
<br />
x2goclient --help<br />
<br />
'''Double check ssh'''<br />
<br />
Convince yourself that you can open a ssh-session from the client to<br />
the server (host). <br />
<br />
ssh YourUsername_onServer@yourhost_or_ip<br />
<br />
Within the local network this should not be a problem. The way you<br />
connect from beyond your network, lets say the internet, to your<br />
comuter at home is a question of how your network is build up. This<br />
would go beyond the scope of this article. Therefore here only a few<br />
items: <br />
* A port has to be opened at the router resp. gateway which forwards requests to your server, and there especially to the sshd-port (which normally is 22). To prevent a big part of the portscan attacks it is probably better to have 222 as publicly reachable port.<br />
* To prevent you from having the need to keep your public IP address in mind (especially if this changes dynamically) it is advisable to use a dynamic DNS-Service (DynDNS, DynIP). Many routers are preconfigured to be reachable under a name rather than an IP address.<br />
<br />
'''Enough preliminaries! Now to the x2goclient. Run it:'''<br><br />
x2goclient<br />
This opens the client application. You can now create several sessions, which then appear on the right side and can be selected by a mouseclick. Each entry consists of your username on the server, hostname and IP and the port for ssh-connection. Furthermore you can define several speed profiles (coming from modem up to LAN) and the desktop environment you want to start remotely.<br />
<br />
'''Common mistakes:'''<br><br />
Do not simply choose the defaults of KDE or Gnome, since the executables startkde or startgnome are usually not in the PATH when logging in using ssh. Use full paths to startkde or<br />
startgnome. You can also start openbox or another window manager. <br />
<br />
You should be asked for your password for your user at the server now and after login you will see the X2Go logo for a short time, and -- voila -- the desktop.<br />
<br />
'''Exchange data between client and server(desktop)'''<br><br />
On the x2goclient (e.g. laptop) local directories could be shared. The server will use fuse and sshfs to access this directory and mount it to a subdirectory media<br />
of your home directory on the server. This enables you to have access to laptop data on your server or to exchange files. It is also possible to mount these shares<br />
automatically at each session start.<br />
<br />
'''To leave a session temporarily'''<br><br />
Another special feature of X2Go is the possibility of suspending a session. This means you can leave a session on one client and reopen<br />
it even from another client at the same point. This can be used to to start a session in the LAN and to reopen it later on a laptop.<br />
The session data are stored and administrated in a postges database on the server in the meanwhile. The state of the sessions is protocolled<br />
by a process named x2gocleansessions.<br />
<br />
== Various ==<br />
<br />
'''Workaround for failing compositing window manager for remote session'''<br />
<br />
This is useful for situations, when the computer running x2gserver is used also for local sessions with e.g. compiz as the window manager. For remote connections with x2goclient, compiz fails to load and metacity should be used instead. The following is for GNOME, but could be modified for other desktop environments. (Getting compiz ready is not part of this how-to.)<br />
<br />
Create /usr/local/share/applications/gnome-wm-test.desktop:<br />
<br />
[Desktop Entry]<br />
Type=Application<br />
Encoding=UTF-8<br />
Name=gnome-wm-test<br />
Exec=/usr/local/bin/gnome-wm-test.sh<br />
NoDisplay=true<br />
<br />
Create script /usr/local/bin/gnome-wm-test.sh:<br />
<br />
#!/bin/sh<br />
# Script for choosing compiz when possible, otherwise metacity<br />
# Proper way to use this script is to set the key to mk-gnome-wm<br />
# /desktop/gnome/session/required_components/windowmanager<br />
xdpyinfo 2> /dev/null | grep -q "^ *Composite$" 2> /dev/null<br />
IS_X_COMPOSITED=$?<br />
if [ $IS_X_COMPOSITED -eq 0 ] ; then<br />
gtk-window-decorator &<br />
WM="compiz ccp --indirect-rendering --sm-client-id $DESKTOP_AUTOSTART_ID"<br />
else<br />
WM="metacity --sm-client-id=$DESKTOP_AUTOSTART_ID"<br />
fi<br />
exec bash -c "$WM"<br />
<br />
Modify the following gconf key to start the session with gnome-wm-test window manager:<br />
<br />
$ gconftool-2 --type string --set /desktop/gnome/session/required_components/windowmanager "gnome-wm-test"<br />
<br />
== Future ==<br />
<br />
At the moment the package consists mainly of the x2goserver and the x2goclient. It is planned to add in near future: <br />
* LDAP-Integration. This allow the administration of users, sessions and logins using LDAP. This is an interesting feature for schols or companies. For this purpose there are control programs which integrate themselves into the KDE Control Center.<br />
* The option to use x2goclient as a login screen for thin clients.<br />
* The possibility to use local devices (CD, floppy, USB-stick) remotely and transparently. <br />
<br />
Questions and problems? You could contact me also directly.<br />
[[Special:Emailuser/Gerbra|GerBra]]<br />
<br />
(Many thanks to Stefan Husmann for translation from archlinux.de wiki)<br />
<br />
== Links ==<br />
<br />
[http://wiki.archlinux.de/?title=Bild:X2go-1.png Screenshot KDE-Session]<br />
<br />
[http://wiki.archlinux.de/?title=Bild:X2go-2.png Screenshot configuration dialog]<br />
<br />
[http://x2go.berlios.de Project page]</div>T!m