Ticket #17855 (closed defect: fixed)

Opened 16 months ago

Last modified 11 months ago

[5.2.14][QT 5.11] VBoxManager doesn't store correctly values in ~/.config/VirtualBox/VirtualBox.xml

Reported by: FredBezies Owned by:
Component: other Version: VirtualBox 5.2.14
Keywords: Cc:
Guest type: other Host type: Linux



There is a bug in VBoxManager when using it with QT 5.11. I can reproduce it both on a Manjaro Linux based laptop and an Archlinux based PC.

When you launch VirtualBox on a linux distribution with QT 5.11, both toolbar and statusbar are hidden.

Even if you display both of them, on shutdown, it is not stored correctly.

Here is a screenshot of this bug.

When I looked at ~/.config/pVirtualBox/VirtualBox.xml I noticed these both entries:

<ExtraDataItem name="GUI/Statusbar" value="false"/> <ExtraDataItem name="GUI/Toolbar" value="false"/>

If you change both false by true with VirtualBox closed on next start, both bars are displayed.


vbox5214.png Download (261.9 KB) - added by FredBezies 16 months ago.
Missing toolbars.

Change History

Changed 16 months ago by FredBezies

Missing toolbars.

comment:2 Changed 15 months ago by msschabh

Successfully reproduced the bug.

Workarround: Quitting VirtualBox via File -> Exit or CTRL+Q

Last edited 15 months ago by msschabh (previous) (diff)

comment:3 Changed 15 months ago by faulty

Just sharing additional notes:

I've tried manually editing ~/.config/VirtualBox/VirtualBox.xml and setting <ExtraDataItem name="GUI/Toolbar" value="false"/> to true. Upon running VBoxManager, the toolbar show up. But after closing it not using File -> Exit, the value in the xml reverted back to false.

If I close using File -> Exit, the whole entry disappear instead. I guess the next time when it load, it loads the default value instead.

comment:4 Changed 15 months ago by msschabh

@faulty: can confirm.

comment:5 Changed 14 months ago by alfredo.ardito

@faulty. I confirm the same issue.

comment:6 Changed 13 months ago by dentar

can confirm this with vbox 5.2.18 running in fedora28. Ctrl-Q (file->exit) keeps the settings, just closing the window reverts both settings to false

comment:7 Changed 13 months ago by zeroepoch

I also see this issue on Fedora 28 running VirtualBox 5.2.18. I can right-click the menu-bar to re-enable them, but still it hides them again when I close the window using the corner "X".

comment:8 Changed 13 months ago by krizb

The same problem with VirtualBox-5.2-5.2.18_124319_fedora26-1.x86_64 on Fedora 28.

comment:9 Changed 13 months ago by heis2201

comment:10 Changed 13 months ago by e2tux

Hi, I can confirm the bug for several weeks now.

System: arch linux, kernel 4.18.9. VirtualBox: 5.2.18 r123745, Qt5.11.2

Config file VirtualBox.xml gets updated and changed every time the VirtualBox GUI is closed. I can enable the tool bar and status bar by settings "GUI/Statusbar" and "GUI/Toolbar" to "true" with an editor.

  • When application is opened and closed via "File -> Quit", the settings are kept.
  • When application is closed via windows close icon, the setting are changed to "false" and the bars are vanished next time I open VirtualBox GUI.

Any news here, any beta available that fixed the problem?

comment:11 Changed 13 months ago by AlW

I can also confirm this problem on Fedora 28 with VirtualBox 5.2.18 (was not present before that update).

I am now running the test build for r19, and the Toolbar and Status bar are behaving normally again, however there is still one remaining small problem - the Toolbar does not remember your selection of Snapshots or Details, and always reverts back to Snapshots.

In addition the problem with building the Guest Additions (in the guest) that arrived along with r18 is also fixed in r19.

comment:12 Changed 12 months ago by kylef

Finally found this bug report. Can confirm as well. Been happening for several months. Running Arch linux here.

comment:13 Changed 12 months ago by Black_Fox

The issue remains present and unchanged on vbox 5.2.20 (on both Fedora 28 and Fedora 29).

comment:14 Changed 11 months ago by Ashark

ArchLinux KDE and VirtualBox 5.2.20: bug still present.

For KDE users: to prevent you from normal window closing and make you use a file-exit workaround (ctrl+q), you may disable close button for virtualbox manager window. To do this press alt+f3 -> choose more actions -> special window settings -> go to appearance & fixes tab -> check Closable -> force -> No. Close button will not be shown after next start of VirtualBox.

comment:15 Changed 11 months ago by vb5135041654640

still present in 5.2.22 on debian sid (qt 5.11)

comment:16 Changed 11 months ago by Volkmar

The problem is very likely a race condition under certain Linux derivates. After closing the VirtualBox window Qt reports the Toolbar and the Statusbar always as hidden when the settings are saved. That's why the are always hidden after closing the window.

If you are able to compile VB on your own you can fix the problem by changing code in the following two files:

  • UISelectorWindow.h
  • UISelectorWindow.cpp

You can find this two files in the source directory under:


This should work for versions 5.2.18 - 5.2.22.

In file UISelectorWindow.h search for (around line 337)

UIToolBar *m_pToolBar;

and replace it with

UIToolBar *m_pToolBar;
bool m_fIsToolBarHidden;
bool m_fIsStatusBarHidden;

In file UISelectorWindow.cpp search for (around line 1235)

case QEvent::WindowDeactivate:
    /* Make sure every status bar hint is cleared when the window lost focus. */

and replace it with

case QEvent::WindowDeactivate:
	  m_fIsToolBarHidden = m_pToolBar->isHidden();  	// remember toolbar state befor saving [VOLKMAR - 2018.11.10]
    m_fIsStatusBarHidden = statusBar()->isHidden(); // remember statusbar state befor saving [VOLKMAR - 2018.11.10]
    /* Make sure every status bar hint is cleared when the window lost focus. */

Next search for (around line 2160)

/* Save toolbar and statusbar visibility: */
    gEDataManager->setSelectorWindowToolBarTextVisible(m_pToolBar->toolButtonStyle() == Qt::ToolButtonTextUnderIcon);

and replace it with

/* Save toolbar and statusbar visibility: */
    // gEDataManager->setSelectorWindowToolBarVisible(!m_pToolBar->isHidden());		[VOLKMAR 2018.11.10]
    gEDataManager->setSelectorWindowToolBarVisible(!m_fIsToolBarHidden);  	//  	[VOLKMAR 2018.11.10]
    gEDataManager->setSelectorWindowToolBarTextVisible(m_pToolBar->toolButtonStyle() == Qt::ToolButtonTextUnderIcon);
    // gEDataManager->setSelectorWindowStatusBarVisible(!statusBar()->isHidden()); [VOLKMAR 2018.11.10]
    gEDataManager->setSelectorWindowStatusBarVisible(!m_fIsStatusBarHidden);		// [VOLKMAR 2018.11.10]

Finally compile and run[[BR]]

If compiled with --disable-hardening you will find a file
in the directory .../out/.../bin/
Simply run this file from the command line and see if your modifications work.


This information is given without any warranty. The recommended changes are not thoroughly tested. Changing the code may break your system! I don't take any responsibility!

comment:17 Changed 11 months ago by gombara

The fix for this (r126668) will be available in next test release.

comment:18 Changed 11 months ago by gombara

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use