Skip to content

Instantly share code, notes, and snippets.

@Cretezy
Last active April 17, 2021 15:58
Show Gist options
  • Save Cretezy/e44d9fc2478254463fcc5e089352c3c6 to your computer and use it in GitHub Desktop.
Save Cretezy/e44d9fc2478254463fcc5e089352c3c6 to your computer and use it in GitHub Desktop.
Forgetful Linux Commands

Mostly made for Debian/Ubuntu. Might work with other distributions/setup, be careful.

Spotify scaling

Make Spotify DPI factor of 2.1 (override)

cp /usr/share/applications/spotify.desktop ~/.local/share/applications/
sed -i 's/Exec=spotify %U/Exec=spotify --force-device-scale-factor=2.1 %U/g' ~/.local/share/applications/spotify.desktop

Google Chrome Beta name

Change desktop entry for Google Crhome (beta) to simply Google Chrome (override)

cp /usr/share/applications/google-chrome-beta.desktop ~/.local/share/applications/
sed -i 's/Google Chrome (beta)/Google Chrome/g' ~/.local/share/applications/google-chrome-beta.desktop

Install Popcorn Time

Popcorn Time 3.10

sudo mkdir /opt/popcorn-time
sudo wget -qO- https://get.popcorntime.sh/build/Popcorn-Time-0.3.10-Linux-64.tar.xz | sudo tar Jx -C /opt/popcorn-time
sudo ln -sf /opt/popcorn-time/Popcorn-Time /usr/bin/popcorn-time
printf '[Desktop Entry]\nVersion = 1.0\nType = Application\nTerminal = false\nName = Popcorn Time\nExec = /usr/bin/popcorn-time\nIcon = /opt/popcorn-time/popcorntime.png\nCategories = Application;' | sudo tee /usr/share/applications/popcorntime.desktop
sudo wget -q -O /opt/popcorn-time/popcorntime.png https://upload.wikimedia.org/wikipedia/commons/6/6c/Popcorn_Time_logo.png

Android Emulator not starting

cd $ANDROID_HOME/emulator/lib64
mv libstdc++.so.6 libstdc++.so.6_

Fix Firefox GNOME dark theme

Go to about:config and set the following string value: widget.content.gtk-theme-override to Adwaita:light

Firefox disable alt toggle menu

Open about:config. Set ui.key.menuAccessKey to 0. Restart Firefox.

React Native (WIP)

  • Install Android SDK (command line tools only), add tools/bin and platform-tools (for later) to path
  • sdkmanager "platform-tools" "platforms;android-23" "build-tools;23.0.1" "add-ons;addon-google_apis-google-23"
  • sdkmanager --licenses

Android Emulator from CLI

Fixes "Qt library not found at ...".

function emulator { cd "$(dirname "$(which emulator)")" && ./emulator "$@"; }

ZSH:

function emulator { cd "$(dirname "$(whence -p emulator)")" && ./emulator "$@"; }

Webstorm launcher

Make any Jetbrains editor launch in the background, with the current directory as default.

webstormm () {
  (webstorm ${1:-`pwd`} >/dev/null 2>/dev/null &)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment