Compare commits

...

11 Commits

Author SHA1 Message Date
Ben Reaves
9a52bd864a Merge pull request #542 from rbreaves/make_intall_on_fedora_work_in_enforcing_mode
Make intall on fedora work in enforcing mode
2021-07-04 00:22:27 -05:00
Ben Reaves
9b87fda382 Merge branch 'master' into make_intall_on_fedora_work_in_enforcing_mode 2021-07-04 00:10:05 -05:00
Ben Reaves
e54dba20a1 Merge pull request #540 from rbreaves/chrome-fix
Fix for toggling between Chrome/IBM/Windows/Mac on Windows
2021-06-30 00:58:58 -05:00
Ben Reaves
56cae8a009 Fixed chrome/IBM setup issues on Windows 2021-06-30 00:54:20 -05:00
Ben Reaves
e7dd3684c2 Fixed syntax issue and regex formulas for chrome/ibm on Windows 2021-06-29 20:38:12 -05:00
Ben Reaves
982cdcb92a Fixes Chrome/IBM layout issue on Windows 2021-06-29 20:23:45 -05:00
Ben Reaves
829289ba78 Merge branch 'hotfix' 2021-06-29 00:27:54 -05:00
Ben Reaves
b8793cff49 Added missing Go to shortcut for Sublime & VSCode for Windows 2021-06-29 00:26:28 -05:00
Ben Reaves
8b522461a5 Update README.md 2021-06-27 23:57:44 -05:00
Johannes von Bargen
5e28015a31 remove extra space 2021-03-31 01:22:58 +02:00
Johannes von Bargen
3a59edb51e make the installation run on fedora
* in enforcing mode
* without sudo in the unit file
2021-03-31 01:16:57 +02:00
6 changed files with 81 additions and 81 deletions

View File

