Skip to content

Instantly share code, notes, and snippets.

@weehong-1
Forked from abn/install-jetbrains-toolbox.sh
Last active April 12, 2026 02:27
Show Gist options
  • Select an option

  • Save weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b to your computer and use it in GitHub Desktop.

Select an option

Save weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b to your computer and use it in GitHub Desktop.
Install JetBrains Toolbox App with Dependency Check

Ubuntu Setup & Installation

A collection of bash scripts to automate the setup of a fresh Ubuntu environment.

🚀 Quick Start: Master Installer (Recommended)

The easiest way to set up your system is using the interactive Master Installer. It provides a menu that allows you to choose specific applications or install everything at once.

Run the following command in your terminal:

bash -c "$(curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/menu.sh)"

(Note: You will be prompted for your sudo password during the installation process, as these scripts configure system-level repositories and install packages).


🛠️ Individual Installations

If you prefer to bypass the menu and install applications individually, you can copy and paste the specific commands below.

Firefox

curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-firefox.sh | sudo bash

1Password

curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-1password.sh | sudo bash

Espanso (Wayland)

curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-espanso.sh | sudo bash

Visual Studio Code

curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-vscode.sh | sudo bash

JetBrains Toolbox

Reference and fork from: https://gist.github.com/abn/022c5f9eae491687a766f25bd8322fc0

bash -c "$(curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-jetbrains-toolbox.sh)"

Bruno

curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-bruno.sh | sudo bash

Spotify

curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-spotify.sh | sudo bash

Spotify

curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-obsidian.sh | sudo bash

Thunderbird

curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-thunderbird.sh | sudo bash

Network Drive Auto-Mount

sudo bash -c "$(curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-network_drive.sh)"

Backup Strategy

Backup Thunderbird

tar -cvpzf thunderbird_backup.tar.gz \
    --exclude='Crash Reports' \
    --exclude='Pending Pings' \
    -C /home/vernon/snap/thunderbird/common/.thunderbird/ .

Clean up Old Synology Setting

# 1. Unmount any stuck connections
sudo umount -f -l /mnt/Synology/* 2>/dev/null

# 2. Remove the old mount directories
sudo rm -rf /mnt/Synology/*

# 3. Wipe the old NAS entries from your config file
sudo sed -i '/Synology/d' /etc/fstab

# 4. Remove the old credentials file to be safe
rm -f ~/.smbcredentials_synology
#!/bin/bash
# Exit immediately if any command fails
set -e
# --- Check for root privileges ---
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root. Please use sudo."
exit 1
fi
echo "Starting 1Password Installation..."
echo "1. Installing prerequisites..."
apt-get update
apt-get install -y curl gpg ca-certificates
echo "2. Configuring the 1Password repository..."
install -d -m 0755 /etc/apt/keyrings
curl -sS https://downloads.1password.com/linux/keys/1password.asc | gpg --dearmor | tee /etc/apt/keyrings/1password.gpg > /dev/null
chmod 644 /etc/apt/keyrings/1password.gpg
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/1password.gpg] https://downloads.1password.com/linux/debian/amd64 stable main" > /etc/apt/sources.list.d/1password.list
echo "3. Installing 1Password..."
apt-get update
apt-get install -y 1password
echo "----------------------------------------------------"
echo "1Password Installation Complete!"
echo "----------------------------------------------------"
#!/bin/bash
# Exit immediately if any command fails
set -e
# --- Check for root privileges ---
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root. Please use sudo."
exit 1
fi
echo "Starting Bruno API Client Installation..."
## Phase 1: Install Prerequisites
echo "Installing required packages (curl, gpg)..."
apt-get update
apt-get install -y curl gpg ca-certificates
## Phase 2: Setup the Official Bruno APT Repository
echo "Configuring the Bruno repository..."
# Create the keyrings directory if it doesn't exist
install -d -m 0755 /etc/apt/keyrings
# Download and add the Bruno GPG key
curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x9FA6017ECABE0266" | gpg --dearmor | tee /etc/apt/keyrings/bruno.gpg > /dev/null
# Ensure proper permissions for the keyring file
chmod 644 /etc/apt/keyrings/bruno.gpg
# Add the repository to the APT sources list
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/bruno.gpg] http://debian.usebruno.com/ bruno stable" > /etc/apt/sources.list.d/bruno.list
## Phase 3: Install Bruno
echo "Updating package lists and installing Bruno..."
apt-get update
apt-get install -y bruno
## Phase 4: Create the Desktop Entry
echo "Creating the desktop shortcut..."
cat <<EOF > /usr/share/applications/bruno.desktop
[Desktop Entry]
Name=Bruno
Comment=Open-source API Client
Exec=bruno %U
Terminal=false
Type=Application
Icon=bruno
Categories=Development;Utility;
StartupNotify=true
EOF
# Ensure the desktop file has the correct permissions
chmod 644 /usr/share/applications/bruno.desktop
echo "----------------------------------------------------"
echo "Installation Complete!"
echo "Bruno is ready. You can find it in your application launcher."
echo "----------------------------------------------------"
#!/bin/bash
# Exit immediately if any command fails
set -e
# --- Check for root privileges ---
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root. Please use sudo."
exit 1
fi
echo "Starting Espanso (Wayland) Installation..."
TEMP_DEB="/tmp/espanso-wayland.deb"
echo "1. Downloading the latest Espanso Wayland DEB package..."
wget -qO "$TEMP_DEB" "https://github.com/espanso/espanso/releases/latest/download/espanso-debian-wayland-amd64.deb"
echo "2. Installing the package..."
apt-get install -y "$TEMP_DEB"
echo "3. Setting required Wayland capabilities (CAP_DAC_OVERRIDE)..."
setcap "cap_dac_override+p" $(which espanso)
echo "4. Cleaning up temporary files..."
rm "$TEMP_DEB"
echo "5. Registering and starting the background service..."
# Identify the actual user who invoked 'sudo'
ACTUAL_USER=${SUDO_USER:-$USER}
# Get their User ID
USER_ID=$(id -u "$ACTUAL_USER")
# Execute the registration and start commands as the actual user.
# We MUST pass the XDG_RUNTIME_DIR variable so the systemd daemon knows
# which user's desktop session to attach the service to.
sudo -u "$ACTUAL_USER" XDG_RUNTIME_DIR="/run/user/$USER_ID" espanso service register
sudo -u "$ACTUAL_USER" XDG_RUNTIME_DIR="/run/user/$USER_ID" espanso start
echo "----------------------------------------------------"
echo "Installation Complete!"
echo "Espanso is installed, registered, and running for user: $ACTUAL_USER"
echo "----------------------------------------------------"
echo "Note: Wayland support is experimental. If you use a non-US keyboard layout,"
echo "you will need to specify your layout code in ~/.config/espanso/config/default.yml"
echo "----------------------------------------------------"
#!/bin/bash
# Exit immediately if a command fails
set -e
# --- Check for root privileges ---
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root (use sudo)."
exit 1
fi
echo "Starting Firefox APT Migration..."
## Phase 1: Remove Snap and Transitional APT Packages
echo "Removing Firefox Snap and transitional APT wrapper..."
snap disable firefox 2>/dev/null || true
snap remove --purge firefox 2>/dev/null || true
# Crucial addition: Remove the Ubuntu dummy package to prevent conflicts
apt-get remove --purge -y firefox 2>/dev/null || true
rm -f /usr/bin/firefox
## Phase 2: Setup Mozilla APT Repository
echo "Configuring the official Mozilla APT repository..."
# Create the keyrings directory if it doesn't exist
install -d -m 0755 /etc/apt/keyrings
# Import the Mozilla APT repository signing key
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
# Add the Mozilla repository to your sources list
echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | tee /etc/apt/sources.list.d/mozilla.list > /dev/null
## Phase 3: Configure APT Pinning
echo "Setting APT Pin-Priority to prioritize Mozilla over Ubuntu Snap wrappers..."
# This ensures 'apt install firefox' pulls from Mozilla, not the Ubuntu repo's Snap transition package
cat <<EOF > /etc/apt/preferences.d/mozilla
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
EOF
## Phase 4: Update and Install
echo "Updating package lists and installing Firefox..."
apt-get update
apt-get install -y firefox
echo "----------------------------------------------------"
echo "Migration Complete!"
echo "Firefox is installed via APT and will auto-update."
echo "1Password integration is natively supported."
echo "----------------------------------------------------"
#!/bin/bash
# Exit immediately if any command fails
set -e
# --- Check for root privileges ---
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root. Please use sudo."
exit 1
fi
echo "----------------------------------------------------"
echo "Starting IPATool Installation..."
echo "----------------------------------------------------"
# 1. Installing prerequisites
echo "1. Installing prerequisites..."
apt-get update
apt-get install -y curl jq tar ca-certificates libsecret-1-0
# 2. Finding the latest version of IPATool
echo "2. Finding the latest version of IPATool..."
REPO="majd/ipatool"
API_URL="https://api.github.com/repos/$REPO/releases/latest"
DOWNLOAD_URL=$(curl -s $API_URL | jq -r '.assets[] | select(.name | endswith("linux-amd64.tar.gz")) | .browser_download_url' | head -n 1)
if [[ ! "$DOWNLOAD_URL" =~ ^http ]]; then
echo "Error: Could not find a valid download URL."
exit 1
fi
# 3. Downloading and Extracting
echo "3. Downloading IPATool..."
TEMP_DIR=$(mktemp -d)
curl -L "$DOWNLOAD_URL" -o "$TEMP_DIR/ipatool.tar.gz"
echo "4. Extracting archive..."
tar -xf "$TEMP_DIR/ipatool.tar.gz" -C "$TEMP_DIR"
# 4. Installing the binary (IMPROVED SEARCH)
echo "5. Locating and installing binary..."
# This finds any file named 'ipatool' that is NOT the archive itself
# and handles cases where the binary is inside a sub-folder.
BINARY_PATH=$(find "$TEMP_DIR" -type f -executable -name "ipatool*" ! -name "*.tar.gz" | head -n 1)
if [ -z "$BINARY_PATH" ]; then
echo "Error: Could not find the ipatool binary inside the archive."
echo "Contents of the archive were:"
ls -R "$TEMP_DIR"
rm -rf "$TEMP_DIR"
exit 1
fi
echo "Found binary at: $BINARY_PATH"
mv "$BINARY_PATH" /usr/local/bin/ipatool
chmod +x /usr/local/bin/ipatool
# 5. Cleanup
echo "6. Cleaning up..."
rm -rf "$TEMP_DIR"
echo "----------------------------------------------------"
echo "IPATool Installation Complete!"
echo "You can now run it by typing: ipatool"
echo "----------------------------------------------------"
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
# --- 0) Check/install dependencies ---
deps=(curl jq tar libfuse2)
for pkg in "${deps[@]}"; do
if [[ "$pkg" == "libfuse2" ]]; then
if ! dpkg -s libfuse2 &> /dev/null; then
read -rp "Package libfuse2 is missing. Install? [y/N] " ans
if [[ "$ans" =~ ^[Yy] ]]; then
sudo apt update
sudo apt install -y libfuse2
else
echo "libfuse2 is required. Exiting."
exit 1
fi
fi
else
if ! command -v "$pkg" &> /dev/null; then
read -rp "Command '$pkg' is missing. Install? [y/N] " ans
if [[ "$ans" =~ ^[Yy] ]]; then
sudo apt update
sudo apt install -y "$pkg"
else
echo "'$pkg' is required. Exiting."
exit 1
fi
fi
fi
done
# --- 1) Fetch the latest Toolbox URL for Linux ---
TOOLBOX_URL=$(
curl -fsSL 'https://data.services.jetbrains.com/products/releases?code=TBA&latest=true&type=release' \
-H 'Origin: https://www.jetbrains.com' \
-H 'Referer: https://www.jetbrains.com/toolbox/download/' \
| jq -r '.TBA[0].downloads.linux.link'
)
# --- 2) Define install directory ---
INSTALL_DIR="$HOME/.local/share/JetBrains/Toolbox"
# --- 3) Create the directory ---
mkdir -p "$INSTALL_DIR"
# --- 4) Download & extract in one go ---
curl -fsSL "$TOOLBOX_URL" \
| tar xz --strip-components=1 -C "$INSTALL_DIR"
BIN_DIR="$INSTALL_DIR/bin"
BIN_PATH="$BIN_DIR/jetbrains-toolbox"
DESKTOP_SRC="$BIN_DIR/jetbrains-toolbox.desktop"
# --- 5) (Optional) Symlink into ~/bin if it exists ---
if [[ -d "$HOME/bin" ]]; then
ln -sf "$BIN_PATH" "$HOME/bin/jetbrains-toolbox"
fi
# --- 6) Install .desktop launcher for current user ---
if [[ -f "$DESKTOP_SRC" ]]; then
APPS_DIR="$HOME/.local/share/applications"
mkdir -p "$APPS_DIR"
DESKTOP_DST="$APPS_DIR/jetbrains-toolbox.desktop"
cp "$DESKTOP_SRC" "$DESKTOP_DST"
# Fix Exec line to point to the real binary
sed -i "s|^Exec=.*|Exec=$BIN_PATH %u|" "$DESKTOP_DST"
# If we have an icon, fix Icon line too
ICON_PATH="$BIN_DIR/toolbox-tray-color.png"
if [[ -f "$ICON_PATH" ]]; then
sed -i "s|^Icon=.*|Icon=$ICON_PATH|" "$DESKTOP_DST" || true
fi
chmod +x "$DESKTOP_DST"
echo "Desktop entry installed to: $DESKTOP_DST"
echo "You should now see 'JetBrains Toolbox' in your application menu."
else
echo "Warning: $DESKTOP_SRC not found; no .desktop file was installed."
fi
echo "JetBrains Toolbox installed to $INSTALL_DIR"
#!/bin/bash
# Exit immediately if any command fails
set -e
# --- Check for root privileges ---
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root. Please use sudo."
exit 1
fi
echo "Starting Automated LibreOffice Installation..."
echo "1. Installing prerequisites..."
apt-get update
apt-get install -y curl wget grep tar
echo "2. Fetching the latest stable version number..."
# This command hits the stable directory index, finds version strings (X.X.X),
# sorts them numerically, and picks the highest one.
LATEST_VERSION=$(curl -s https://download.documentfoundation.org/libreoffice/stable/ | \
grep -oP '(?<=href=")[0-9]+\.[0-9]+\.[0-9]+(?=/")' | \
sort -V | tail -1)
if [ -z "$LATEST_VERSION" ]; then
echo "Error: Could not detect the latest version. Check your internet connection."
exit 1
fi
echo "Detected Latest Version: $LATEST_VERSION"
# Constructing the dynamic URL
URL="https://download.documentfoundation.org/libreoffice/stable/${LATEST_VERSION}/deb/x86_64/LibreOffice_${LATEST_VERSION}_Linux_x86-64_deb.tar.gz"
ARCHIVE="LibreOffice_latest.tar.gz"
echo "3. Downloading LibreOffice ${LATEST_VERSION}..."
wget -q --show-progress -O "$ARCHIVE" "$URL"
echo "4. Extracting files..."
mkdir -p ./lo_install
tar -xzf "$ARCHIVE" -C ./lo_install --strip-components=1
echo "5. Installing .deb packages..."
# dpkg handles the local files; -R (recursive) searches the DEBS folder
dpkg -i -R ./lo_install/DEBS/
echo "6. Fixing any missing dependencies..."
# This ensures any system libraries required by the .debs are pulled in
apt-get install -f -y
echo "7. Cleaning up..."
rm -rf "$ARCHIVE" ./lo_install
echo "----------------------------------------------------"
echo "LibreOffice ${LATEST_VERSION} successfully installed!"
echo "----------------------------------------------------"
#!/bin/bash
# Exit immediately if a command fails
set -e
# --- Check for root privileges ---
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root. Please use sudo."
exit 1
fi
echo "======================================================"
echo " Synology Master Auto-Mount & Dock Setup"
echo "======================================================"
ACTUAL_USER=${SUDO_USER:-$USER}
USER_HOME=$(eval echo ~$ACTUAL_USER)
MASTER_DIR="/mnt/Synology"
# --- Phase 1: Install Prerequisites ---
echo "Installing required network tools (cifs-utils, smbclient)..."
apt-get update -qq
apt-get install -y cifs-utils smbclient > /dev/null
# --- Phase 2: Gather Server Details (FIXED FOR PIPING) ---
echo ""
# Added </dev/tty to force reading from the keyboard instead of the curl pipe
read -p "1. Enter your Synology NAS address or IP (e.g., 192.168.1.10): " SERVER_ADDR </dev/tty
# Clean up input just in case
SERVER_ADDR=${SERVER_ADDR//smb:\/\//}
SERVER_ADDR=${SERVER_ADDR//\/\//}
read -p "2. Enter your Synology username: " SMB_USER </dev/tty
read -s -p "3. Enter your Synology password: " SMB_PASS </dev/tty
echo ""
echo ""
# --- Phase 3: Create Secure Credentials File ---
CRED_FILE="$USER_HOME/.smbcredentials_synology"
echo "Creating secure credentials file at $CRED_FILE..."
cat <<EOF > "$CRED_FILE"
username=$SMB_USER
password=$SMB_PASS
EOF
chown "$ACTUAL_USER":"$ACTUAL_USER" "$CRED_FILE"
chmod 600 "$CRED_FILE"
# --- Phase 4: Query Shares and Configure fstab ---
echo "Querying $SERVER_ADDR for shared folders..."
# Use smbclient to get a clean list of shares, ignoring errors
SHARE_LIST=$(smbclient -L "//$SERVER_ADDR" -U "$SMB_USER%$SMB_PASS" -g 2>/dev/null | grep Disk | cut -d'|' -f2 || true)
if [ -z "$SHARE_LIST" ]; then
echo "Error: Could not retrieve a list of shared folders. Check your IP and credentials."
exit 1
fi
# Create the master parent directory
mkdir -p "$MASTER_DIR"
chown "$ACTUAL_USER":"$ACTUAL_USER" "$MASTER_DIR"
# Backup fstab before making loop changes
cp /etc/fstab /etc/fstab.bak
echo "Configuring auto-mounts for discovered shares..."
# Loop through every share found on the NAS
echo "$SHARE_LIST" | while read SHARE; do
# Skip common hidden Windows/Samba system shares
if [[ "$SHARE" == "IPC$" ]] || [[ "$SHARE" == "print$" ]]; then continue; fi
MOUNT_POINT="$MASTER_DIR/$SHARE"
echo " -> Preparing /$SHARE..."
mkdir -p "$MOUNT_POINT"
chown "$ACTUAL_USER":"$ACTUAL_USER" "$MOUNT_POINT"
FSTAB_RULE="//${SERVER_ADDR}/${SHARE} $MOUNT_POINT cifs credentials=$CRED_FILE,uid=$ACTUAL_USER,gid=$ACTUAL_USER,_netdev,nofail 0 0"
# Only add to fstab if it isn't already there
if ! grep -q "$MOUNT_POINT" /etc/fstab; then
echo "$FSTAB_RULE" >> /etc/fstab
fi
done
# --- Phase 5: Reload and Mount ---
echo "Reloading system configuration and mounting all drives..."
systemctl daemon-reload
mount -a
# --- Phase 6: Create Desktop Shortcut ---
echo "Creating application shortcut..."
APPS_DIR="$USER_HOME/.local/share/applications"
mkdir -p "$APPS_DIR"
DESKTOP_FILENAME="synology-master.desktop"
DESKTOP_FILE="$APPS_DIR/$DESKTOP_FILENAME"
cat <<EOF > "$DESKTOP_FILE"
[Desktop Entry]
Name=Synology NAS
Comment=Open Synology Master Directory
Exec=nautilus $MASTER_DIR
Icon=folder-remote
Terminal=false
Type=Application
Categories=Network;FileTools;
EOF
chown -R "$ACTUAL_USER":"$ACTUAL_USER" "$APPS_DIR"
chmod +x "$DESKTOP_FILE"
# --- Phase 7: Auto-Pin to Top of Dock ---
echo "Pinning shortcut to the top of your Dock..."
USER_ID=$(id -u "$ACTUAL_USER")
DBUS_ADDRESS="unix:path=/run/user/$USER_ID/bus"
# Retrieve the current array of pinned apps
CURRENT_FAVS=$(sudo -u "$ACTUAL_USER" DBUS_SESSION_BUS_ADDRESS="$DBUS_ADDRESS" gsettings get org.gnome.shell favorite-apps)
# Check if it is already pinned to avoid duplicates
if [[ "$CURRENT_FAVS" != *"$DESKTOP_FILENAME"* ]]; then
# Clean off the "@as " prefix if GNOME included it in the output
CLEAN_FAVS="${CURRENT_FAVS#@as }"
# If the dock is completely empty
if [ "$CLEAN_FAVS" = "[]" ] || [ -z "$CLEAN_FAVS" ]; then
NEW_FAVS="['$DESKTOP_FILENAME']"
else
# Remove the opening '[', insert our new app, a comma, and the rest of the list
NEW_FAVS="['$DESKTOP_FILENAME', ${CLEAN_FAVS:1}"
fi
sudo -u "$ACTUAL_USER" DBUS_SESSION_BUS_ADDRESS="$DBUS_ADDRESS" gsettings set org.gnome.shell favorite-apps "$NEW_FAVS"
echo " -> Successfully pinned to the TOP of your Dock!"
else
echo " -> Shortcut is already on your Dock."
fi
echo "======================================================"
echo " Setup Complete!"
echo " All your NAS folders are now mounted under: $MASTER_DIR"
echo " You can access them instantly via the new icon on your Dock."
echo "======================================================"
#!/bin/bash
# Exit on error
set -e
echo "Updating package lists..."
sudo apt update
# Ensure curl and jq are installed to fetch the latest version info
if ! command -v jq &> /dev/null; then
echo "Installing jq for JSON processing..."
sudo apt install -y jq curl
fi
echo "Finding the latest Obsidian release..."
# Fetch the latest release metadata from GitHub API
LATEST_RELEASE_URL=$(curl -s https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest \
| jq -r '.assets[] | select(.name | endswith("_amd64.deb")) | .browser_download_url')
FILENAME=$(basename "$LATEST_RELEASE_URL")
echo "Downloading $FILENAME..."
curl -L -o "/tmp/$FILENAME" "$LATEST_RELEASE_URL"
echo "Installing Obsidian..."
# Using apt install for local files handles dependencies automatically
sudo apt install -y "/tmp/$FILENAME"
echo "Cleaning up..."
rm "/tmp/$FILENAME"
echo "------------------------------------------------"
echo "Done! You can now launch Obsidian from your app menu."
#!/bin/bash
# Exit immediately if any command fails
set -e
# --- Check for root privileges ---
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root. Please use sudo."
exit 1
fi
echo "Starting Spotify Installation..."
echo "1. Cleaning up old broken repository files..."
rm -f /etc/apt/sources.list.d/spotify.list
rm -f /etc/apt/keyrings/spotify.gpg
echo "2. Installing prerequisites..."
apt-get update
apt-get install -y curl gpg ca-certificates dirmngr
echo "3. Configuring the official Spotify repository..."
install -d -m 0755 /etc/apt/keyrings
# Fetch the exact missing key from the Ubuntu keyserver and save it securely
gpg --keyserver keyserver.ubuntu.com --recv-keys 5384CE82BA52C83A
gpg --export 5384CE82BA52C83A | tee /etc/apt/keyrings/spotify.gpg > /dev/null
chmod 644 /etc/apt/keyrings/spotify.gpg
# Add the OFFICIAL Spotify repository (Replacing the broken googleusercontent link)
echo "deb [signed-by=/etc/apt/keyrings/spotify.gpg] http://repository.spotify.com stable non-free" > /etc/apt/sources.list.d/spotify.list
echo "4. Installing Spotify..."
apt-get update
apt-get install -y spotify-client
echo "----------------------------------------------------"
echo "Spotify Installation Complete!"
echo "----------------------------------------------------"
#!/bin/bash
# Exit immediately if any command fails
set -e
# --- Check for root privileges ---
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root. Please use sudo."
exit 1
fi
echo "Starting Thunderbird Installation..."
echo "1. Installing prerequisites..."
apt-get update
apt-get install -y software-properties-common
echo "2. Adding Mozilla Team PPA..."
# This PPA provides the latest stable desktop versions of Thunderbird
add-apt-repository -y ppa:mozillateam/ppa
echo "3. Updating package lists..."
apt-get update
echo "4. Installing Thunderbird..."
# We use the -y flag to assume 'yes' to prompts
apt-get install -y thunderbird
echo "----------------------------------------------------"
echo "Thunderbird Installation Complete!"
echo "You can launch it from your application menu."
echo "----------------------------------------------------"
#!/bin/bash
# Exit immediately if any command fails
set -e
# --- Check for root privileges ---
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root. Please use sudo."
exit 1
fi
echo "Starting Visual Studio Code Installation..."
echo "1. Installing prerequisites..."
apt-get update
apt-get install -y wget gpg apt-transport-https ca-certificates
echo "2. Configuring the Visual Studio Code repository..."
install -d -m 0755 /etc/apt/keyrings
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/keyrings/packages.microsoft.gpg > /dev/null
chmod 644 /etc/apt/keyrings/packages.microsoft.gpg
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list
echo "3. Installing Visual Studio Code..."
apt-get update
apt-get install -y code
echo "----------------------------------------------------"
echo "Visual Studio Code Installation Complete!"
echo "----------------------------------------------------"
#!/bin/bash
# Exit immediately if a command fails (optional)
# set -e
while true; do
echo "======================================================"
echo " Ubuntu Setup Manager "
echo "======================================================"
echo "--- [ Browsers & Mail ] ---"
echo " 1) Install Firefox"
echo " 2) Install Thunderbird"
echo "--- [ Productivity & Security ] ---"
echo " 3) Install 1Password"
echo " 4) Install Espanso"
echo " 5) Install Extension Manager"
echo " 6) Install LibreOffice (.deb)"
echo "--- [ Development Tools ] ---"
echo " 7) Install Visual Studio Code"
echo " 8) Install JetBrains Toolbox"
echo " 9) Install Bruno"
echo " 10) Install IPATool"
echo "--- [ Media ] ---"
echo " 11) Install Spotify"
echo "--- [ System Customization ] ---"
echo " 12) Mount Network Drive"
echo " 13) Hide All Drives (Dock & Desktop)"
echo "------------------------------------------------------"
echo " 0) Run ALL Options (1-13)"
echo " -1) Exit"
echo "======================================================"
read -p "Enter choices separated by spaces (e.g., 1 8 13): " choices </dev/tty
if [[ "$choices" == "-1" ]]; then
echo "Exiting..."
break
fi
# Handle "ALL" logic
if [[ "$choices" == "0" ]]; then
choices="1 2 3 4 5 6 7 8 9 10 11 12 13"
fi
for choice in $choices; do
case $choice in
1)
echo "Installing Firefox..."
curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-firefox.sh | sudo bash
;;
2)
echo "Installing Thunderbird..."
sudo add-apt-repository -y ppa:mozillateam/ppa
sudo apt-get update
sudo apt-get install -y thunderbird
;;
3)
echo "Installing 1Password..."
curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-1password.sh | sudo bash
;;
4)
echo "Installing Espanso..."
curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-espanso.sh | sudo bash
;;
5)
echo "Installing Extension Manager..."
sudo apt-get update
sudo apt-get install -y gnome-shell-extension-manager
;;
6)
echo "Installing LibreOffice..."
curl -fsSL https://path-to-your-gist/install-libreoffice.sh | sudo bash
;;
7)
echo "Installing Visual Studio Code..."
curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-vscode.sh | sudo bash
;;
8)
echo "Installing JetBrains Toolbox..."
bash -c "$(curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-jetbrains-toolbox.sh)"
;;
9)
echo "Installing Bruno..."
curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-bruno.sh | sudo bash
;;
10)
echo "Installing IPATool..."
curl -fsSL https://path-to-your-gist/install-ipatool.sh | sudo bash
;;
11)
echo "Installing Spotify..."
curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-spotify.sh | sudo bash
;;
12)
echo "Setting up Network Drive..."
bash -c "$(curl -fsSL https://gist.githubusercontent.com/weehong-1/0bf6b75c54b56d5cbbc33752c93dac8b/raw/install-network_drive.sh)"
;;
13)
echo "Removing drives from Dock and Desktop..."
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false
gsettings set org.gnome.shell.extensions.ding show-mounts false 2>/dev/null || true
echo "Drives hidden."
;;
*)
echo "Invalid option: $choice"
sleep 1
;;
esac
done
echo -e "\n--- Selected tasks complete ---\n"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment