Skip to content

Instantly share code, notes, and snippets.

@gundamew
Created January 20, 2022 10:43
Show Gist options
  • Save gundamew/2256184b1189844bc597de64915aafca to your computer and use it in GitHub Desktop.
Save gundamew/2256184b1189844bc597de64915aafca to your computer and use it in GitHub Desktop.
Installing Obsidian (AppImage) on Ubuntu 20.04

1. Move the AppImage to /opt

$ sudo mkdir -p /opt/Obsidian
$ mv ~/Downloads/Obsidian-0.13.19.AppImage /opt/Obsidian

2. Create the desktop entry

$ sudo vim /usr/share/applications/obsidian.desktop
[Desktop Entry]
Name=Obsidian
Exec=/opt/Obsidian/Obsidian-0.13.19.AppImage
Terminal=false
Type=Application
Icon=obsidian

3. Create the icon

$ copy /path/to/obsidian.png /opt/Obsidian
$ sudo ln -s /opt/Obsidian/obsidian.png /usr/share/pixmaps

Tip: Get the resource files

You can extract the icon and the desktop entry files from the AppImage.

$ /path/to/Obsidian.AppImage --appimage-mount
/tmp/.mount_ObsidiXXXXXX

Just search the files in /tmp/.mount_ObsidiXXXXXX.

References

@GeekSilver
Copy link

Tip: Get the resource files
Extracting the icon from AppImage

$ /opt/Obsidian/Obsidian-1.8.9.AppImage --appimage-mount /tmp/.mount_Obsidianicon

Output of appimage-mount (above command)

tmp/.mount_ObsidivX3H9d

Open a different terminal without closing the terminal running appimage-mount

ls -l /tmp/.mount_ObsidivX3H9d/obsidian.png

Output of above command will look similar to:

lrwxrwxrwx 1 root root 49 Mar 3 19:24 /tmp/.mount_ObsidivX3H9d/obsidian.png -> usr/share/icons/hicolor/512x512/apps/obsidian.png

Copy file to /home

cp /tmp/.mount_ObsidivX3H9d/usr/share/icons/hicolor/512x512/apps/obsidian.png ~/

Go to step 3 (Create the icon)

cp ~/obsidian.png /opt/Obsidian
sudo ln -s /opt/Obsidian/obsidian.png /usr/share/pixmaps

Search Obsidian in apps. Now its installed with icon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment