Last active
January 26, 2026 15:04
-
-
Save yipo/af074b5ed29524aa4a45d438cde185d3 to your computer and use it in GitHub Desktop.
My Ubuntu desktop setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [/] | |
| appicon-margin=4 | |
| appicon-padding=8 | |
| multi-monitors=false | |
| panel-element-positions='{"0":[{"element":"showAppsButton","visible":true,"position":"stackedTL"},{"element":"activitiesButton","visible":true,"position":"stackedTL"},{"element":"leftBox","visible":true,"position":"stackedTL"},{"element":"taskbar","visible":true,"position":"centerMonitor"},{"element":"centerBox","visible":true,"position":"stackedBR"},{"element":"rightBox","visible":true,"position":"stackedBR"},{"element":"dateMenu","visible":true,"position":"stackedBR"},{"element":"systemMenu","visible":true,"position":"stackedBR"},{"element":"desktopButton","visible":true,"position":"stackedBR"}]}' | |
| showdesktop-button-width=2 | |
| tray-padding=2 | |
| window-preview-size=120 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| config := .var/app/com.google.Chrome/config | |
| desktop_entry := .local/share/applications | |
| template := $(dir $(lastword $(MAKEFILE_LIST)))/google-chrome.template.desktop | |
| .PHONY: all config-alias | |
| all: config-alias | |
| all: $(desktop_entry)/google-chrome.home.desktop | |
| all: $(desktop_entry)/google-chrome.work.desktop | |
| $(config) $(desktop_entry): | |
| mkdir -p $@ | |
| $(config)/google-chrome.home: $(config) | |
| cd $< && (if test -d google-chrome -a ! -h google-chrome; then mv -T google-chrome google-chrome.home; fi) | |
| config-alias: $(config) $(config)/google-chrome.home | |
| cd $< && (test -h google-chrome || ln -s google-chrome.home google-chrome) | |
| $(desktop_entry)/google-chrome.home.desktop: $(template) $(desktop_entry) | |
| CONFIG=$(config) CLASS=google-chrome.home NAME=Home envsubst < $< > $@ | |
| chmod +x $@ | |
| $(desktop_entry)/google-chrome.work.desktop: $(template) $(desktop_entry) | |
| CONFIG=$(config) CLASS=google-chrome.work NAME=Work envsubst < $< > $@ | |
| chmod +x $@ | |
| # KNOWN ISSUE: With the Flatpak version of Google Chrome on GNOME, dock icons | |
| # don't group by profile -- windows are grouped under a single icon. This is | |
| # because GNOME groups windows by App ID and ignores WM_CLASS for Flatpak apps. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Desktop Entry] | |
| Type=Application | |
| Name=Google Chrome (${NAME}) | |
| Icon=com.google.Chrome | |
| Exec=flatpak run com.google.Chrome --class=${CLASS} --user-data-dir=${CONFIG}/${CLASS} %U | |
| Terminal=false | |
| StartupNotify=true | |
| StartupWMClass=${CLASS} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| set -e | |
| if test $# -ne 1; then | |
| echo "Usage: $0 <extension-uuid>" >&2 | |
| exit 1 | |
| fi | |
| # Reference: https://github.com/mjakeman/extension-manager/blob/v0.6.5/src/local/org.gnome.Shell.Extensions.xml | |
| gdbus call --session \ | |
| --dest org.gnome.Shell.Extensions \ | |
| --object-path /org/gnome/Shell/Extensions \ | |
| --method org.gnome.Shell.Extensions.InstallRemoteExtension \ | |
| "$1" || echo The error above is ignored because the D-Bus call fails if the confirmation dialog is not answered quickly enough. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .PHONY: default server ufw-enable remote-desktop | |
| .PHONY: apt-update docker flatpak git samba snapd taiwan-locale | |
| .PHONY: remmina sublime-text vs-code google-chrome google-chrome-dual-profile | |
| .PHONY: gnome-extension/dash-to-panel gnome-extension/kimpanel | |
| default: samba taiwan-locale remmina sublime-text vs-code google-chrome gnome-extension/dash-to-panel | |
| reboot | |
| server: remote-desktop samba vs-code | |
| reboot | |
| # System | |
| ufw-enable: | |
| sudo ufw --force enable | |
| remote-desktop: ufw-enable | |
| @yelp help:gnome-help/remote-login & | |
| @echo --- 'Please follow the guide to enable Remote Desktop. Then, close the "Settings" window to continue.' | |
| gnome-control-center system remote-desktop | |
| sudo ufw allow from 192.168.0.0/16 to any port 3389 proto tcp comment 'remote desktop' | |
| sudo ufw allow from fd00::/8 to any port 3389 proto tcp comment 'remote desktop' | |
| # APT packages | |
| apt-update: | |
| sudo apt update | |
| sudo apt -y upgrade | |
| docker: apt-update | |
| sudo apt install -y docker.io docker-compose-v2 | |
| sudo adduser $(USER) docker | |
| flatpak: apt-update | |
| sudo apt install -y gnome-software-plugin-flatpak | |
| flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo | |
| git: apt-update | |
| sudo apt install -y git | |
| samba: apt-update ufw-enable | |
| sudo apt install -y samba nautilus-share wsdd-server | |
| @echo --- Since Samba doesn\'t use the system account password, please set up a Samba password for your account. | |
| sudo smbpasswd -a $(USER) | |
| sudo adduser $(USER) sambashare | |
| sudo ufw allow from 192.168.0.0/16 to any app samba | |
| sudo ufw allow from fd00::/8 to any app samba | |
| sudo ufw allow from 192.168.0.0/16 to any app wsdd | |
| sudo ufw allow from fd00::/8 to any app wsdd | |
| snapd: apt-update | |
| sudo apt install -y snapd | |
| taiwan-locale: apt-update gnome-extension/kimpanel | |
| sudo apt install -y fcitx5-table-boshiamy language-pack-zh-hant | |
| @echo --- Please add the required input methods. | |
| fcitx5 2> /dev/null & fcitx5-configtool | |
| im-config -n fcitx5 | |
| # Snaps | |
| remmina: snapd | |
| sudo snap install remmina | |
| sublime-text: snapd | |
| sudo snap install --classic sublime-text | |
| vs-code: snapd git docker | |
| sudo snap install --classic code | |
| # Flatpak apps | |
| google-chrome: flatpak | |
| sudo flatpak install -y com.google.Chrome | |
| google-chrome-dual-profile: google-chrome-dual-profile.mk google-chrome | |
| $(MAKE) -C $(HOME) -f $(abspath $<) | |
| # GNOME extensions | |
| gnome-extension/dash-to-panel: | |
| sh install-gnome-extension.sh 'dash-to-panel@jderose9.github.com' | |
| dconf load /org/gnome/shell/extensions/dash-to-panel/ < dash-to-panel-settings.ini | |
| gnome-extension/kimpanel: | |
| sh install-gnome-extension.sh 'kimpanel@kde.org' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment