Last active
July 14, 2023 18:44
-
-
Save serpro69/b2eec484c82e2d3592ada84b21ac4713 to your computer and use it in GitHub Desktop.
guake installation on popos (ubuntu 22.04)
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
#!/usr/bin/env bash | |
# TODO convert to a role in https://github.com/serpro69/ansible-collection-devexp | |
# https://guake.readthedocs.io/en/latest/user/installing.html#install-from-pypi | |
is_not_root() { | |
[ "${EUID:-$(id -u)}" -ne 0 ] | |
} | |
if is_not_root; then | |
echo 'This script should be run as root' | |
exit 1 | |
fi | |
# ensure ~/.local/bin is in the PATH | |
PATH=$PATH:$HOME/.local/bin | |
# install guake dependencies | |
sudo apt install -y \ | |
gir1.2-keybinder-3.0 \ | |
gir1.2-notify-0.7 \ | |
gir1.2-vte-2.91 \ | |
libkeybinder-3.0-0 \ | |
libutempter0 \ | |
python3-setuptools \ | |
python3-cairo \ | |
python3-dbus \ | |
python3-gi \ | |
python3-pip \ | |
python3 | |
# needed for pipx | |
sudo apt install python3-venv | |
# install pipx | |
python3 -m pip install --user pipx | |
# ensure PyGObject | |
# TODO should this be installed with pipx instead? | |
pip install PyGObject | |
# install guake with system-site-packages | |
# https://github.com/Guake/guake/issues/1971#issuecomment-1221416016 | |
pipx install --force --system-site-packages --verbose --python /usr/bin/python3 guake | |
# create desktop entry file | |
touch ~/.local/share/applications/guake.desktop | |
# use https://gitlab.gnome.org/GNOME/gnome-terminal/-/blob/master/data/org.gnome.Terminal.desktop.in as reference | |
cat > ~/.local/share/applications/guake.desktop << EOL | |
[Desktop Entry] | |
Name=Guake | |
Comment=Use the command line in a Quake-like terminal | |
Keywords=shell;prompt;command;commandline;cmd;terminal; | |
TryExec=guake | |
Exec=guake | |
Icon=org.gnome.Terminal | |
Type=Application | |
Categories=GNOME;GTK;System;Utility;TerminalEmulator; | |
StartupNotify=true | |
_StartupWMClass=Gnome-terminal | |
SingleMainWindow=true | |
_Actions=new-window;preferences; | |
X-ExecArg=-- | |
EOL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment