Skip to content

Commit

Permalink
Add the method to force arch-update to run in a specific terminal e…
Browse files Browse the repository at this point in the history
…mulator via the desktop file to the documentation (as a workaround for people using a terminal emulator not supported by `gio` for whom clicking on the systray applet icon does nothing)

This PR aims to add the method required to force `arch-update` to run in a specific terminal emulator via the desktop file to the documentation.
This is to document this as workaround for people using a terminal emulator not [known/supported](https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/gdesktopappinfo.c#L2694) by `gio` (for whom cliking on the systray applet icon does nothing and reports the following error: `gio: Unable to launch application ‘/usr/share/applications/arch-update.desktop’: Unable to find terminal required for application`).

It also includes some alternatives, such as creating a symlink pointing to `/usr/bin/xterm` for the desired terminal emulator, or simply installing a supported terminal emulator.

Fixes #162
  • Loading branch information
Antiz96 committed May 18, 2024
1 parent 5df4ccb commit 49ea4ed
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ The systray applet attempts to read the `arch-update.desktop` file at the below

In case you want/need to customize the `arch-update.desktop` file, copy it in a path that has a higher priority than the default installation path and modify it there (to ensure that your custom `arch-update.desktop` file supersedes the default one and that your modifications are not being overwritten on updates).

This can be useful to force the `arch-update.desktop` file to launch `Arch-Update` within a specific terminal emulator for instance.
**If clicking the systray applet does nothing for you**, please read [this chapter](#force-the desktop-file-to-run-with-a-specific-terminal-emulator).

### The systemd timer

There is a systemd service (in `/usr/lib/systemd/user/arch-update.service` or in `/usr/local/lib/systemd/user/arch-update.service` if you installed `Arch-Update` [from source](#from-source)) that executes the `check` function when started (see the [Documentation](#documentation) chapter).
Expand Down Expand Up @@ -237,6 +240,21 @@ See <https://www.freedesktop.org/software/systemd/man/latest/systemd.time.html#P

In case you want `Arch-Update` to check for new updates only once at boot, you can simply delete the `OnUnitActiveSec` line completely.

### Force the desktop file to run with a specific terminal emulator

`gio` (which is used to launch the `arch-update.desktop` file when the systray applet is clicked) currently supports a [limited list of terminal emulators](https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/gdesktopappinfo.c#L2694).
If you don't have any of these terminal emulators installed on your system, you might face an issue where clicking the systray applet [does nothing](https://github.com/Antiz96/arch-update/issues/162) and reports the following error: `[...] Unable to find terminal required for application`.

While waiting for Gnome to implement a way to allow people using their terminal emulator of choice with `gio` (which will hopefully [happen at some point](https://gitlab.freedesktop.org/terminal-wg/specifications/-/merge_requests/3)), you can workaround this issue by copying the `arch-update.desktop` file to `$HOME/.local/share/applications/arch-update.desktop` (for instance, see [this chapter](#the-systray-applet) for more details) and modifying the `Exec` line in it to "force" `arch-update` to launch with your terminal emulator of choice.
For instance, with [alacritty](https://alacritty.org/) *(check your terminal emulator's manual to find the correct option to use)*:

```text
[...]
Exec=alacritty -e arch-update
```

Alternatively, you can create a symlink for your terminal emulator that points to `/usr/bin/xterm`, which is the fallback option for `gio` (for instance, with [alacritty](https://alacritty.org): `sudo ln -s /usr/bin/alacritty /usr/bin/xterm`) or you can simply install one of the terminal emulators [known/supported](https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/gdesktopappinfo.c#L2694) by `gio`.

## Contributing

You can raise your issues, feedbacks and suggestions in the [issues tab](https://github.com/Antiz96/arch-update/issues).
Expand Down

0 comments on commit 49ea4ed

Please sign in to comment.