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
5 changed files with 38 additions and 60 deletions

View File

@@ -32,15 +32,6 @@ Video Tutorial: [Install Kinto.sh for Linux in less than a minute](https://www.y
<img src="https://user-images.githubusercontent.com/10969616/97070698-179c4500-15a0-11eb-8064-c03aa7f4d4a5.png" width="75%">
### Quick Install Method
Paste the following into your Terminal
```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/rbreaves/kinto/master/install/linux.sh)"
```
### Old Install Method
1. clone this repo
```
git clone https://github.com/rbreaves/kinto.git

View File

@@ -1,21 +0,0 @@
#!/usr/bin/env bash
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/rbreaves/kinto/master/install/linux.sh)"
curl https://github.com/rbreaves/kinto/archive/refs/heads/master.zip -J -L -o ~/Downloads/kinto.zip
unzip ~/Downloads/kinto.zip -d ~/Downloads/
cd ~/Downloads/kinto-master/
kintorelease=`curl -s https://api.github.com/repos/rbreaves/kinto/releases/latest | awk -F'tag_name": ' '{if ($2) print $2}' | tr -d \",`
kintohash=`unzip -z ~/Downloads/kinto.zip | tail -n1`
kintoshort=${kintohash::7}
echo "$kintorelease" "build" "$kintoshort" > ./dl_version
if [ $# -eq 0 ];then
echo "Installing Kinto..."
./setup.py
elif [ $1 == "-r" ];then
echo "Uninstall Kinto..."
./setup.py -r
fi

View File

@@ -1,7 +0,0 @@
Invoke-WebRequest -Uri https://github.com/rbreaves/kinto/archive/refs/heads/master.zip -OutFile $env:USERPROFILE\Downloads\kinto.zip
Expand-Archive -LiteralPath "$env:USERPROFILE\Downloads\kinto.zip" -DestinationPath "$env:USERPROFILE\Downloads" -Force
Set-ExecutionPolicy Bypass -Scope Process -Force
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
choco install -y python3
cd "$env:USERPROFILE\Downloads\kinto-master"
py .\setup.py

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

@@ -209,6 +209,8 @@ sudo systemctl disable xkeysnail >/dev/null 2>&1
sudo pkill -f bin/xkeysnail >/dev/null 2>&1
sudo pkill -f "is-active xkeysnail" >/dev/null 2>&1
pip3 install pillow
# Add additional shortcuts if needed, does not modify existing ones
if [[ $dename == 'gnome' || $dename == 'budgie' ]];then
@@ -248,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
@@ -324,10 +328,6 @@ expsh=" "
# echo "Will need to install inotify-tools to restart key remapper live for config file changes..."
# sudo ./linux/system-config/unipkg.sh inotify-tools
# fi
if ! [ -x "$(command -v git)" ]; then
echo "Will need to install git..."
sudo ./linux/system-config/unipkg.sh git
fi
if ! [ -x "$(command -v pip3)" ]; then
echo "Will need to install python3-pip..."
sudo ./linux/system-config/unipkg.sh python3-pip
@@ -337,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
@@ -347,16 +349,16 @@ 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
pip3 install setuptools
fi
pip3 install pillow
# echo "Transferring files..."
mkdir -p ~/.config/kinto
@@ -381,16 +383,7 @@ yes | cp -rf ./linux/xkeysnail.desktop ~/.config/kinto/xkeysnail.desktop
# logoff fix - not solid for every os. Prevents missed 1 character input on login
# yes | sudo cp -rf linux/gnome_logoff.sh ~/.config/kinto/logoff.sh
if [ -d "./.git" ]
then
echo "$(git describe --tag --abbrev=0 | head -n 1)" "build" "$(git rev-parse --short HEAD)" > ~/.config/kinto/version
elif [ -f "./dl_version" ]; then
cp ./dl_version ~/.config/kinto/version
else
# Not a typo - v is built in
echo "ersion Unknown" > ~/.config/kinto/version
fi
echo "$(git describe --tag --abbrev=0 | head -n 1)" "build" "$(git rev-parse --short HEAD)" > ~/.config/kinto/version
yes | cp -rf ./linux/kinto.py ./linux/kinto.py.new
yes | cp -rf ./linux/limitedadmins ./linux/limitedadmins.new
yes | cp -rf ./linux/gui/ ~/.config/kinto/
@@ -504,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