PetGen

Codex Pet VM Setup: Pets on Virtual Machines and External Displays

2026-10-13

A codex pet vm walkthrough: which home directory the pet files sit in, what changes when you add a second monitor, and how a remote desktop pet behaves when the window gets compressed.

Where a codex pet actually lives

Every codex pet is two files in one folder: a spritesheet.webp and a pet.json, both sitting under the pets directory in the home folder of the machine that runs Codex. Nothing about them is display-aware. The renderer draws them at a fixed size in a corner of the Codex window, which is why a codex pet vm setup is mostly a question of which home directory you are looking at.

That distinction matters the moment you stop working on a single box. The pet follows the home directory, not the monitor and not the person. Drop the same folder onto a second machine and you get the same pet. Log into a VM with a fresh home and you get an empty corner.

  • Pets folder on the host: the pet shows in your normal Codex window
  • Pets folder inside the VM: the pet shows only when Codex runs there
  • Shared or synced folder: the pet shows on both, as long as the paths match
  • Remote desktop into the host: the pet shows, because you are looking at the host window

External displays: what changes and what does not

Plugging in a monitor does not move the pet, but it does move your eyes, and that is the usual reason people report a missing pet on an external display. It is sitting in the same corner of the same window; the window just is not where you are looking anymore.

Two things genuinely do change. Scaling affects how large the sprite appears, and window position decides whether the corner it occupies is on the screen you read.

  • Drag the Codex window to the monitor you actually read and the pet comes along
  • Scaling at 100 versus 150 percent changes the drawn size, the spritesheet file stays identical
  • A different refresh rate does not speed up or slow the animation, the sprite cycles on its own timer
  • Placement across two screens is written up at /blog/dual-monitor-pet-placement

Virtual machines and remote desktop pet sessions

A codex pet virtual machine is the case that trips people up, because there are two home directories and usually only one of them has your pets folder. If you run Codex inside a Linux VM on a Windows host, that VM needs its own copy of the folder before anything appears.

Remote desktop is the easier half. You are watching the remote machine's Codex window, so whatever that machine has installed is what you see. The catch is bandwidth: compression and lag apply to the pet exactly as they do to the rest of the window.

  • Copy the pets folder into the VM home directory, then restart Codex inside the VM
  • Over remote desktop the pet renders on the remote machine, so lag hits it too
  • Full-screen remote sessions are fine; windowed ones can crop the corner where the pet sits
  • /blog/sync-codex-pet-across-machines covers keeping both copies identical

Check this before you blame the pet

Most missing-pet reports are a path problem rather than a generation problem. Run through this list before you regenerate anything.

  • Is Codex running on the machine you are looking at?
  • Does the pets folder exist in that machine home directory?
  • Does pet.json point at a spritesheet that is actually present?
  • Is the Codex window wide enough for the corner the pet occupies?
  • If you need to redo it, the install steps are at /blog/install-codex-pet-terminal

One install per machine, then forget about it

Generate a pet at codexpetgenerator.com, download the ZIP, and install it with the terminal steps at /blog/install-codex-pet-terminal. Do that once per machine, VM included, and the pet stops being something you have to think about.

If you want the same pet everywhere, the folder sync method at /blog/sync-codex-pet-across-machines is the piece that makes it stick. Generation counts are listed at /pricing, and the generator itself is at /. Recording a session is the one case where you want the pet out of frame, and /blog/hide-codex-pet-screen-share handles that in about ninety seconds.

Frequently asked questions

Does a codex pet work inside a virtual machine?

Yes, as long as that VM has its own copy of the pets folder. The pet lives in the home directory of whichever machine runs Codex, so a freshly created VM starts with no pets at all.

Why does my pet look a different size on my second monitor?

Display scaling. A monitor set to 150 percent draws the same spritesheet larger than one at 100 percent. The file does not change; match the scaling on both screens if you want an identical look.

Will the pet show up over remote desktop?

It will, because a remote session shows you the other machine running its own Codex window. Expect the animation to stutter when the connection does, and check that the window is not cropped at the corner.

Can a host and a VM share one pets folder?

You can point a shared or synced folder at it and both sides will read the same files. Two machines writing at the same time is where it gets messy, so sync in one direction.

Related posts

Share this article:

Try it yourself

Ready to turn your own photo into a pixel-art pet? Upload it on PetGen and get your spritesheet + pet.json in minutes.

Generate your pet now →