Custom icons for virtual machines

Here you can provide suggestions on how to improve the product, website, etc.
MHoefler
Posts: 4
Joined: 20. Jun 2017, 09:32

Custom icons for virtual machines

Post by MHoefler »

Hi!

I really like Virtualbox and it seems to be working better than VMware! One thing that would even make it much better is if I could select a custom icon for each virtual machine! This way, I could easily distinguish between them in the VM Manager and even more important, in the tray area! I use "DeskSoft WindowManager" to minimize the VMs to the tray and if they all have the same icon, it's hard to find a specific one.

Actually, selecting a custom icon should be very easy to implement and I can hardly believe it's not possible yet, becasue there is enough room in the settings page to make a selection possible - just clicking the icon would be enough to open a file dialog to search for the custom icon, etc.

So please, add this feature, because I know many people would love that!

Thanks,
Martin
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Custom icons for virtual machines

Post by mpack »

Are you assuming Windows hosts? I suspect so.

On Windows hosts you can create a shortcut to your VM on the desktop, and possibly in that desktop manager you mentioned. In Windows you can then right click the shortcut, view properties and change the icon.
MHoefler
Posts: 4
Joined: 20. Jun 2017, 09:32

Re: Custom icons for virtual machines

Post by MHoefler »

Yes, Windoes host - sorry I forgot to mention that.

I know about assigning icons to shortcuts in Windows, but that's not what I meant. The "original" VM icon is still used in the task manager, task list, tray icon, task bar, VirtualBox Manager, etc.

It would be nice to be able to assign a system-wide custom icon for each machine, that will be used everywhere.

I have dedicated virtual machines for different tasks (work, email, downloads, surfing, etc. - all WIndows 10 guests) and it would make life so much easier if I could assign my custom icons to each one, so that I can distinguish between them easily.

Thanks!
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Custom icons for virtual machines

Post by socratis »

Do you realize where the icon comes from? The executable (except in VirtualBox Manager). So, could you please explain to me how exactly you would modify the executable with your custom icon? Just the logic, not the actual implementation. And remember that it has to work with simple users (not administrators) as well.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
MHoefler
Posts: 4
Joined: 20. Jun 2017, 09:32

Re: Custom icons for virtual machines

Post by MHoefler »

That's easy: VirtualBox creates Windows (each VM is a separate window) and you can easily assign each window any icon with the Windows API. Very easy for programmers...
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Custom icons for virtual machines

Post by socratis »

Not the way that VirtualBox is written. It's not using an MDI model. It's a different process with each VM being a different input parameter. Take a look at the command line.

But if you think that it would be easy for programmers to changes that (you seem to be one), I'm sure the developers might be interested. They are always open to ideas...

BTW, I'm not sure if in the Task Manager the different icons would show, or in the Taskbar.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Custom icons for virtual machines

Post by Perryg »

I think you already can on a per machine basis.

Code: Select all

VBoxManage modifyvm  <uuid|vmname> [--iconfile <filename>]
It makes the *.vbox file really ugly but it works. Be sure to backup the original *.vbox file first.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Custom icons for virtual machines

Post by socratis »

We tried the "--iconfile" in 01/2017 in multiple platforms with disappointing results. No one could make it work. And there's an open ticket, #16489, but that doesn't mean much...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Custom icons for virtual machines

Post by Perryg »

It works for me. That's how I knew it makes the *.vbox file really ugly. It puts the icon code in the top of the file. IIRC this needs to be done while the main manager and probably the VBoxSVC is stopped, or at least the manage and svc needs to be reset to show the actual change.
custom icon.png
custom icon.png (9.12 KiB) Viewed 27381 times
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Custom icons for virtual machines

Post by socratis »

So what was the format of the icon file? Raw data? ICO? PNG? I should try it...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Custom icons for virtual machines

Post by Perryg »

Not sure, but I know png works as that is what the file is I used.
MHoefler
Posts: 4
Joined: 20. Jun 2017, 09:32

Re: Custom icons for virtual machines

Post by MHoefler »

Interesting hint with VBoxManage - thanks Perryg, I'll try that.

However, since it obviously is possible to change the icon that complicated and user unfriendly way, it should be easy to let the user simply choose a custom icon in the settings of the VM by clicking on the icon, etc.

I hope, this will be implemented.

Thanks!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Custom icons for virtual machines

Post by Perryg »

I am sure it is possible but doubtful. The cost benefit is just not there. Only a handful of people have asked and they took the time to put together a way to do this for the few but a global approach is costly.
Hans4
Posts: 1
Joined: 14. Jun 2018, 20:14

Re: Custom icons for virtual machines

Post by Hans4 »

Perryg wrote:It works for me. That's how I knew it makes the *.vbox file really ugly. It puts the icon code in the top of the file. IIRC this needs to be done while the main manager and probably the VBoxSVC is stopped, or at least the manage and svc needs to be reset to show the actual change.
custom icon.png
  • First, I realize this is a somewhat old post (but not so old that it's not still relevant).
  • The quote above does work for me (running VirtualBox 5.2.12 on Fedora 28) WITHIN the VirtualBox Manager - only.
  • However, I don't typically launch the manager and then launch machines. Rather, I have desktop shortcuts that launch my machines directly. And for which I've made my own sets of cool little icons, so I know which machine is which. These icons appear great in my menus and for my desktop shortcuts.
  • The problem: upon actually launching the machine, the VirtualBox executable goes and stomps on the icon used when launched with the lovely little virtual box logo. This makes it really cumbersome to quickly determine which minimized window in the app tray happens to correspond to which machine I'm looking for!
    • So, why does the executable have to override the icon that it was launched with (perhaps that's a multi-platform coding issue)?
    • But, in any such case, why doesn't it just use the appropriately scaled icon provided with the virtual machine (especially since it knows I started the machine with --startvm)?
    • I'd also happily provide a switch (say, --noicon) or even an iconfile to the 'VirtualBox --startvm' command, if for some reason it couldn't just use (or scale) the icon provided with the vm.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Custom icons for virtual machines

Post by socratis »

Hans4 wrote:... the VirtualBox executable goes and stomps on the icon ...
... why does the executable have to override the icon ...
... why doesn't it just use the appropriately scaled icon
All of your questions have the same answer: that's your OS doing that, not VirtualBox. Your OS takes the executable icon from the executable. Unless your icon is a resource within the app, or defined somewhere that the OS knows about it, the answer is like the one above. And mind you, you can't have an icon per instance, which is what you're looking for.

Have you tried it with other applications? If so, do you have an example that's working?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply