Skip to content
Snippets Groups Projects
README.md 5.15 KiB
Newer Older
## IMPORTANT NOTICE:

absolute paths have to be changed before use:
- etc/xdg/xdg_profiles/default/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
- etc/xdg/xdg_profiles/default/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
- etc/xdg/xdg_profiles/vis/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
- etc/xdg/xdg_profiles/vis/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml

## X Desktop Group Configuration Files (XDG_CONFIG-*)

Each desktop profile is stored in an XDG_CONFIG-directory and can inherit
configurations from other desktop profiles (like the default desktop profile).
Hence, a complete desktop configuration is defined by multiple XDG_CONFIG-directories.

Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
The desktop profile is set by setting the XDG_CONFIG-directories with the following system variables and search order:
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
- XDG_CONFIG_HOME
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
  * This is the base directory relative to which configuration files are searched first.
  * default is ~/.config
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
- XDG_CONFIG_DIRS
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
  * This is a set of preference ordered base directories relative to which configuration files are searched after $XDG_CONFIG_HOME.
  * default is /etc/xdg

and the XDG_DATA-directories with the following system variables and search order:
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
- XDG_DATA_HOME
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
  * default is not set
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
- XDG_DATA_DIRS
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
  * default is /usr/local/share:/usr/share
## How XDG Desktop Profiles is set

XDG desktop profile is set in **usr/local/bin/xdg_profile.sh**

The desktop profile is chosen by setting XDG_PROFILE before the vncserver is called. For example like this:
```shell
srun -n 1 --cpu_bind=none --gres=gpu:1 bash -c 'export XDG_PROFILE=vis; vncserver -fg -geometry 1920x1080'
```

This starts the vncserver, which executes *${HOME}/.vnc/xstartup*, which executes *usr/local/bin/xdg_profile.sh*. Depending on XDG_PROFILE the script xdg_profile.sh sets the XDG_CONFIG_* and XDG_DATA_* variables.
(in ${HOME}/.vnc/xstartup the variable XDG_BASE can be set to have global paths be located in ${HOME} for debugging)

The different profiles are located in *${XDG_BASE}/etc/xdg/xdg_profiles/*.

Check the XDG_CONFIG_* and XDG_DATA_* variables after login to see the difference:
```shell
echo "XDG_CONFIG_HOME = ${XDG_CONFIG_HOME}"
echo "XDG_CONFIG_DIRS = ${XDG_CONFIG_DIRS}"

echo "XDG_DATA_HOME = ${XDG_DATA_HOME}"
echo "XDG_DATA_DIRS = ${XDG_DATA_DIRS}"
```

## How the Info-Terminal is started

An info terminal can be part of a profile to present text information to the user.
It is located in */etc/xdg/xdg_profiles/<profile>/infoterm-<profile>*.
It is started via the desktop-file */etc/xdg/xdg_profiles/<profile>/autostart/infoterm-<profile>.desktop* on every start of XFCE4 with the desktop profile <profile>.
In all directories of XDG_CONFIG_DIRS the script infoterm-<profile>.sh is searched and (if found) executed:
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
```shell
IFS=:
for p in ${XDG_CONFIG_DIRS}; do
  if [ -e ${p}/infoterm-<profile>/infoterm-<profile>.sh ]; then
    ${p}/infoterm-<profile>/infoterm-<profile>.sh
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
    break
  fi
done
```
infoterm-<profile>.sh must be unique and only part of a single desktop profiles - do not use the same name in multiple desktop profiles.
The configuration of the info terminal is done partly in *infoterm-<profile>.sh* and partly by setting the application specific XDG_CONFIG_HOME to */etc/xdg/xdg_profiles/<profile>/infoterm-<profile>*. This is for settings, which cannot be done via command line parameters like transparency and are only stored in configuration files.
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed


## How the Background Image is set

The background image is set in *${XDF_CONFIG_*}/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml*.
The first XDF_CONFIG-directory, which includes this file sets the background image.
By default, this is in the first place the main desktop profile directory as it is the first in XDF_CONFIG_DIRS.
But system variables cannot be used in the xml-file.
Hence, only complete paths are allowed.
Background images of desktop profiles should be located in */usr/local/share/xfce4/backdrops/* to be found by XFCE4 on default.
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
This is not the case for this repository, as it is for developers who may have no access to /.
You **MUST** change image_name in etc/xdg/xdg_profiles/vis/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml !!!


## How the Application Menu Icon is set

The application menu icon is set in *${XDF_CONFIG_*}/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml*.
By default it is set in the default profile in *etc/xdg/xdg_profiles/default/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml*
to the FZJ logo located in *usr/local/share/pixmaps/fzj-logo_64x64.png*.

## XFCE4 XDG configurations

Here ${XDF_CONFIG_*} denotes all XDF_CONFIG directories, which are XDF_CONFIG_HOME and XDF_CONFIG_DIRS in its correct search order.
Here ${XDF_DATA_*} denotes all XDF_DATA directories, which are XDF_DATA_HOME and XDF_DATA_DIRS in its correct search order.

- default location of all desktop backgrounds:
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
  * ${XDF_DATA_*}/xfce4/backdrops/*

- desktop background:
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
  * ${XDF_CONFIG_*}/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml

- panel description file:
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
  * ${XDG_CONFIG_*}/xfce4/panel/

- default desktop/panel menu description file:
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
  * ${XDG_CONFIG_*}/xfce4/desktop/menu.xml

- file manager settings:
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
  * ${XDG_CONFIG_*}/xfce4/xffm/

- multi-channel-settings:
Jens Henrik Goebbert's avatar
Jens Henrik Goebbert committed
  * ${XDG_CONFIG_*}/xfce4/mcs_settings/