script-server icon indicating copy to clipboard operation
script-server copied to clipboard

Error trying to use 'requires_terminal' when running as a systemd daemon

Open ryanovas opened this issue 1 year ago • 3 comments

Hi! Just something I noticed as I'm trying to set up script-server for the first time. Whenever I make a script that uses , I get the following error in the web console output:

Error creating textual authentication agent: Error opening current controlling terminal for the process (/dev/tty'): No such device or address (polkit-error-quark, 0)`

I am on Ubuntu following the instructions in the wiki for running this as a daemon. Any ideas how to make this work?

Thanks!

ryanovas avatar Feb 01 '24 05:02 ryanovas

Hi @ryanovas to be honest, I'm not a linux expert. I found this discussion on Reddit: https://www.reddit.com/r/linuxadmin/comments/dp1mfw/running_a_service_using_ec2user/

Apparently, this error can be caused by an authentication. May be you can specify, under which user to run the daemon, or under su

bugy avatar Feb 01 '24 08:02 bugy

No worries! Just raising it in case you or someone else knows.

I have some semblance of the issue, I know it's something to do with services (especially root services) not having access to a tty instance(?) to generate an interactive terminal. I know there are some ways to pass it a tty instance but I'm not experienced enough with that level of linux admin to know what to do off the top of my head. Perhaps running it as a user will provide one, but then I lose sudo commands like restarting the server.

I will continue to investigate when I can, and will report back my findings or perhaps someone else will happen upon this issue.

ryanovas avatar Feb 01 '24 19:02 ryanovas

Thank you!

bugy avatar Feb 02 '24 08:02 bugy