Compare commits

...

5 Commits

Author SHA1 Message Date
Ben Reaves
0e76f8ed19 Added required dependencies for openSUSE tumbleweed 2021-04-04 16:52:26 -04:00
Ben Reaves
70606b187a Merge branch 'feature/display-opensuse' into feature/zypper-opensuse 2021-04-04 15:54:07 -04:00
Ben Reaves
4e1aa8b731 Adding support for opensuse, vte 2021-04-04 15:51:01 -04:00
RedBearAK
5c35bf032b Inline export DISPLAY on openSUSE Tumbleweed
OpenSUSE Tumbleweed has an error where install completes but the xkeysnail service won't run due to "display not found". Double quotes together indicates display environment variable inside the command is nonexistent or empty. 

This patch inlines `export DISPLAY=` [ insert actual DISPLAY variable value] at the beginning of the main command in the xkeysnail service file, just before the file is copied into its destination. 

Don't know of any other way to fix the issue on Tumbleweed. Tried moving the "Environment" line before the "ExecStart" line in the service file, that of course made no difference.
2021-04-01 12:02:19 -08:00
RedBearAK
33151bfe44 Add zypper support, make output easier to read
Removing "--allow-downgrades --allow-remove-essential --allow-change-held-packages" as a replacement for "--force-yes" because none of those options are really recommended. They can potentially break the system entirely, and shouldn't actually be necessary in any normal situation when installing packages. 

This adds some strategic blank lines and "descriptions" of what is happening so things are far more clear in the terminal during install. Aids in troubleshooting which parts go wrong. 

Adds support for the zypper package manager used by openSUSE Tumbleweed.
2021-03-31 23:58:26 -08:00
2 changed files with 35 additions and 7 deletions

View File

@@ -1,15 +1,31 @@
#!/bin/bash
if pkgmgr="$( which apt-get )" 2> /dev/null; then
echo "Debian"
echo
echo "Debian apt-get package manager detected... "
echo "Installing $1... "
echo
$pkgmgr update
$pkgmgr --yes --force-yes install $1
$pkgmgr --yes install $1
elif pkgmgr="$( which dnf )" 2> /dev/null; then
echo "dnf"
echo
echo "dnf package manager detected... "
echo "Installing $1... "
echo
$pkgmgr check-update; $pkgmgr install -y $1
elif pkgmgr="$( which pacman )" 2> /dev/null; then
echo "Arch-based"
echo
echo "Arch-based pacman package manager detected... "
echo "Installing $1... "
echo
$pkgmgr -Syy;yes | $pkgmgr -S $1
elif pkgmgr="$( which zypper )" 2> /dev/null; then
echo
echo "zypper package manager detected... "
echo "Installing $1... "
echo
$pkgmgr refresh
$pkgmgr -n install $1
else
echo "Package manager not found, please install $1" >&2
exit 1
@@ -18,4 +34,4 @@ if [[ 1 -ne $# ]]; then
echo "Syntax: $0 PACKAGE"
exit 1
fi
exit $?
exit $?

View File

@@ -250,6 +250,8 @@ fi
if [[ $dename == "kde" ]]; then
if [[ $distro == "manjarolinux" ]]; then
sudo ./linux/system-config/unipkg.sh vte3
elif [[ ${distro:0:8} == "opensuse" ]];then
sudo ./linux/system-config/unipkg.sh vte-devel-0.62.3
else
sudo ./linux/system-config/unipkg.sh libvte-2.91-dev
fi
@@ -335,8 +337,10 @@ if ! [ -x "$(command -v python3-config)" ]; then
pydev="python3-dev"
elif [ "$distro" == "fedora" ]; then
pydev="python3-devel"
elif [ "${distro:0:8}" == "opensuse" ]; then
pydev="python3-devel python3-gobject python3-gobject-Gdk typelib-1_0-Gtk-3_0 libgtk-3-0"
fi
if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ]; then
if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "$distro" == "debian" ] || [ "$distro" == 'linuxmint' ] || [ "${distro:0:8}" == "opensuse" ]; then
echo "Will need to install $pydev..."
sudo ./linux/system-config/unipkg.sh "$pydev"
fi
@@ -345,8 +349,10 @@ fi
# sudo ./linux/system-config/unipkg.sh gnome-tweaks gnome-shell-extension-appindicator gir1.2-appindicator3-0.1
# fi
if ! [ -x "$(command -v xhost)" ] || ! [ -x "$(command -v gcc)" ]; then
if [ "$distro" == "\"manjaro linux\"" ]; then
if [ "$distro" == "manjarolinux" ]; then
sudo ./linux/system-config/unipkg.sh "xorg-xhost gcc"
elif [ "${distro:0:8}" == "opensuse" ]; then
sudo ./linux/system-config/unipkg.sh "gcc"
fi
fi
if [ "$distro" == 'linuxmint' ]; then
@@ -491,6 +497,12 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
fi
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/xkeysnail.service.new
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/limitedadmins.new
# openSUSE needs DISPLAY exported inside main command to avoid display "" not found error.
if [[ ${distro:0:8} == "opensuse" ]];then
sed -i "s#'/usr/bin/xhost#'export DISPLAY=`echo $DISPLAY` \&\& /usr/bin/xhost#g" ./linux/xkeysnail.service.new
fi
sudo mv ./linux/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service"
sudo chown root:root ./linux/limitedadmins.new
# Add a check here for xkeysnail path resolving