Open Karrq opened 1 year ago
Hello, I recently got my hands on a new Steam Deck and I wanted to make system management and file transfer less painful without having to switch back and forth between desktop and gaming mode.
To that end, I wanted to enable/disable the SSH server service using this plugin, which is million times better then having a "Non-Steam Game" pointing to konsole etc.
My first attempt failed as I noticed
sudo
wasn't supported, premusably for the password input, so I had tried specifying over sudoers file to remove the password for the specific invocations I need, but I wasn't able to get it to work.I realized I could normally start/stop service without sudo, but I'd be prompted for a password. I know the mechanism behind this is PolKit so I figured I could add a rule to allow management of the sshd.service unit without a password, and it worked - I'm able to manage
sshd.service
without being prompted for password, simply withsystemctl start sshd
.So I tried creating 2 shortcuts, one to start and one to stop, with the appropriate invocations, but unfortunately when I attempt to use these they seem to keep running forever, without actually turning on (or off) the service.
Am I missing something? Thank you!
This should work, I'll do some testing as to why its not
Thank you! I was wondering if there was a way or a place where the terminal output is stored? Or some kind of logging that we can look at to better diagnose issues like these
I was able to get this working. Here is my polkit rules file
/etc/polkit-1/rules.d/49-sshd-nopassword.rules
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.systemd1.manage-units" &&
action.lookup("unit") == "sshd.service" &&
subject.user == "deck") {
return polkit.Result.YES;
}
});
Shortcut is just systemctl start sshd
and made sure to uncheck "Does this launch an app?" option.
Hello, I recently got my hands on a new Steam Deck and I wanted to make system management and file transfer less painful without having to switch back and forth between desktop and gaming mode.
To that end, I wanted to enable/disable the SSH server service using this plugin, which is million times better then having a "Non-Steam Game" pointing to konsole etc.
My first attempt failed as I noticed
sudo
wasn't supported, premusably for the password input, so I had tried specifying over sudoers file to remove the password for the specific invocations I need, but I wasn't able to get it to work.I realized I could normally start/stop service without sudo, but I'd be prompted for a password. I know the mechanism behind this is PolKit so I figured I could add a rule to allow management of the sshd.service unit without a password, and it worked - I'm able to manage
sshd.service
without being prompted for password, simply withsystemctl start sshd
.So I tried creating 2 shortcuts, one to start and one to stop, with the appropriate invocations, but unfortunately when I attempt to use these they seem to keep running forever, without actually turning on (or off) the service.
Am I missing something? Thank you!