Categories
Linux system TTUtilities

How to Install and Set Up TTUtilities

0
(0)

How to Install and Set Up TTUtilities on $user

Author: Owen Macasu and Roel Cabante

Created on: October 28, 2024

Install these two packages: pip3 and unzip.

sudo apt install python3-pip
sudo apt install unzip

The user example for this tutorial is: bot.

  1. Log in to your terminal with sudo or root privileges.
  2. Create a user for another instance of this bot by typing:
    adduser bot
  3. Add the user bot to the sudo group by typing:
    usermod -aG sudo bot
  4. Add the user bot to the systemd profile by typing:
    loginctl enable-linger bot
  5. Log in now as the user you created (for example, bot).
  6. Download TTUtilities by typing this command:
    wget https://blindmasters.org/TTUtilities/TTUtilities-linux.zip
  7. Extract the downloaded file:
    unzip TTUtilities-linux.zip
  8. Change to the extracted directory by running:
    cd TTUtilities-linux
  9. Set up a virtual environment by running this command:
    python3 -m venv venv
  10. Activate the virtual environment by running:
    source venv/bin/activate
  11. Install the bot’s requirements by running:
    pip3 install -r requirements.txt --upgrade
  12. Make setup.sh executable by running:
    chmod +x setup.sh
  13. Run setup.sh to complete the bot configuration.
  14. Run the bot after installing all requirements. Do not close the terminal. You should search for a video to allow the bot to log in to your account. Use the command /p. This will not play anything on the first run; instead, you’ll see “yt-dlp” prompting you to go to the following link to add a new device: https://www.google.com/device. You should also see a code that you need to enter in your browser to complete the sign-in.
  15. Close the terminal and log in again using the username you created (for example, bot).
  16. Go to the .config folder by typing:
    cd ~/.config/
  17. Make a directory for systemd/user by typing:
    mkdir -p systemd/user/
  18. Using any SFTP client like FileZilla, upload pulseaudio.service and pulseaudio.socket.
  19. Create a new file by typing:
    nano .config/systemd/user/TTUtilities.service
  20. The service file should look like this. Edit it based on your preferences, but this time the username is bot:
    [Unit]
    Description=TTUtilities bot for TeamTalk
    
    [Service]
    Type=simple
    ExecStart=/home/bot/linux/venv/bin/python /home/bot/linux/TTUtilities.py
    Restart=on-failure
    Environment="CONFIG_FILE=/home/bot/linux/config.ini"
    WorkingDirectory=/home/bot/linux/
    StandardOutput=syslog
    StandardError=syslog
    
    [Install]
    WantedBy=default.target
  21. Enable and start the bot by running these two commands separately:
    systemctl --user enable TTUtilities.service
    systemctl --user start TTUtilities.service

That’s all! Enjoy!


How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Leave a Reply

Your email address will not be published. Required fields are marked *

 
Live Chat

Hi, Your satisfaction is our top priority, we are ready to answer your questions...