Closed JustinAiken closed 5 years ago
let me try this out and get back to you.. i hate the password prompt too, if its possible to get rid of it that would be killer!
hi @JustinAiken
i added support for passwordless rslive to v1.7.4. Can you try it out and let me know if it works!
you'll have to check this setting:
my sudoers for reference:
[I] /e/sudoers.d sudo cat rocksniffer
Password:
%staff ALL=(ALL) NOPASSWD: /Users/sandi/Projects/rs-manager/release-builds/Rocksmith\ Manager-darwin-x64/Rocksmith\ Manager.app/Contents/Resources/app/src/tools/rocksniff_mac, /Users/sandi/Projects/rs-manager/src/tools/rocksniff_mac
[I] /e/sudoers.d
thanks for initial legwork on this! i wasn't sure if it was possible to whitelist single applications
the bash script also makes the code neater and easy to debug!! 🍻
Can you try it out and let me know if it works!
$ sudo /Applications/Rocksmith\ Manager.app/Contents/Resources/app/src/tools/rocksniff_mac on
$ sudo /Applications/Rocksmith\ Manager.app/Contents/Resources/app/src/tools/rocksniff_mac pids
13684
$ ps aux | grep 13684
root 13684 2.1 0.2 4464912 41564 s005 S 4:01PM 0:00.77 /Library/Frameworks/Mono.framework/Commands/mono RockSniffer.exe
$ sudo /Applications/Rocksmith\ Manager.app/Contents/Resources/app/src/tools/rocksniff_mac off
$ sudo /Applications/Rocksmith\ Manager.app/Contents/Resources/app/src/tools/rocksniff_mac pids
exec
command is doing bash -c
something instead of just directly running the script? did you check the passwordless setting ? it picks up window.exec / window.sudo.exec based on that setting
.... I totally missed that setting 😛
Nevermind, it does work perfectly!
sweeet, window.sudo.exec always shows the dialog irrespective of sudoers which is lame..
i used this setting to workaround the issue... thanks for testing! closing this issue as fixed! no more password prompts yay!!!!
Can also take it one step further with Hammerspoon (which I'm currently using to push enter to get through the menus for me 😛)
Set up a little script like:
function applicationWatcher(appName, eventType, appObject)
if (appName == "Rocksmith2014") then
if (eventType == hs.application.watcher.launched) then
os.execute('/usr/bin/sudo -n "/Applications/Rocksmith Manager.app/Contents/Resources/app/src/tools/rocksniff_mac" on')
hs.alert.show("Rocksniffing On...")
elseif (eventType == hs.application.watcher.terminated) then
os.execute('/usr/bin/sudo -n "/Applications/Rocksmith Manager.app/Contents/Resources/app/src/tools/rocksniff_mac" off')
hs.alert.show("Killed RockSniffer!")
end
end
end
local appWatcher = hs.application.watcher.new(applicationWatcher)
appWatcher:start()
And it'll start/stop RockSniffer whenever you start/stop Rocksmith.
Commented that bit out for now.. but once RockSniffer gets a bit more reliable, the dream is to have it record every note I ever play, and constantly dump stats 😀
oooh, just gets better and better!! downloading hammerspoon now!
one thing i would really love is a play button or similar which would take me directly to the song options panel with that song selected... havent found the pointer which controls that yet, so still a dream...
Okay, so if we make a file like this:
src/tools/rocksniff
:And then replace the "on" command for mac with:
..and something similar for the "stop tracking"...
We should keep about the same functionality, but now we have a single command
rocksniff
.Then if one edits their local sudors file to add:
They should not get prompted to enter the password when clicking "Start Tracking" or "Stop Tracking"..
But the downside is, it means we can't dynamically find the
rocksniff
script or theRockSniffer.exe
- it gets hardcoded to RSManager being installed to/Applications
What do you think about this idea?