Run your codex-pets.net desktop companions on Ubuntu/GNOME.
Loads any .codex-pet.zip file and animates the sprite on your desktop — transparent, always-on-top, wandering around your screen.
- Ubuntu 20.04+ (or any Linux with GTK3 + a compositor)
- Python 3.10+
python3-gi(GTK3 bindings)python3-pil(Pillow — WebP spritesheet loading)
Wayland note: The app forces the X11 GDK backend (
GDK_BACKEND=x11) so window positioning works correctly under XWayland. This is handled automatically — no extra configuration needed.
git clone https://github.com/ikentrock/codex-pet-linux
cd codex-pet-linux
./install.shOr manually:
sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-pil
mkdir -p ~/pets
cp desktop_pet.py ~/.local/bin/codex-pet
chmod +x ~/.local/bin/codex-petPets are loaded from two directories (both are optional):
| Directory | Notes |
|---|---|
~/pets/ |
Primary library |
~/.codex/pets/ |
Secondary library (scanned if it exists) |
- Download any
.codex-pet.zipfrom codex-pets.net - Drop the file into
~/pets/ - It will appear automatically in the right-click menu
# Launch with the first pet found in ~/pets/
codex-pet
# Launch a specific pet
codex-pet ~/pets/grogu-kid.codex-pet.zip
# Larger size (default scale is 0.5)
codex-pet --scale 0.75| Action | Result |
|---|---|
| Left-click | Trigger waving animation |
| Left-drag | Pick up and move the pet (plays jumping animation) |
| Right-click | Context menu |
- Pet list — switch instantly between all pets in your library
- ☑ Enable movement — pet wanders around the screen using Run Right / Run Left animations
- ☑ Run on startup — creates/removes
~/.config/autostart/codex-pet.desktop - ☑ Keep screen awake — inhibits the screen saver via D-Bus (
org.freedesktop.ScreenSaver); off by default so the screen sleeps normally - Quit
Toggle Run on startup from the right-click menu, or create the entry manually:
mkdir -p ~/.config/autostart
cat > ~/.config/autostart/codex-pet.desktop << EOF
[Desktop Entry]
Type=Application
Name=Codex Pet
Exec=codex-pet
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
EOFThe .codex-pet.zip format from codex-pets.net contains:
pet.json # metadata: id, displayName, spritesheetPath
spritesheet.webp # RGBA spritesheet: 192×208px tiles, 8 cols × 9 rows
| Row | Animation | When used |
|---|---|---|
| 0 | Idle | Standing still |
| 1 | Run Right | Moving right |
| 2 | Run Left | Moving left |
| 3 | Waving | Left-click / drop |
| 4 | Jumping | Dragging |
| 5 | Failed | Sleeping (after 60 s idle) |
| 6 | Waiting | Moving vertically |
| 7 | Running | (reserved) |
| 8 | Review | Rare special event |
Blank frames at the end of each row are detected and skipped automatically.