How do I?: Linux (Debian) Autostart VM FROM user login

Discussions related to using VirtualBox on Linux hosts.
Post Reply
MikeInGenSan
Posts: 9
Joined: 15. Mar 2020, 09:48
Primary OS: Debian Sid
VBox Version: OSE Debian
Guest OSses: Debain 12, Windows 11
Location: Geneal Santos City, Philippines

How do I?: Linux (Debian) Autostart VM FROM user login

Post by MikeInGenSan »

I do not want an autostart from /etc/default/virtualbox init (manual 2.22.1) because there will be, occasionally, logins of another user. (Maintenance of the unit will be based on that other user's login while the VM is already running.)

I have a system that will autologin a primary "user."

I have the ability to autostart VirtualBox via the .config/autostart/vitualbox.desktop. BUT that doesn't start the VM I need to start.

Is there a way to force a VM to start following the autouser login? (Not as a headless as I need to display the session on the primary display). I was able to do this with VirtualBox 4, years ago but things have changed over time. :?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How do I?: Linux (Debian) Autostart VM FROM user login

Post by scottgus1 »

MikeInGenSan wrote:force a VM to start following the autouser login?
The 'vboxmanage startvm "vm name" ' command (https://www.virtualbox.org/manual/ch08. ... ge-startvm) will start a VM from the command line.

Web-search for how Debian runs commands when the login completes. Then make Debian run the vboxmanage command.
Post Reply