vikix.GuideInstallSource

19 Windows in a window

Some programs only run on Windows: a bank’s tool, an accounts package, desktop Outlook. Vikix can run Windows 11 in a virtual machine (VM): a whole Windows computer inside a window, which tiles like any other. Its clipboard is shared with yours, its screen resizes with the window, and a folder of yours is a drive in Windows. Once Windows is there, one of its programs can also have a window of its own, without the Windows desktop around it.

It’s optional, and it’s big, so nothing is installed until you ask for it.


19.1 What you need

Your laptop doesn’t need to meet Windows 11’s own requirements: the VM has the TPM and Secure Boot it asks for, and the check for a newer processor is skipped.


19.2 Installing Windows

Four commands, in a terminal.

  1. Once, the parts it needs (about 250 MB of packages, and the Windows drivers disc):
    vikix windows setup
    

    It asks for your password (sudo) once, for the packages and the VM’s network. To put the VM’s disk somewhere else, such as a bigger drive: vikix windows setup --disk /path/to/folder. (vikix add windows runs the same setup: Windows is one of the features.)

  2. Install Windows from the ISO you downloaded:
    vikix windows create ~/Downloads/Win11_25H2_English_x64.iso
    

    Use your ISO’s real name (the Tab key completes it). Add --key XXXXX-XXXXX-XXXXX-XXXXX-XXXXX if you have a product key. It asks for a password for your Windows account, which is named after your Linux one.

  3. Wait. Windows installs itself: the drivers, the disk, your account (a local one, no Microsoft account needed), then the tools that share the clipboard and your folder. A notification says Windows is ready, about 25 minutes later. To watch, run vikix windows in the meantime.
  4. Open it:
    vikix windows
    

    Or Super+m → Windows (the VM). Log in with the password from step 2.


19.3 Day to day


19.4 One program, in a window of its own

The whole Windows desktop is the place to set Windows up and install its programs. To use one of them day to day, Vikix can show that program alone: its windows sit among yours and tile like any other, with no Windows desktop around them.

vikix windows apps setup        # once: asks for your Windows password
vikix windows apps              # what Windows has, from its Start menu
vikix windows app excel         # open one ...
vikix windows app excel ~/Documents/report.xlsx   # ... on a file
vikix windows apps add excel    # put it in the launcher (Super+d)

A few things to know:

For the curious: this is RDP’s RemoteApp, which sends one program’s windows where Remote Desktop would send the whole screen. FreeRDP (xfreerdp3) draws each as an ordinary X window, and StumpWM tiles it. lib/windows-apps.py does the work. Everything it changes inside Windows goes through the VM’s guest agent, which the install put there, so no network service of Windows is trusted with it. The password reaches FreeRDP on its input with the other arguments (/args-from:stdin), never on a command line or in the environment, where other programs could read it. And the bar: vikix-publish-workarea in modeline.lisp writes the screen less the bar on the root window (_NET_WORKAREA, as other desktops do), and FreeRDP passes it to Windows (/workarea).


19.5 What it can reach

Windows reaches the internet and your home or office network. It sees this laptop only as another computer on a private network, at 192.168.122.1. What this laptop keeps to itself stays out of reach: the window manager’s Lisp connection, the printers’ settings, a local AI model. So a bad download in Windows can’t take over your desktop.

There’s nothing to set up for it: vikix windows setup does it. To reach a program on this laptop from Windows on purpose, run that program on 192.168.122.1, not on 127.0.0.1.


19.6 Changing it

More memory, more processors, or a USB device handed to Windows: open the VM manager with

virt-manager -c qemu:///session

and open the windows VM’s details. Change memory and processors while Windows is shut down. A USB device is added the same way (Add Hardware → USB Host Device).


19.7 Removing it

vikix windows remove

It asks first, then deletes the VM and its disk, and with them the password kept for Windows programs, their launcher entries and the list of them, if you set those up (vikix windows apps forget --all does that part alone). ~/Windows, with your files in it, stays.


19.8 When it goes wrong

create says it needs 8 GB of memory

The laptop has less; Windows 11 won’t run well in a VM on it

The install seems stuck

vikix windows shows its screen. The install’s log is ~/.local/state/vikix/windows-install.log

No Windows is ready after an hour

Open it with vikix windows and look: Windows may be waiting on a question

The Windows window doesn’t open

vikix windows status says what’s missing

A notification says the VM is on its old network

Restart Windows (Start → Restart); vikix windows status then says it’s on the private one

Windows is slow

Give it more memory or processors (see Changing it), and close what you don’t need on both sides

Windows won’t shut down

vikix windows stop --force switches it off, like pulling the plug

A notification says a Windows program didn’t open

It shows FreeRDP’s last lines; the rest is in ~/.local/state/vikix/logs/windows-app.log. If you changed your Windows password: vikix windows apps forget, then vikix windows apps setup

vikix windows app says Remote Desktop doesn’t answer

Run vikix windows apps setup again: it switches it back on

A Windows program waits on a box that never shows (closing FACTS, its activation wizard)

The box is drawn in a way RemoteApp can’t carry across (a layered window with its own transparency). Look in the program’s own settings for a plain theme: FACTS’s Themes menu set to one draws its boxes as ordinary windows, and that is all it takes

vikix windows app says Windows has no such program

vikix windows apps reads the Start menu again, for a program installed since

The whole screen blurs while a Windows program is open

Your ~/.config/picom/picom.conf is from before Vikix 0.71.183: add the line "class_g ^= 'vikix-win-'" to its blur-background-exclude list

The README has how it works underneath.