Skip to content

[SOLVED] Not getting any device when running as a daemon #208

@HeuristicPerson

Description

@HeuristicPerson

I've created a python script that detects inactivity on gamepads and disconnects them from the system if they are bluetooth devices. The script is working fine with no problems when I run it as a regular user in Ubuntu.

Then, I created an user service with the following content:

[Unit]
Description=This service disconnects bluetooth gamepads after 10 minutes of inactivity.

[Service]
Type=simple
RemainAfterExit=true
ExecStart=python3 /opt/bluetooth_pad_disconnect/bluetooth_pad_disconnect.py

[Install]
WantedBy=default.target

The script starts with no problem but it doesn't detect any device at all. Do you have an idea of what the problem could be?

I've tried running a .bash script printing the user id and groups just in case there was a problem but everything is the same as if I was running a regular terminal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions