# Gnome Chess example

Gnome Chess has the executable `gnome-chess`.  
`~/.local/bin/gnome-chess` has to be created as an executable file, with this content:
```
#!/usr/bin/env bash

LD_PRELOAD=libgtk-nocsd.so /usr/bin/gnome-chess "$@"
```
In this example `"$@"` is not needed, but it is, if a program can be used to open files.

PATH needs to be set up correctly, for example my `~/.bash_profile` has this line:
```
export PATH=/home/morsmortium/.local/bin:$PATH
```
This means that the local executable will be used instead of the system one, if available.  
This is respected by Plasma app launcher (and should be by anything)

Then, as a last step, certain apps start from DBUS, when started from launchers, which completely goes around all this.  
To check if an app does this, the .desktop file of it has to be inspected.  
`/usr/share/applications/org.gnome.Chess.desktop` is the one for Gnome Chess.  
It has this line:
```
DBusActivatable=true
```
The file has to be copied into  `~/.local/share/applications/` and that line has to be removed.  

After all this, if Gnome Chess is opened from the app launcher or from the command line with `gnome-chess`, it will open without CSD.  
It can be opened without this applied with using `/usr/bin/gnome-chess` from the command line, which goes around `~/.local/bin/gnome-chess`.  

While the first steps will be avoidable once the other issue is solved, this DBUS check might not.
