This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
wiki:advanced:x2gohtmlclient [2021/12/31 20:49] mikep Revise instructions after working through real install |
wiki:advanced:x2gohtmlclient [2022/10/03 13:30] gratuxri |
||
---|---|---|---|
Line 9: | Line 9: | ||
X2Go provides instructions for configuring the NGINX web server, but you can substitute another server if you prefer. Your operating system distribution likely provides packages containing the dependencies not provided by X2Go. | X2Go provides instructions for configuring the NGINX web server, but you can substitute another server if you prefer. Your operating system distribution likely provides packages containing the dependencies not provided by X2Go. | ||
- | {{: | ||
{{: | {{: | ||
====== Components ====== | ====== Components ====== | ||
- | ===== X2GoHTMLClient | + | ===== x2gohtmlclient |
- | ==== index.html | + | Contains the JavaScript and other assets that are served to a browser. The main page is '' |
+ | * the X2Go server address, | ||
+ | * a username, | ||
+ | * a password, | ||
+ | * the desktop environment to start, | ||
+ | * whether to use an SSH proxy, | ||
+ | * an optional proxy username, and | ||
+ | * an optional proxy password. | ||
- | Client HTML page. This page can be modified or embedded in existing webpage. It has two modes: native client and embedded | + | {{: |
- | < | + | |
- | X2Go Server address | + | |
- | Username | + | |
- | Password | + | |
- | Command to execute (KDE, GNOME, ICEWM, etc) | + | |
- | SSH Proxy (if not specified no proxy will be used) | + | |
- | Proxy login | + | |
- | Proxy password | + | |
- | </ | + | |
- | The HTML page can be modified to predefine one or more of this settings. Important functions inside of this page should be defined: | + | |
- | < | + | |
- | function getUname() | + | |
- | function getPass() | + | |
- | function getCommand() | + | |
- | function getName() | + | |
- | function getProxy() | + | |
- | function getProxyUser() | + | |
- | function getProxyPass() | + | |
- | </ | + | |
- | ==== x2gokdriveclient.html | + | '' |
+ | The file '' | ||
- | The HTML Page to run X2Go client in separate window. By default the session's window is embedded in the start page. User can " | + | The x2gohtmlclient package also provides CSS, images, and three JavaScript classes: |
+ | - '' | ||
+ | - '' | ||
+ | - '' | ||
- | ==== CSS/ | + | ===== x2gowebrpc ===== |
- | WEB styles for HTML pages | + | The x2gorpc.cgi CGI script connects to the X2Go server using SSH and starts sessions, |
- | + | ||
- | ==== SRC/*png SRC/*svg ==== | + | |
- | + | ||
- | Image resources | + | |
- | + | ||
- | ==== SRC/ | + | |
- | + | ||
- | Communication between HTML page and X2Go HTML Client | + | |
- | + | ||
- | ==== SRC/ | + | |
- | + | ||
- | Communication between X2Go RPC script and X2Go HTML Client | + | |
- | + | ||
- | ==== SRC/ | + | |
- | + | ||
- | X2GoKdrive JS client | + | |
- | + | ||
- | ===== x2gorpc.cgi | + | |
- | + | ||
- | CGI script | + | |
===== x2gowswrapper ===== | ===== x2gowswrapper ===== | ||
- | The application that is connecting | + | The x2gowswrapper program connects the TCP sockets of the X2Go KDrive |
====== Configuring the Web Server ====== | ====== Configuring the Web Server ====== | ||
We describe how to configure NGINX and fcgiwrap, but you can substitute any web server that provides the needed features. | We describe how to configure NGINX and fcgiwrap, but you can substitute any web server that provides the needed features. | ||
- | + | Here is an example NGINX configuration: | |
- | ''/ | + | |
< | < | ||
server { | server { | ||
listen 443 ssl; | listen 443 ssl; | ||
server_name your_host; | server_name your_host; | ||
- | ssl_certificate | + | ssl_certificate |
- | ssl_certificate_key | + | ssl_certificate_key |
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256: | ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256: | ||
ssl_protocols TLSv1.2; | ssl_protocols TLSv1.2; | ||
Line 122: | Line 92: | ||
} | } | ||
</ | </ | ||
+ | Note that the location ''/ | ||
====== Building and Installing ====== | ====== Building and Installing ====== | ||
Line 127: | Line 98: | ||
===== x2gohtmlclient ===== | ===== x2gohtmlclient ===== | ||
- | Run ./minify.sh to combine x2gohtmlclient' | + | Run '' |
- | The output will be dist/ | + | The output will be '' |
- | The other assets should be installed as follows: | + | The other assets should be installed as follows. Create the parent directories as required. |
- | * Place index.html in $WEBROOT/assets/css/. | + | * Place '' |
- | * Place css/* in $WEBROOT/ | + | * Place '' |
- | * Place img/*/*/* in $WEBROOT/ | + | * Place '' |
===== x2gowebrpc ===== | ===== x2gowebrpc ===== | ||
- | Copy x2gorpc.cgi to $WEBROOT/ | + | Copy '' |
===== x2gowswrapper ===== | ===== x2gowswrapper ===== | ||
Line 145: | Line 116: | ||
$ qmake-qt5 && make | $ qmake-qt5 && make | ||
</ | </ | ||
- | Install the resulting program named x2gowswrapper to /usr/sbin/. | + | Install the resulting program named x2gowswrapper to '' |
- | Create the directory / | + | Create the directory |
- | Create the file named / | + | Create the file named '' |
< | < | ||
ws_proto=wss | ws_proto=wss | ||
Line 157: | Line 128: | ||
log_dir=/ | log_dir=/ | ||
</ | </ | ||
- | Ensure the values of ssl_cert and ssl_key match NGINX' | + | Ensure the values of '' |
and ensure the user running NGINX can read the files at both paths as well as the configuration file itself. | and ensure the user running NGINX can read the files at both paths as well as the configuration file itself. | ||
+ | |||
+ | ===== proof of concept installation on Debian GNU/Linux ===== | ||
+ | |||
+ | < | ||
+ | sudo apt install extrepo | ||
+ | sudo extrepo enable x2go | ||
+ | sudo apt update | ||
+ | sudo apt install x2gohtmlclient | ||
+ | </ | ||
+ | |||
+ | ===== proof of concept installation on Ubuntu GNU/Linux from Launchpad PPA ===== | ||
+ | |||
+ | < | ||
+ | sudo add-apt-repository ppa: | ||
+ | sudo add-apt-repository ppa: | ||
+ | sudo apt update | ||
+ | apt install x2gohtmlclient | ||
+ | </ |