Skip to content

Commit

Permalink
Definitively fixed !... Or is it ?
Browse files Browse the repository at this point in the history
  • Loading branch information
Cam authored Mar 20, 2023
1 parent 879dbae commit b876dd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ echo "$DISPLAY" | sudo tee -a /etc/systemd/system/naga.service.d/naga.conf > /de
sudo udevadm control --reload-rules && sudo udevadm trigger

sleep 0.5
sudo cat /etc/sudoers | grep -qxF "razerInput ALL=($USER) ALL" || printf "\nrazerInput ALL=($USER) ALL\n" | sudo EDITOR='tee -a' visudo > /dev/null
sudo cat /etc/sudoers | grep -qxF "razerInput ALL=($USER) NOPASSWD:ALL" || printf "\nrazerInput ALL=(%s) NOPASSWD:ALL\n" "$USER" | sudo EDITOR='tee -a' visudo > /dev/null
grep -qF 'xhost +SI:localuser:razerInput' ~/.profile || printf "\nxhost +SI:localuser:razerInput\n" >> ~/.profile
sudo touch /home/razerInput/.profile && grep -qxF "export PATH=\`sudo -u $USER echo \$PATH\`" /home/razerInput/.profile || echo "export PATH=\`sudo -u $USER echo \$PATH\`" | sudo tee -a /home/razerInput/.profile > /dev/null
sudo -u razerInput bash -c "export PATH=$PATH"
sudo printf '#!/bin/sh\nexport PATH=$(sudo -u %s echo $PATH)' "$USER" | sudo tee /usr/local/bin/Naga_Linux/nagaPathExport.sh > /dev/null
sudo chmod 755 /usr/local/bin/Naga_Linux/nagaPathExport.sh
xhost +SI:localuser:razerInput

sudo systemctl enable naga
Expand Down
1 change: 1 addition & 0 deletions src/nagaX11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@ int main(const int argc, const char *const argv[])
if (strstr(argv[1], "serviceHelper") != NULL)
{
(void)!(system("/usr/local/bin/Naga_Linux/nagaXinputStart.sh"));
(void)!(system("/usr/local/bin/Naga_Linux/nagaPathExport.sh"));
if (argc > 2)
NagaDaemon(string(argv[2]).c_str());
else
Expand Down

0 comments on commit b876dd1

Please sign in to comment.