1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-02 12:47:41 +02:00

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
This commit is contained in:
Assim Deodia 2020-04-12 04:59:39 +05:30 committed by GitHub
parent 6cb7154bf4
commit 83aff6f478
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}"