Linux
Muscle Buddy was developed with Linux mobile as the tier 1 platform. Muscle Buddy was primarily developed on the Librem 5, PinePhone, and PineTab 2.
Below is a test matrix of platforms Muscle Buddy is known to run on.
Device | OS | notes |
---|---|---|
Librem 5 | PureOS | Phone broke before finishing app. See PinePhone running Mobian which is similar. |
Microsoft Surface Pro 3 | Ubuntu 24.04LTS | Needed to change touch screen driver to Wacom in ~/.kviy/config.ini. |
PinePhone | Mobian | Portrait only. Swapping apps while in Muscle Buddy can negatively effect touch screen calibration. |
PineTab 2 | DanctNIX |
HOWTOs
As of the second beta release, the easiest way to get Muscle Buddy up and running on your Linux device is to run one of the AppImage installers. You just download the AppImage and execute it to create a fresh Muscle Budy install with a desktop icon.
Here are compiled AppImages for both the Intel/AMD and ARM platforms.
Hardware platform | AppImage download button |
---|---|
x86_64 | |
aarch64 |
Setting up a source distribution of Muscle Buddy
Debian derived systems (includes Mobian, PureOS, and Ubuntu).
HINT: I prefer using SSH from a workstation to make it easier to execute these commands on the mobile device rather than use the device’s touch screen terminal.
Check to see what version of Kivy your platform database supports:
mobian@mobian:~$ apt-cache show python3-kivy|grep Version
Version: 2.1.0-1+b1
If the version >= 2.2, install the following packages using apt:
mobian@mobian:~$ sudo apt install python3-evdev python3-psutil python3-pip python3-kivy
Otherwise run the command without the python3-kivy augment:
mobian@mobian:~$ sudo apt install python3-evdev python3-psutil python3-pip
Now you should be able to install the remaining dependencies using “pip”.
If you don’t have Kivy >=2.2:
mobian@mobian:~$ pip install --break-system-packages kivy
Now install KivyMD:
mobian@mobian:~$ pip install kivymd==1.1.1
Now check to make certain the input devices are readable by your device’s user account:
mobian@mobian:~$ cd /dev/input
mobian@mobian:/dev/input$ ls -l
total 0
drwxr-xr-x 2 root root 160 Mar 10 13:46 by-path
crw-rw---- 1 root input 13, 64 Mar 10 13:46 event0
crw-rw---- 1 root input 13, 65 Mar 10 13:46 event1
crw-rw---- 1 root input 13, 66 Mar 10 13:46 event2
crw-rw---- 1 root input 13, 67 Mar 10 13:46 event3
crw-rw---- 1 root input 13, 68 Mar 10 13:46 event4
crw-rw----+ 1 root input 13, 69 Mar 10 13:46 event5
crw-rw---- 1 root input 13, 63 Mar 10 13:46 mice
crw-rw---- 1 root input 13, 32 Mar 10 13:46 mouse0
Check to make certain your user is in the group that events have, in this case “input”.
mobian@mobian:/dev/input$ cd /etc
mobian@mobian:/etc$ grep input group
input:x:101:
If your user account is not in your input group, add it:
mobian@mobian:~$ sudo usermod -aG input $USER
NOTE: If you changed your group file, you may have to reboot in order for the change to take effect.
Now you can install Muscle Buddy in your device’s home directory. Use this URL to download a tar file:
Place the file in your device’s home directory and extract it.
mobian@mobian:~$ tar -xzvf <release tar file>
Assuming our device uses Phosh or a Gnome based interface, we want to create a icon for Muscle Buddy.
Copy the desktop from the Muscle Buddy documents directory.
mobian@mobian:~$ cp musclebuddy/docs/musclebuddy.desktop .local/share/applications/
If necessary edit the desktop file to correct any path issues.
mobian@mobian:~$ cd .local/share/applications/
mobian@mobian:~/.local/share/applications$ vi musclebuddy.desktop
If your user is not mobian update the path to your devices home directory.
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/home/mobian/musclebuddy/main.py
Name=Muscle Buddy
Comment=Muscle Buddy workout application
Icon=/home/mobian/musclebuddy/muscle_buddy.png
Categories=System;
NoDisplay=false
StartupNotify=true
Path=/home/mobian/musclebuddy
X-Purism-FormFactor=Mobile;
Now in the case of the PinePhone and Librem 5 your should be done.
Arch Linux derived systems like DanctNIX.
Arch Linux uses pacman instead of apt, but the whole process is essentially identical. The Debian instructions with pacman substituted would probably work for you.
$ sudo apt install <package name>
Is equivalent to:
$ sudo pacman -S <package name>
But I just had to re-image my PineTab 2 as a “pacman -Su” (system upgrade command) negatively effected OpenGL and WiFi performance.
I will walk you through the process I went through to get Muscle Buddy up and running on my PineTab 2 with a fresh 2025-01-04 factory image of Danctnix.
HINT: The first thing I do with a new Linux device is to get an OpenSSH server up and running to make it easy to run commands. You can use the virtual keyboard or attach a USB keyboard as alternatives to run these commands.
Install Muscle Buddy dependencies via pacman.
$ sudo pacman -S python-kivy python-pip python-psutil python-evdev
Once complete install kivymd via pip.
$ pip install --break-system-packages kivymd==1.1.1
Like on Debian systems, if your user account is not in your input group, add it:
$ sudo usermod -aG input $USER
NOTE: If you changed your group file, you may have to reboot in order for the change to take effect.
Download and extract the Muscle Buddy to your home directory.
From this point you should be able to run Muscle Buddy from the terminal by by running main.py.
NOTE: If your device uses a desktop that is KDE Plasma derived, you can use the Menu Editor to add Muscle Buddy to your menu where you feel it best fits as an alternative to creating a .desktop file.
Special notes.
NOTE: If your device uses Wacom touch technology like a Microsoft Surface, you may need to do one more step. If your touch screen does not behave correctly try replacing your [input] section in your .kivy/config.ini file with the contents of ~/musclebuddy/docs/readme.wacom.txt.