@@ -13,7 +13,7 @@ v1.2 Release - Kinto now includes a system tray and simple wizard to setup the i
Kinto is powered by [xkeysnail](https://github.com/mooz/xkeysnail) for Linux & by [Autohotkey](https://github.com/Lexikos/AutoHotkey_L) for Windows 10. Kinto is powered by [xkeysnail](https://github.com/mooz/xkeysnail) for Linux & by [Autohotkey](https://github.com/Lexikos/AutoHotkey_L) for Windows 10.
Note: If you plan to remote into Linux via VNC, xRDP, Synergy or other remote desktop solutions then remove the current release, or create a new user, & try an earlier [v1.0.7-3](https://github.com/rbreaves/kinto/releases/tag/1.0.7-3) release. It uses xkb so it'll work with virtual xinput devices. Some v1.1-x releases may offer both, but all v1.2.x releases ended support for xkb. I do plan to bring offical support back for virtual input devices. Note: If you plan to remote into Linux via VNC, xRDP, Synergy or other remote desktop solutions then remove the current release & try an earlier [v1.0.7-3](https://github.com/rbreaves/kinto/releases/tag/1.0.7-3) release. It uses xkb so it'll work with virtual xinput devices. Some v1.1-x releases may offer both, but all v1.2.x releases ended support for xkb. I do plan to bring offical support back for virtual input devices.
Additionally VMware, Virtualbox, KVM and other virtualization technologies work best with the current release - so *this note only applies to remote desktop into Linux* - not virtualization. Additionally VMware, Virtualbox, KVM and other virtualization technologies work best with the current release - so *this note only applies to remote desktop into Linux* - not virtualization.

View File

@@ -11,3 +11,4 @@ Defaults!/etc/init.d/kinto setenv,env_reset,env_delete+=PATH,env_delete+=LD_PREL
%{username} ALL=NOPASSWD: {pkill} -f bin/xkeysnail %{username} ALL=NOPASSWD: {pkill} -f bin/xkeysnail
%{username} ALL=NOPASSWD: {xkeysnail} * %{username} ALL=NOPASSWD: {xkeysnail} *
%{username} ALL=NOPASSWD: {systemctl} is-active --quiet xkeysnail %{username} ALL=NOPASSWD: {systemctl} is-active --quiet xkeysnail
%{username} ALL=NOPASSWD: /usr/lib/systemd/system/xkeysnail.service

View File

@@ -4,8 +4,8 @@ Description=xkeysnail
[Service] [Service]
Type=simple Type=simple
KillMode=process KillMode=process
ExecStart=/usr/bin/sudo /bin/bash -c '/usr/bin/xhost +SI:localuser:root && {homedir}/.config/kinto/killdups.sh && {xkeysnail} --quiet --watch {homedir}/.config/kinto/kinto.py' ExecStart={sudo}/bin/bash -c '/usr/bin/xhost +SI:localuser:root && {homedir}/.config/kinto/killdups.sh && {xkeysnail} --quiet --watch {homedir}/.config/kinto/kinto.py'
ExecStop=/usr/bin/sudo /bin/bash -c '/usr/bin/sudo pkill -f bin/xkeysnail && exit 0' ExecStop={sudo}/bin/bash -c '{sudo}pkill -f bin/xkeysnail && exit 0'
Restart=on-failure Restart=on-failure
RestartSec=3 RestartSec=3
Environment=DISPLAY={displayid} Environment=DISPLAY={displayid}

View File

@@ -29,15 +29,15 @@ def windows_setup():
print("This install will fail if you are not running with elevated privileges") print("This install will fail if you are not running with elevated privileges")
os.system('powershell -executionpolicy bypass ".\\windows\\autohotkey.ps1"') os.system('powershell -executionpolicy bypass ".\\windows\\autohotkey.ps1"')
print("Copying autohotkey combinations for Terminals & Editors...") print("Copying autohotkey combinations for Terminals & Editors...")
os.system('copy /Y "' + path + '\\windows\\kinto.ahk" "' + path + '\\windows\\kinto-new.ahk"') os.system('copy /Y "' + path + '\\windows\\kinto.ahk" "' + homedir + '\\kinto-new.ahk"')
if default < 3: if default < 3:
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Default)(?!( - ST2CODE))(.*)/$2$3$5/g" .\\windows\\kinto-new.ahk') os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Default)(?!( - ST2CODE))(.*)/$2$3$5/gm" ' + homedir + '\\kinto-new.ahk')
if default == 1: if default == 1:
kbtype = "mac" kbtype = "mac"
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/g" .\\windows\\kinto-new.ahk') os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; MacModifiers)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
elif default == 2: elif default == 2:
kbtype = "win" kbtype = "win"
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/g" .\\windows\\kinto-new.ahk') os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
elif default == 5: elif default == 5:
print("Removing any old registry keys from prior versions...") print("Removing any old registry keys from prior versions...")
p = subprocess.Popen(['powershell.exe', "Remove-ItemProperty -Path HKLM:'SYSTEM\CurrentControlSet\Control\Keyboard Layout' -Name 'Scancode Map' -ErrorAction SilentlyContinue"], stdout=sys.stdout) p = subprocess.Popen(['powershell.exe', "Remove-ItemProperty -Path HKLM:'SYSTEM\CurrentControlSet\Control\Keyboard Layout' -Name 'Scancode Map' -ErrorAction SilentlyContinue"], stdout=sys.stdout)
@@ -52,32 +52,32 @@ def windows_setup():
print("Uninstall of Kinto is Complete.") print("Uninstall of Kinto is Complete.")
if default == 3: if default == 3:
kbtype = "chrome" kbtype = "chrome"
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Chromebook)/$2$3/g" .\\windows\\kinto-new.ahk') os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Chromebook)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers/CB)/$2$3/g" .\\windows\\kinto-new.ahk') os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers\/CB)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
if default == 3 or default == 4: if default == 3 or default == 4:
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; CB\/IBM)/$2$3/g" .\\windows\\kinto-new.ahk') os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; CB\/IBM)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers\/CB\/IBM)/$2$3/g" .\\windows\\kinto-new.ahk') os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; WinModifiers\/CB\/IBM)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
if default == 4: if default == 4:
kbtype = "ibm" kbtype = "ibm"
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; IBM)/$2$3/g" .\\windows\\kinto-new.ahk') os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; IBM)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
if default > 0 and default < 5: if default > 0 and default < 5:
stvscode = yn_choice(bcolors.CYELLOW2 + "Would you like to use Sublime Text 3 keymaps in VS Code?\n" + bcolors.ENDC) stvscode = yn_choice(bcolors.CYELLOW2 + "Would you like to use Sublime Text 3 keymaps in VS Code?\n" + bcolors.ENDC)
print("\nWill now install Ubuntu Terminal Theme as default...") print("\nWill now install Ubuntu Terminal Theme as default...")
os.system('regedit "' + path + '\\windows\\theme_ubuntu.reg"') os.system('regedit "' + path + '\\windows\\theme_ubuntu.reg"')
os.system('robocopy "'+ path + '\\assets" "%userprofile%\\.kinto\\assets" /E') os.system('robocopy "'+ path + '\\assets" "%userprofile%\\.kinto\\assets" /E')
if (stvscode and (default > 0 or default < 3)): if (stvscode and (default > 0 or default < 3)):
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Default - ST2CODE)/$2$3/g" .\\windows\\kinto-new.ahk') os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; Default - ST2CODE)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
elif (stvscode and (default == 3 or default == 4 )): elif (stvscode and (default == 3 or default == 4 )):
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; CB/IBM - ST2CODE)/$2$3/g" .\\windows\\kinto-new.ahk') os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/(; )(.*)(; CB/IBM - ST2CODE)/$2$3/gm" ' + homedir + '\\kinto-new.ahk')
os.system('copy /Y "' + path + '\\windows\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"') os.system('copy /Y "' + path + '\\windows\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"')
os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/{kbtype}/' + kbtype + '/g" "%userprofile%\\.kinto\\kinto-start.vbs"') os.system('C:\\Strawberry\\perl\\bin\\perl.exe -pi -e "s/{kbtype}/' + kbtype + '/gm" "%userprofile%\\.kinto\\kinto-start.vbs"')
os.system('copy /Y "' + path + '\\windows\\usb.vbs" "%userprofile%\\.kinto\\usb.vbs"') os.system('copy /Y "' + path + '\\windows\\usb.vbs" "%userprofile%\\.kinto\\usb.vbs"')
os.system('copy /Y "' + path + '\\windows\\detectUSB.ahk" "%userprofile%\\.kinto\\detectUSB.ahk"') os.system('copy /Y "' + path + '\\windows\\detectUSB.ahk" "%userprofile%\\.kinto\\detectUSB.ahk"')
os.system('mklink "%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"') os.system('mklink "%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs" "%userprofile%\\.kinto\\kinto-start.vbs"')
os.system('copy /Y "'+ path + '\\windows\\NoShell.vbs" "%userprofile%\\.kinto\\NoShell.vbs"') os.system('copy /Y "'+ path + '\\windows\\NoShell.vbs" "%userprofile%\\.kinto\\NoShell.vbs"')
os.system('copy /Y "'+ path + '\\windows\\toggle_kb.bat" "%userprofile%\\.kinto\\toggle_kb.bat"') os.system('copy /Y "'+ path + '\\windows\\toggle_kb.bat" "%userprofile%\\.kinto\\toggle_kb.bat"')
os.system('copy /Y "'+ path + '\\windows\\kinto-new.ahk" "%userprofile%\\.kinto\\kinto.ahk"') os.system('copy /Y "'+ homedir + '\\kinto-new.ahk" "%userprofile%\\.kinto\\kinto.ahk"')
os.system("del /f .\\windows\\kinto-new.ahk") os.system("del /f " + homedir + "\\kinto-new.ahk")
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\" 2> nul") os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\" 2> nul")
userpath = cmdline('cmd /c for %A in ("%userprofile%") do @echo %~sA')[:-1] userpath = cmdline('cmd /c for %A in ("%userprofile%") do @echo %~sA')[:-1]
print('Starting... "' + userpath + '\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs"') print('Starting... "' + userpath + '\\AppData\\Roaming\\Microsoft\\Windows\\STARTM~1\\Programs\\Startup\\kinto-start.vbs"')

View File

@@ -582,7 +582,7 @@ GroupAdd, intellij, ahk_exe idea64.exe
; #x::Send ^{x} ; Default - Terminal - Ctrl-x ; #x::Send ^{x} ; Default - Terminal - Ctrl-x
; #c::Send ^{c} ; Default - Terminal - Ctrl-c sigint ; #c::Send ^{c} ; Default - Terminal - Ctrl-c sigint
; !x::Send ^{x} ; CB/IBM ; !x::Send ^{x} ; CB/IBM
; !c::Send ^{c} ; CB/IBM ; !c::Send ^{c} ; CB/IBM - Sigint
; #c::send ^{Pause} ; cancel_build ; #c::send ^{Pause} ; cancel_build
; #Space::Send ^{Space} ; Default - Basic code completion ; #Space::Send ^{Space} ; Default - Basic code completion
; !Space::Send ^{Space} ; CB/IBM - Basic code completion ; !Space::Send ^{Space} ; CB/IBM - Basic code completion
@@ -606,7 +606,6 @@ GroupAdd, intellij, ahk_exe idea64.exe
Insert::Return ; cancel toggle_overwrite Insert::Return ; cancel toggle_overwrite
^!O::send {Insert} ; toggle_overwrite ^!O::send {Insert} ; toggle_overwrite
; !c::Return ; Default - cancel toggle_case_sensitive ; !c::Return ; Default - cancel toggle_case_sensitive
; $!c::send ^{c} ; CB/IBM - Sigint
^!c::send !{c} ; toggle_case_sensitive ^!c::send !{c} ; toggle_case_sensitive
; ^h::Return ; cancel replace ; ^h::Return ; cancel replace
^!f::send ^{h} ; replace ^!f::send ^{h} ; replace
@@ -614,6 +613,7 @@ GroupAdd, intellij, ahk_exe idea64.exe
^!e::send ^+{h} ; replace_next ^!e::send ^+{h} ; replace_next
F3::Return ; cancel find_next F3::Return ; cancel find_next
^g::send {F3} ; find_next ^g::send {F3} ; find_next
#g::send ^{g} ; goto line - disable game bar - Start menu -> Game bar shortcuts -> toggle Off
*F3::Return ; cancel find_prev, find_under, find_all_under *F3::Return ; cancel find_prev, find_under, find_all_under
^+g::send +{F3} ; find_prev ^+g::send +{F3} ; find_prev
#!g::send ^{F3} ; find_under #!g::send ^{F3} ; find_under
@@ -743,45 +743,45 @@ GroupAdd, intellij, ahk_exe idea64.exe
; Clear Terminal and Scroll Buffer ; Clear Terminal and Scroll Buffer
^k::Send clear && printf '\e[3J'{Enter} ^k::Send clear && printf '\e[3J'{Enter}
; Remap Physical Ctrl back to Ctrl ; Remap Physical Ctrl back to Ctrl
#0::Send {LCtrl down}0{Ctrl up} ; Default ; #0::Send {LCtrl down}0{Ctrl up} ; Default
#1::Send {LCtrl down}1{Ctrl up} ; Default ; #1::Send {LCtrl down}1{Ctrl up} ; Default
#2::Send {LCtrl down}2{Ctrl up} ; Default ; #2::Send {LCtrl down}2{Ctrl up} ; Default
#3::Send {LCtrl down}3{Ctrl up} ; Default ; #3::Send {LCtrl down}3{Ctrl up} ; Default
#4::Send {LCtrl down}4{Ctrl up} ; Default ; #4::Send {LCtrl down}4{Ctrl up} ; Default
#5::Send {LCtrl down}5{Ctrl up} ; Default ; #5::Send {LCtrl down}5{Ctrl up} ; Default
#6::Send {LCtrl down}6{Ctrl up} ; Default ; #6::Send {LCtrl down}6{Ctrl up} ; Default
#7::Send {LCtrl down}7{Ctrl up} ; Default ; #7::Send {LCtrl down}7{Ctrl up} ; Default
#8::Send {LCtrl down}8{Ctrl up} ; Default ; #8::Send {LCtrl down}8{Ctrl up} ; Default
#9::Send {LCtrl down}9{Ctrl up} ; Default ; #9::Send {LCtrl down}9{Ctrl up} ; Default
#-::Send {LCtrl down}-{Ctrl up} ; Default ; #-::Send {LCtrl down}-{Ctrl up} ; Default
#=::Send {LCtrl down}={Ctrl up} ; Default ; #=::Send {LCtrl down}={Ctrl up} ; Default
#`::Send {LCtrl down}`{Ctrl up} ; Default ; #`::Send {LCtrl down}`{Ctrl up} ; Default
#a::Send {LCtrl down}a{Ctrl up} ; Default ; #a::Send {LCtrl down}a{Ctrl up} ; Default
#b::Send {LCtrl down}b{Ctrl up} ; Default ; #b::Send {LCtrl down}b{Ctrl up} ; Default
#c::Send {LCtrl down}c{Ctrl up} ; Default ; #c::Send {LCtrl down}c{Ctrl up} ; Default
#d::Send {LCtrl down}d{Ctrl up} ; Default ; #d::Send {LCtrl down}d{Ctrl up} ; Default
#e::Send {LCtrl down}e{Ctrl up} ; Default ; #e::Send {LCtrl down}e{Ctrl up} ; Default
#f::Send {LCtrl down}f{Ctrl up} ; Default ; #f::Send {LCtrl down}f{Ctrl up} ; Default
#g::Send {LCtrl down}g{Ctrl up} ; Default ; #g::Send {LCtrl down}g{Ctrl up} ; Default
#h::Send {LCtrl down}h{Ctrl up} ; Default ; #h::Send {LCtrl down}h{Ctrl up} ; Default
#i::Send {LCtrl down}i{Ctrl up} ; Default ; #i::Send {LCtrl down}i{Ctrl up} ; Default
#j::Send {LCtrl down}j{Ctrl up} ; Default ; #j::Send {LCtrl down}j{Ctrl up} ; Default
#k::Send {LCtrl down}k{Ctrl up} ; Default ; #k::Send {LCtrl down}k{Ctrl up} ; Default
#l::Send {LCtrl down}l{Ctrl up} ; Default ; #l::Send {LCtrl down}l{Ctrl up} ; Default
#m::Send {LCtrl down}m{Ctrl up} ; Default ; #m::Send {LCtrl down}m{Ctrl up} ; Default
#n::Send {LCtrl down}n{Ctrl up} ; Default ; #n::Send {LCtrl down}n{Ctrl up} ; Default
#o::Send {LCtrl down}o{Ctrl up} ; Default ; #o::Send {LCtrl down}o{Ctrl up} ; Default
#p::Send {LCtrl down}p{Ctrl up} ; Default ; #p::Send {LCtrl down}p{Ctrl up} ; Default
#q::Send {LCtrl down}q{Ctrl up} ; Default ; #q::Send {LCtrl down}q{Ctrl up} ; Default
#r::Send {LCtrl down}r{Ctrl up} ; Default ; #r::Send {LCtrl down}r{Ctrl up} ; Default
#s::Send {LCtrl down}s{Ctrl up} ; Default ; #s::Send {LCtrl down}s{Ctrl up} ; Default
#t::Send {LCtrl down}t{Ctrl up} ; Default ; #t::Send {LCtrl down}t{Ctrl up} ; Default
#u::Send {LCtrl down}u{Ctrl up} ; Default ; #u::Send {LCtrl down}u{Ctrl up} ; Default
#v::Send {LCtrl down}v{Ctrl up} ; Default ; #v::Send {LCtrl down}v{Ctrl up} ; Default
#w::Send {LCtrl down}w{Ctrl up} ; Default ; #w::Send {LCtrl down}w{Ctrl up} ; Default
#x::Send {LCtrl down}x{Ctrl up} ; Default ; #x::Send {LCtrl down}x{Ctrl up} ; Default
#y::Send {LCtrl down}y{Ctrl up} ; Default ; #y::Send {LCtrl down}y{Ctrl up} ; Default
#z::Send {LCtrl down}z{Ctrl up} ; Default ; #z::Send {LCtrl down}z{Ctrl up} ; Default
; !0::Send {LCtrl down}0{Ctrl up} ; CB/IBM ; !0::Send {LCtrl down}0{Ctrl up} ; CB/IBM
; !1::Send {LCtrl down}1{Ctrl up} ; CB/IBM ; !1::Send {LCtrl down}1{Ctrl up} ; CB/IBM
; !2::Send {LCtrl down}2{Ctrl up} ; CB/IBM ; !2::Send {LCtrl down}2{Ctrl up} ; CB/IBM

