Commit aa2c9869 authored by Jens Henrik  Goebbert's avatar Jens Henrik Goebbert
parents 982f7930 23000ce4
......@@ -55,21 +55,26 @@ Hence, a new XDG desktop profile might consist only of some additional desktop i
## How are XDG Desktop Profiles chosen?
The XDG Desktop Profile is chosen with *${XDG_PROFILE}* just before the VNC server is started.
The XDG Desktop Profile is chosen by setting *${XDG_PROFILE}* just before the VNC server is started.
```shell
export XDG_PROFILE=vis
vncserver -geometry 1920x1080
vncserver
```
On JURECA the command *vncserver* has the additional option *'profile'*
```shell
vncserver -profile vis
``
The VNC server calls *${HOME}/.vnc/xstartup[.turbovnc]* (use *dot.vnc/xstartup[.turbovnc]* from this repository),
which must call **xdg_profile_init.sh** currently located in *etc/xdg/* of this repository.
which must call **xdg_profile_set.sh** currently located in *etc/xdg/* of this repository.
If the directory *etc/xdg/xdg_profiles/${XDG_PROFILE}* exists, xdg_profile_init.sh sets the *${XDG_CONFIG_\*}* and *${XDG_DATA_\*}* variables and some more.
If the directory *etc/xdg/xdg_profiles/${XDG_PROFILE}* exists, xdg_profile_set.sh sets the *${XDG_CONFIG_\*}* and *${XDG_DATA_\*}* variables and some more.
Additionally this script clears cache, creates desktop links and copies other files.
Example: starting a VNC-server-job with an the visualization XDG desktop profile on a visualization the visualization partition of JURECA:
```shell
salloc -N 1 -p vis --gres=mem512,gpu:1 --start-xserver --time=1:00:00
srun -n 1 --cpu_bind=none --gres=gpu:1 bash -c 'export XDG_PROFILE=vis; vncserver -geometry 1920x1080'
srun -n 1 --cpu_bind=none --gres=gpu:1 bash -c 'vncserver -profile vis'
```
......@@ -216,3 +221,6 @@ Devil's Pie runs in the background and is called from *etc/xdg/xdg_profiles/defa
- **call ./setup.sh to change the paths**
2. copy or link dot.vnc/xstartup[.turbovnc] to your ~/.vnc directory
3. read TODO to know what's coming next
wrapper for vncserver:
clean-up before exit - this enables to call multiple times vncserver one after the other, while running the same job
ToDo:
* call /etc/bashrc in xdg_profile_set.sh, weil manche User eine sehr sehr alte bashrc haben und diese kein Update bekommt.
* link gtk-bookmarks to ${XDG_CONFIG_HOME}/gtk-3.0/bookmarks
* merge ${XDG_CONFIG_DIRS}/gtk-3.0/bookmarks in ${XDG_CONFIG_HOME}/gtk-3.0/bookmarks
* add places $WORK und $ARCH in ${XDG_PROFILES_DIR}/default/gtk-3.0/bookmarks
* have default-module for ParaView
* adjust icon positions on desktop
* change Llview icon
* Terminal-Nachrichten an User anzeigen (write, wall)
- Idee: 1) xterm versteckt (devilspie2) laufen lassen und dort 'screen -L' starten
(screen muss zwingend im Vordergrund laufen, damit Nachrichten auch im Log landen)
2) mit anderem Script das modify-date und file-size der Logdatei pollen
wenn: Größe > 0 und letzte Änderung länger als 1 Sekunde vergangen
(Zeitversatz um 1sec: wollen verhindern, dass Nachrichten abgegriffen werden, bevor sie komplett ins Log geschrieben wurden)
dann: Inhalt der Logdatei anzeigen und Logdatei leeren/löschen.
* share VNC session with one-time-password
* list all profiles with 'vncserver -profiles'
* infoterm-scontrol-default zeigt jobs auf jureca
* infoterm-llq-default zeigt jobs auf juqueen
* infoterm-cpuquota-default zeigt cpuquota auf JURECA/JUQUEEN
* infoterm-dataquota-default zeigt dataquota auf JURECA/JUQUEEN
* color infoterm-jobtime-default 10 minutes before job-termination
* infoterm-vncperf-default zeigt aktuelle VNC-Performance (=Verbindungsqualität)
- set TVNC_PROFILE=1 before calling vncserver
- read throughput from Xvnc log file and print on background
* application submenu for all infoterms
add script to ${XDG_CONFIG_HOME}/autostart/ to create desktop icons of profiles in ~/Desktop, if not available.
* turboVNC Performance:
https://cdn.rawgit.com/TurboVNC/turbovnc/master/doc/index.html#hd007001
- allow JPEG compression (on)
- JPEG image quality (95)
- JPEG chrominance subsampling (4x)
- compression level (7-8)
- zlib compression level (3)
- palette threshold (96)
- interframe comparison (on)
automatic lossless refresh
vncserver -alr <timeout>
enable server-side multithreading:
- set TVNC_MT to 1
- set TVNC_NTHREADS to number of threads to use ( = 4)
- set VGL_NTHREADS to number of threads to use ( = 4)
infoterm:
use python and xpybutil (probably best choice) to:
- show infoterm always in background behind all other windows
- do not show infoterm in panel or window list
- do not give focus to infoterm
http://pdoc.burntsushi.net/xpybutil
https://github.com/BurntSushi/xpybutil
https://bbs.archlinux.org/viewtopic.php?id=124324
alternative:
- http://stackoverflow.com/questions/4935863/discover-what-window-is-active-on-gnome-linux-ubuntu-from-python/16703115#16703115
- http://packages.ubuntu.com/de/precise/python-wnck
- https://packages.debian.org/de/wheezy/python-wnck
- https://pypi.python.org/pypi/ewmh (python3 has no dependency on python-xlib)
work in progress:
* autokill noch nicht sauber implementiert (jj-Adims)
* start vncserver with "nice" (jj-Admins)
maybe:
* automatischer Logout nach 24h (jj-Admins)
* read /etc/bashrc in xdg_profile_set.sh (good for all who do not do this in their ~/.bashrc) (jj-Admins)
* instead of removing cache/sessions, only remove infoterms from cached session
done:
* show connection timeout on background
* show session elapsed time on background
* move startscripts for desktop-files to XDG_DATA_DIR
* fix xterm-color256 in lua-script (done - within ~/.bashrc)
* paraview.desktop starter von Terminal
* killall infoterm-...-... before call of infoterm-...-... (removed session-save option)
* check if cmd,var exists in infoterm-...-... before call
* remove ${XDG_CACHE_HOME}/sessions before starting vncserver
* rename xdg_profile_set.sh to xdg_profile_init.sh (and back :) )
* Login-Message beim Start in eigenem Fenster anzeigen
* check mime-types and their default applications -> location is ${XDG_DATA_DIR}/mime/packages
......@@ -3,9 +3,9 @@
export XDG_PROFILES_DIR=${XDG_PROFILES_DIR:-/homeb/zam/goebbert/workspace/xdg_profiles/etc/xdg/xdg_profiles}
# initialize XDG profiles
source ${XDG_PROFILES_DIR}/../xdg_profile_init.sh
source ${XDG_PROFILES_DIR}/../xdg_profile_set.sh
# run XFCE4
# run XFCE4
# (replaces the current shell with startxfce4, without forking a new process)
exec startxfce4
......
......@@ -3,9 +3,9 @@
export XDG_PROFILES_DIR=${XDG_PROFILES_DIR:-/homeb/zam/goebbert/workspace/xdg_profiles/etc/xdg/xdg_profiles}
# initialize XDG profiles
source ${XDG_PROFILES_DIR}/../xdg_profile_init.sh
source ${XDG_PROFILES_DIR}/../xdg_profile_set.sh
# run XFCE4
# run XFCE4
# (replaces the current shell with startxfce4, without forking a new process)
exec startxfce4
......
#!/bin/bash
# remove session information, as we do not want the same 'infoterm' windows to come up multiple times
rm -rf ${HOME}/.cache/sessions
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment