1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
Debugging GNOME Software
========================
GNOME Software can be a little harder to debug than other applications, because
it is typically started early in a user’s session, and it runs in the
background.
Runtime debugging
---
If gnome-software is already running and you want to enable debug output from
this point onward, run:
```
gnome-software --verbose
```
This will tell the running instance to enable verbose logging, without needing
to restart.
By default, all log messages from gnome-software are sent to
[the systemd journal](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html).
Messages, warnings and errors are always logged; debug and info messages are
only logged if verbose output is enabled.
To view the messages from the currently running gnome-software process, run:
```
journalctl --user --boot "$(which gnome-software)"
```
Start-time debugging
---
If you are starting gnome-software manually, you have a little more control over
log output.
The `--verbose` command line argument will enable verbose mode for the newly
started process. If run from a terminal, all log messages will be printed on the
terminal rather than being sent to the systemd journal. As with journal logging,
debug and info messages will only be printed if they are enabled.
An alternative to the `--verbose` argument are the following environment
variables:
* `GS_DEBUG=1`
* `GS_DEBUG_NO_TIME=1`
* `G_MESSAGES_DEBUG=*`
`GS_DEBUG` and `GS_DEBUG_NO_TIME` are equivalent to `--verbose`, enabling output
of all log messages. Normally messages are printed with timestamps, but
`GS_DEBUG_NO_TIME` disables that if you want to save space.
`G_MESSAGES_DEBUG=all` is equivalent to the above, but other values can be
passed to it to filter debug log output to certain message domains.
Persistent debugging
---
Verbose debug output may be made persistent by modifying GNOME Software's systemd
service to set an extra environment variable:
```
mkdir -p ~/.config/systemd/user/gnome-software.service.d
cat <<EOF > ~/.config/systemd/user/gnome-software.service.d/debug.conf
[Service]
Environment=GS_DEBUG=1
EOF
systemctl --user daemon-reload
systemctl --user restart gnome-software.service
```
Note that this will produce a lot of debug output which will consume a
noticeable amount of space in your systemd journal over time.
Forcing an auto-update check
---
GNOME Software automatically checks for updates in the background based on a
timer. To force a background auto-update check, this timer can be reset and the
currently running GNOME Software instance will schedule a check:
```
for key in $(gsettings list-keys org.gnome.software | grep timestamp); do gsettings reset org.gnome.software $key; done
```
|