Jul-03-2020, 03:38 PM
I'm trying to run Peppy player on startup in Debian 10: https://github.com/project-owner/Peppy.doc/wiki/Expert
Since rc.local is deprecated I'm trying to do it with systemd.
In rc.local you normally start Peppy with:
I did read it is better to install a custom version of Python so if the system Python gets update nothing breaks.
So i did:
For systemd i tried:
But no matter what i try in the peppy.service i get:
My user is in this groups: haegarthehorrible tty cdrom floppy sudo audio dip video plugdev netdev
Is that auto login part even needed when done right?:
So what is the right way to do it?
Since rc.local is deprecated I'm trying to do it with systemd.
In rc.local you normally start Peppy with:
Quote:su haegarthehorrible -c 'cd /home/haegarthehorrible/Peppy; openvt -s -- python3 peppy.py'
I did read it is better to install a custom version of Python so if the system Python gets update nothing breaks.
So i did:
Quote:~$ cd ~
~$ mkdir tmp
~$ cd tmp
~$ wget https://www.python.org/ftp/python/3....n-3.8.4rc1.tgz
~$ tar zxvf Python-3.8.4rc1.tgz
~$ cd Python-3.8.4rc1
~$ ./configure --prefix=$HOME/opt/python-3.8.4rc1
~$ make
~$ make install
~$ cd ~
~$ nano .profile
>> Add to .profile:
export PATH=$HOME/opt/python-3.8.4rc1/bin:$PATH
~$ . ~/.profile
For systemd i tried:
Quote:~$ mkdir -p ~/.local/share/systemd/user
~$ nano ~/.local/share/systemd/user/peppy.service
[Unit]
Description=Start Peppy
After=multi-user.target
[Service]
Type=idle
User=haegarthehorrible
WorkingDirectory=/home/haegarthehorrible/Peppy
ExecStart=/home/haegarthehorrible/opt/python-3.8.4rc1/bin '/home/haegarthehorrible/Peppy openvt -s -- peppy.py'
Restart=always
RemainAfterExit=no
[Install]
WantedBy=multi-user.target
~$ systemctl --user daemon-reload
~$ systemctl --user enable peppy.service
But no matter what i try in the peppy.service i get:
Quote:~$ systemctl --user status peppy.service
● peppy.service - Start Peppy
Loaded: loaded (/home/haegarthehorrible/.local/share/systemd/user/peppy.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2020-07-03 17:10:35 CEST; 3s ago
Process: 609 ExecStart=/home/haegarthehorrible/opt/python-3.8.4rc1/bin /home/haegarthehorrible/Peppy/peppy.py (code=exited, status=216/GROUP)
Main PID: 609 (code=exited, status=216/GROUP)
My user is in this groups: haegarthehorrible tty cdrom floppy sudo audio dip video plugdev netdev
Is that auto login part even needed when done right?:
Quote:~$ mkdir -p /etc/systemd/system/[email protected]
~$ sudo nano /etc/systemd/system/[email protected]/override.conf
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin haegarthehorrible --noclear %I 38400 linux
So what is the right way to do it?