View File

@@ -329,25 +329,6 @@ if [[ $distro == 'kdeneon' ]]; then
fi fi
if [[ $distro == 'fedora' ]]; then if [[ $distro == 'fedora' ]]; then
echo "Checking SELinux status..."
if [[ $(perl -ne 'print if /^SELINUX=enforcing/' /etc/selinux/config | wc -l) != 0 ]]; then
while true; do
read -rep $'\nWould you like to update your SELinux state from enforcing to permissive? (y/n)\n' yn
case $yn in
[Yy]* ) setSE='yes'; break;;
[Nn]* ) exp='no'; expsh=" " break;;
# * ) echo "Please answer yes or no.";;
esac
done
if [[ $yn == "yes" ]]; then
sed -i "s/SELINUX=enforcing/SELINUX=permissive/g" /etc/selinux/config
echo "/etc/selinux/config has been updated. Please reboot your computer before continuing."
exit 0
fi
else
echo "SELinux state should be ok for Kinto to install"
fi
if [[ $(gsettings get org.gnome.desktop.wm.keybindings show-desktop | grep "\[\]" | wc -l) == 1 ]];then if [[ $(gsettings get org.gnome.desktop.wm.keybindings show-desktop | grep "\[\]" | wc -l) == 1 ]];then
gsettings set org.gnome.desktop.wm.keybindings show-desktop "['<Super>d']" gsettings set org.gnome.desktop.wm.keybindings show-desktop "['<Super>d']"
else else
@@ -520,6 +501,11 @@ fi
if [[ $distro == "fedora" ]]; then if [[ $distro == "fedora" ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*fedora.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1 perl -pi -e "\s{4}(# )(K.*)(# SL - .*fedora.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
sed -i "s#{sudo}##g" ./linux/xkeysnail.service.new
selinuxuser=system_u
selinuxtype=systemd_unit_file_t
else
sed -i "s#{sudo}#`\\which sudo` #g" ./linux/xkeysnail.service.new
fi fi
if [[ $distro == "elementaryos" ]]; then if [[ $distro == "elementaryos" ]]; then
@@ -590,6 +576,10 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
exit 0 exit 0
fi fi
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/limitedadmins.new sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/limitedadmins.new
if [[ $distro == "fedora" ]]; then
echo "Changing SELinux context"
sudo chcon -v --user=$selinuxuser --type=$selinuxtype "$xkeypath"xkeysnail.service
fi
sudo chown root:root ./linux/limitedadmins.new sudo chown root:root ./linux/limitedadmins.new
# Add a check here for xkeysnail path resolving # Add a check here for xkeysnail path resolving
sudo mv ./linux/limitedadmins.new /etc/sudoers.d/limitedadmins sudo mv ./linux/limitedadmins.new /etc/sudoers.d/limitedadmins
@@ -598,10 +588,19 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/xkeysnail.service.new sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/xkeysnail.service.new
sudo mv ./linux/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service" sudo mv ./linux/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service"
sudo chown -R root:root "$xkeypath"xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..." if [[ $distro == "fedora" ]]; then
sudo chmod 644 "$xkeypath"xkeysnail.service && echo "Permissions set to 644..." || echo "Failed to set permissions..." sudo cp "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Copied service file to system..." || echo "Failed to create copy..."
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Created soft symlink..." || echo "Failed to create soft symlink..." sudo cp "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Copied service file to system for graphical target..." || echo "Failed to create copy for graphical target..."
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Created soft symlink for graphical target..." || echo "Failed to create soft symlink for graphical target..." sudo chown -R root:root /etc/systemd/system/xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..."
sudo chown -R root:root /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..."
sudo chmod 644 /etc/systemd/system/xkeysnail.service && echo "Permissions set to 644..." || echo "Failed to set permissions..."
sudo chmod 644 /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Permissions set to 644..." || echo "Failed to set permissions..."
else
sudo chown -R root:root "$xkeypath"xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..."
sudo chmod 644 "$xkeypath"xkeysnail.service && echo "Permissions set to 644..." || echo "Failed to set permissions..."
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Created soft symlink..." || echo "Failed to create soft symlink..."
sudo ln -s "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Created soft symlink for graphical target..." || echo "Failed to create soft symlink for graphical target..."
fi
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl disable xkeysnail sudo systemctl disable xkeysnail
sudo systemctl stop xkeysnail sudo systemctl stop xkeysnail