From 5ab1bc5914bf7cbebd2c8b54697e14da28c0226b Mon Sep 17 00:00:00 2001 From: David Else <12832280+David-Else@users.noreply.github.com> Date: Fri, 12 Jul 2024 02:16:55 +0100 Subject: [PATCH] Documentation: Convert links in the `.desktop` file to absolute paths (#11115) --- book/src/building-from-source.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/book/src/building-from-source.md b/book/src/building-from-source.md index 666917ea4524..42ed57a27b68 100644 --- a/book/src/building-from-source.md +++ b/book/src/building-from-source.md @@ -148,6 +148,12 @@ provided `.desktop` and icon files to their correct folders: cp contrib/Helix.desktop ~/.local/share/applications cp contrib/helix.png ~/.icons # or ~/.local/share/icons ``` +It is recommended to convert the links in the `.desktop` file to absolute paths to avoid potential problems: + +```sh +sed -i -e "s|Exec=hx %F|Exec=$(readlink -f ~/.cargo/bin/hx) %F|g" \ + -e "s|Icon=helix|Icon=$(readlink -f ~/.icons/helix.png)|g" ~/.local/share/applications/Helix.desktop +``` To use another terminal than the system default, you can modify the `.desktop` file. For example, to use `kitty`: