Hello,
While running VirtualBox 6.0 installed from official repository on Ubuntu 18.04 with Xfce desktop, the scaling of UI elements (menu, buttons, status bar, etc.) is too large and some dialogs are almost unusable. Setting Qt scaling factor to 1 (QT_SCALE_FACTOR=1) doesn't help, also after setting QT_SCALE_FACTOR to 0.5 the fonts are too small.
The screen resolution is 1366x768, DPI setting is set to 96 in Xfce settings, other programs appear normally. Btw the monitor is Samsung UE19ES4000 (oled tv), connected via hdmi cable.
Screenshots below
Edit: it appears setting QT_AUTO_SCREEN_SCALE_FACTOR to 0 fixes this problem, as it is apparently not virtualbox but qt5 bug. Also I'm using qt5ct so setting QT_QPA_PLATFORMTHEME to qt5ct is needed for it to work.
Edit2: For xubuntu session, the variables are defined in /etc/X11/Xsession.d/56xubuntu-session, I modified it to set the env. variable permanently while running this session by adding export QT_AUTO_SCREEN_SCALE_FACTOR=0 to it.
[Solved, qt5 bug] VirtualBox 6.0 UI element scaling is too large while running on Ubuntu with Xfce
-
juozas
- Posts: 4
- Joined: 31. Jan 2020, 15:00
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Linux,Windows,Dos
- Location: Lithuania
- Contact:
[Solved, qt5 bug] VirtualBox 6.0 UI element scaling is too large while running on Ubuntu with Xfce
- Attachments
-
- Adding export QT_AUTO_SCREEN_SCALE_FACTOR=0 to /etc/X11/Xsession.d/56xubuntu-session fixes this
- Oracle VM VirtualBox Tvarkytuvė 2020-02-03 16_08_10.png (76.87 KiB) Viewed 2663 times
-
- Virtualbox Window, elements too large
- Darbalaukis 2020-01-31 14_53_33.png (121.14 KiB) Viewed 2724 times
Last edited by juozas on 4. Feb 2020, 07:09, edited 4 times in total.
Сделано в СССР
-
scottgus1
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: VirtualBox 6.0 UI element scaling is too large while running on Ubuntu with Xfce
Regrettably, the official repositories are forks of Virtualbox, with possible changes introduced, so the Virtualbox forums don't support the Linux distro repositories' copies of Virtualbox. You would need to uninstall the repository version and get the official version from https://www.virtualbox.org/wiki/Linux_Downloads, then we could help.juozas wrote:VirtualBox 6.0 installed from official repository on Ubuntu
That said, you can try an experiment: Reboot your host so no Virtualbox guests, windows, or processes are running. Find the folder /home/{username}/.config/VirtualBox, check to see that there is a file inside called Virtualbox.xml. If so, move the whole 'Virtualbox' folder to your desktop. This folder contains all File menu Preferences settings and the guest list. Moving the folder will temporarily reset Virtualbox. Don't worry, all your guests and settings will still be available.
Start Virtualbox. The main Virtualbox window will appear with an empty guest list. Is the font size good again? If so, then there is a spurious setting in the old Virtualbox.xml that is causing the graphics glitch in your present Virtualbox. Zip and post the Virtualbox.xml from the Virtualbox folder on your desktop, and the Virtualbox.xml found in the newly-generated /home/{username}/.config/VirtualBox folder. Note in the name which is which. We'll see if we can find what the problem is.
After the experiment, reboot your host again, delete the new /home/{username}/.config/VirtualBox folder, and move the desktop Vitualbox folder back to /home/{username}/.config. This will restore your whole setup with Preferences and your guest list, and the font glitch.
-
juozas
- Posts: 4
- Joined: 31. Jan 2020, 15:00
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Linux,Windows,Dos
- Location: Lithuania
- Contact:
Re: VirtualBox 6.0 UI element scaling is too large while running on Ubuntu with Xfce
I don't use third party virtualbox build or fork. I use official build. What I mean "oficial repository" I meen the repository provided by the virtualbox developers from the repository pointing to this particular domain where forum is also hosted. The build is installed from repository the that were added to sources.list as below:scottgus1 wrote:Regrettably, the official repositories are forks of Virtualbox, with possible changes introduced, so the Virtualbox forums don't support the Linux distro repositories' copies of Virtualbox. You would need to uninstall the repository version and get the official version from https://www.virtualbox.org/wiki/Linux_Downloads, then we could help.juozas wrote:VirtualBox 6.0 installed from official repository on Ubuntu
Code: Select all
deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contribCode: Select all
juozas@xubuntu:~$ LANG=C apt-cache policy virtualbox-6.1
virtualbox-6.1:
Installed: 6.1.2-135662~Ubuntu~bionic
Candidate: 6.1.2-135662~Ubuntu~bionic
Version table:
*** 6.1.2-135662~Ubuntu~bionic 500
500 https://download.virtualbox.org/virtualbox/debian bionic/contrib amd64 Packages
100 /var/lib/dpkg/statusСделано в СССР
-
scottgus1
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: [Solved, qt5 bug] VirtualBox 6.0 UI element scaling is too large while running on Ubuntu with Xf
Ah, OK, I understand now. "official repository on Ubuntu" sort of sounds to me like, 'Ubuntu's official repository', not 'Virtualbox's official repository'.juozas wrote:What I mean "oficial repository" I meen the repository provided by the virtualbox developers
I see that in your first post you found a solution. Where does "QT_AUTO_SCREEN_SCALE_FACTOR = 0" get entered?
-
juozas
- Posts: 4
- Joined: 31. Jan 2020, 15:00
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Linux,Windows,Dos
- Location: Lithuania
- Contact:
Re: [Solved, qt5 bug] VirtualBox 6.0 UI element scaling is too large while running on Ubuntu with Xf
I modified /etc/X11/Xsession.d/56xubuntu-session while using root (super-user) account (e.g by using program named sudo, which runs programs as root as long you're in group named sudo) to permanently add the environment variable to the system for xfce (xubuntu session). Also you can test this by running VirtualBox while in terminal and adding the variable right before VirtualBox command. Or you can edit .desktop file and add env and the variable before command line for VirtualBox or include it while running from quick launcher (Alt+F2). E.g. add this as shown below:
If running while in terminal emulator, or
If running from elsewhere, e.g. using a .desktop file or a quick laucher (Alt+F2)
To set variable permanentlly for xfce (xubuntu session), add to /etc/X11/Xsession.d/56xubuntu-session inside block beginning with Edit: The contents of /etc/X11/Xsession.d/56xubuntu-session are as follows, notice I commented out line with export QT_QPA_PLATFORMTHEME=gtk2 and added export QT_QPA_PLATFORMTHEME=qt5ct as qt5ct program is installed and is used to configure QT5 settings for local user. It wouldn't work w/o such modification and would even exit with error on older versions.
Code: Select all
QT_AUTO_SCREEN_SCALE_FACTOR=0 VirtualBoxCode: Select all
env QT_AUTO_SCREEN_SCALE_FACTOR=0 VirtualBoxTo set variable permanentlly for xfce (xubuntu session), add
Code: Select all
export QT_AUTO_SCREEN_SCALE_FACTOR=0Code: Select all
if [ "$DESKTOP_SESSION" = xubuntu ]; thenCode: Select all
# Set default environment vars in Xubuntu
if [ "$DESKTOP_SESSION" = xubuntu ]; then
# Disable GTK 3.16 overlay scrollbars
export GTK_OVERLAY_SCROLLING=0
# QT5 apps to use GTK style (disabled)
#export QT_QPA_PLATFORMTHEME=gtk2
# Use qt5ct for QT5 Apps
export QT_QPA_PLATFORMTHEME=qt5ct
# Fix wrong scaling of QT5 Apps
export QT_AUTO_SCREEN_SCALE_FACTOR=0
# Workaround clutter issue (LP: #1462445)
export CLUTTER_BACKEND=x11
fiСделано в СССР
-
scottgus1
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: [Solved, qt5 bug] VirtualBox 6.0 UI element scaling is too large while running on Ubuntu with Xf
Thanks for that information, Juozas!
Re: [Solved, qt5 bug] VirtualBox 6.0 UI element scaling is too large while running on Ubuntu with Xf
Thank you so much Juozas! This has been a problem I've had for ages on numerous distros using xfce!