[SOLVED] How can I make Virtualbox Virtual Machines launch when KDE loads?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How can I make Virtualbox Virtual Machines launch when KDE loads?
One of my VM's is a Windows machine running some software and I need to actually see the VM (not headless). It's not a huge deal to manually click on the shortcuts or launch the VM's from Virtualbox Control Manager but it'd be nice to be able to have them auto launch when the machine turns on and logs me in.
I've tried using KDE's Autostart system, no combination of things I tried actually made the VM's launch. I figure if I create Desktop Shortcuts to the VMs, surely there is a way to make KDE "double click" on those shortcuts once KDE has launched, right?
Thanks for your help!
Ps. I see that there is a way to launch virtualboxes doing something like this but surely there is a simpler way?
You don't indicate which distribution of Linux you are using or which kde. Which combination of things did you try? On my machine with kde 4.14.38, I put the 1 liner below in a bash script in /home/user/.kde/Autostart and it runs virtualbox on login.
You don't indicate which distribution of Linux you are using or which kde. Which combination of things did you try? On my machine with kde 4.14.38, I put the 1 liner below in a bash script in /home/user/.kde/Autostart and it runs virtualbox on login.
Code:
#!/bin/bash
/usr/bin/virtualbox
I am using Kubuntu 18.04.
I don't want Virtualbox to run, I want to launch a virtual machine in Virtualbox, not sure if that's what you meant or not. Virtualbox itself can create "shortcuts" which are icons on the desktop, I double click these and the VM launches. I've tried every combination of these Shortcuts with KDE's built in Autostart feature that I could think of.
I was told I should try adding a sleep before executing the shortcut. I will try that next.
OK, I misunderstood your question. I have android installed in VirtualBox and the script below in the same location as above starts android on boot. You can use either the name or the UUID.
OK, I misunderstood your question. I have android installed in VirtualBox and the script below in the same location as above starts android on boot. You can use either the name or the UUID.
Code:
#!/bin/bash
vboxmanage startvm android
Thank you. I ended up doing something similar and they now automatically launch at startup as hoped/expected. I really appreciate the help. I really didn't want to go through the suggested solutions I had already found.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.