From 83aff6f478e579d5bde9d8d065cc633ef93d5d82 Mon Sep 17 00:00:00 2001 From: Assim Deodia Date: Sun, 12 Apr 2020 04:59:39 +0530 Subject: [PATCH] Linux: Fix install script to add support for non-default home dir (#2969) If user home directory is configured to anything other than `/home/${USER}`, `Exec` command in desktop entry points to non-existing file, and desktop entry is not considered valid, thus does not appear in list of application. Standard way to get home directory is using `${HOME}` environment variable. This could also be possible root cause of https://discourse.joplinapp.org/t/joplin-not-installing-completely/5669/2 --- Joplin_install_and_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Joplin_install_and_update.sh b/Joplin_install_and_update.sh index 57482acc9..936563683 100755 --- a/Joplin_install_and_update.sh +++ b/Joplin_install_and_update.sh @@ -168,7 +168,7 @@ then # On some systems this directory doesn't exist by default mkdir -p ~/.local/share/applications - echo -e "[Desktop Entry]\nEncoding=UTF-8\nName=Joplin\nComment=Joplin for Desktop\nExec=/home/${USER}/.joplin/Joplin.AppImage\nIcon=joplin\nStartupWMClass=Joplin\nType=Application\nCategories=Office;\n#${APPIMAGE_VERSION}" >> ~/.local/share/applications/appimagekit-joplin.desktop + echo -e "[Desktop Entry]\nEncoding=UTF-8\nName=Joplin\nComment=Joplin for Desktop\nExec=${HOME}/.joplin/Joplin.AppImage\nIcon=joplin\nStartupWMClass=Joplin\nType=Application\nCategories=Office;\n#${APPIMAGE_VERSION}" >> ~/.local/share/applications/appimagekit-joplin.desktop # Update application icons [[ `command -v update-desktop-database` ]] && update-desktop-database ~/.local/share/applications print "${COLOR_GREEN}OK${COLOR_RESET}"