Open Andrew-J-Larson opened 3 years ago
I am not sure about what to do with the dbus button. I think I did it wrong and wonder if it works for that many people. Can you think of other ways to make it work? Also, I will push the changes I made to the helper.sh file soon. They are mid-progress but closer to working.
I actually did find my own way to get it automatically started, but it requires using the /etc/profile.d/ directory and creating/adding a script to be called with sudo for all nopass. I'll relay the details if you think it would be better.
at /usr/local/bin/gwsl-fix-dbus.sh
#!/bin/bash
ps -e | grep -q "dbus\-daemon"
if [ $? -eq 1 ]; then
service dbus start > /dev/null 2>&1
fi
Then ran sudo chown root: /usr/local/bin/gwsl-fix-dbus.sh
and sudo chmod 755 /usr/local/bin/gwsl-fix-dbus.sh
at /etc/profile.d/gwsl-fixes.sh
#!/bin/bash
sudo /usr/local/bin/gwsl-fix-dbus.sh
Then ran sudo chown root: /etc/profile.d/gwsl-fixes.sh
and sudo chmod 777 /etc/profile.d/gwsl-fixes.sh
via sudo visudo
and added the following line
# Fixes GWSL dbus not starting issue
ALL ALL=(root) NOPASSWD: /usr/local/bin/gwsl-fix-dbus.sh
And then optionally restart Ubuntu, or start up another session (via an app or terminal)
The main advantage of this is, it doesn't rely having to be put in every user's profile, and it should start up only when it needs to, and every time ubuntu gets started.
Not sure how much of my scripts can be used in other distros though.
Thanks! Hmm. I'll look into it. I don't really want to edit sudoers so I currently just ask for the password every time a shortcut uses dbus. I gtg afk
No problem 👌🏻
Also I noticed something in https://github.com/Opticos/GWSL-Source/blob/master/assets/GWSL_helper.sh:
Is there a reason for the double slashes at lines 114 and 117?: