-
-
Save shaybensasson/3e8e49af92d7e5013fc77da22bd3ae4c to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash | |
# see https://forum.obsidian.md/t/gnome-desktop-installer/499 | |
set -euo pipefail | |
icon_url="https://cdn.discordapp.com/icons/686053708261228577/1361e62fed2fee55c7885103c864e2a8.png" | |
#dl_url=${1:-} | |
dl_url=$( curl -s https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest \ | |
| grep "browser_download_url.*AppImage" | tail -n 1 | cut -d '"' -f 4 ) | |
if [[ -z "$dl_url" ]]; then | |
echo "missing download link" | |
echo "usage: install-obsidian.sh" | |
exit 1 | |
fi | |
curl --location --output Obsidian.AppImage "$dl_url" | |
curl --location --output obsidian.png "$icon_url" | |
sudo mkdir --parents /opt/obsidian/ | |
sudo mv Obsidian.AppImage /opt/obsidian | |
sudo chmod u+x /opt/obsidian/Obsidian.AppImage | |
sudo mv obsidian.png /opt/obsidian | |
sudo ln -s /opt/obsidian/obsidian.png /usr/share/pixmaps | |
echo "[Desktop Entry] | |
Type=Application | |
Name=Obsidian | |
Exec=/opt/obsidian/Obsidian.AppImage | |
Icon=obsidian | |
Terminal=false" > ~/usr/share/applications/obsidian.desktop | |
update-desktop-database ~/usr/share/applications | |
echo "install ok" |
@white-ice try putting some effort in and doing it yourself rather than ask random people to do free work for you?
To remove: sudo rm -rf /opt/obsidian
.
AppImages are cool: https://askubuntu.com/questions/774490/what-is-an-appimage-how-do-i-install-it
No config files to clean up.
I installed obsidian again in a new Ubuntu 22 and needed to run install these packages in order for the AppImage to be able to run: sudo apt-get install fuse libfuse2
To remove:
sudo rm -rf /opt/obsidian
. AppImages are cool: https://askubuntu.com/questions/774490/what-is-an-appimage-how-do-i-install-it No config files to clean up.I installed obsidian again in a new Ubuntu 22 and needed to run install these packages in order for the AppImage to be able to run:
sudo apt-get install fuse libfuse2
thank you for this, mine wasn't working after upgrading to 22.04 and this fixed it!
jfui:
petro@petro-laptop:~/prod$ ./obsidian.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 93.6M 100 93.6M 0 0 6278k 0 0:00:15 0:00:15 --:--:-- 7307k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4473 100 4473 0 0 11294 0 --:--:-- --:--:-- --:--:-- 11324
[sudo] password for petro:
ln: failed to create symbolic link '/usr/share/pixmaps/obsidian.png': File exists
Simple script to download and install Obsidian:
url=$(wget --inet4-only -O - "https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest" 2>/dev/null | grep --only-matching -m 1 "https.*obsidian.*deb")
wget --inet4-only "$url"
sudo dpkg --install obsidian*.deb
Hello. Tell me how to remove all this? Thank you.