Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
doc: Add tutorial section on how to use the xfconf binding
Browse files Browse the repository at this point in the history
  • Loading branch information
eiskasten committed May 28, 2023
1 parent 76cd302 commit 7e566f6
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions doc/tutorials/xfconf.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,66 @@ kdb umount /sw/xfce4/thunar/

## Replacing Xfconf with Elektra

It is also possible to replace Xfconf entirely with Elektra.
The Xfconf binding in Elektra implements the Xfconf API in such a way that it can be used as a drop-in replacement.

### Setup

To start, the Xfconf library must be replaced with the Xfconf binding.
Replacing the system libraries may require root privileges.

```shell
# Use Elektra instead of Xfconf system-wide
kdb xfconf-system-lib-replace

# Use Elektra instead of Xfconf only for the current user
kdb xfconf-user-lib replace

# When replacing only the users library, either restart the session or run
source ~/.xprofile
```

Note that a system upgrade may reset the system library replacement.

All applications that normally use Xfconf will now use Elektra instead.
This can be verified using both `xfconf-query` and `kdb`.

```shell
# Set an Xfconf property with Elektra
kdb set system:/sw/org/xfce/xfconf/test/hello world
#> Create a new key system:/sw/org/xfce/xfconf/test/hello with string "world"

# Verify it with Xfconf
xfconf-query -c test -p hello
#> world
```

### Run Xfce Using Elektra

The Xfce desktop provides some default settings which are loaded on first login.
However, if you are using Elektra instead of Xfconf, you will need to load these defaults manually.
This can be done entirely using `kdb`.

```shell
kdb xfconf-populate
```

Once this is done, an Xfce session can be started either from the login manager or manually.
From this point on, the Xfce desktop will read and write to the Elektra database.
However, Xfce also uses some properties that are not stored in Xfconf.
These properties will not work properly.
An example of such a property is the Gtk theme.

### Reverting the Libraries

If you want to stop using Elektra instead of Xfconf, you have to choose the right option depending on how you did the setup.

If you did the setup using the system libraries, it is sufficient to run it:

```shell
kdb xfconf-system-lib-restore
```

If you have chosen the user only way, you will need to edit your `~/.xprofile` file and remove the statements where the `LD_*` variables contain anything related to Xfconf.

## Data-Types Used in Xfconf

0 comments on commit 7e566f6

Please sign in to comment.