MEGAsync
MEGAsync copied to clipboard
megasync 4.0.2 linux doesn't follow qt5ct settings
Hello,
launching from command line gives "Error unsetting QT_QPA_PLATFORMTHEME vble", and the theme always falls back to default qt style. If I run megasync --style=gtk2, it is more or less working, but dark themes have issues.
Thanks.
Hi @daddy33 , thanks for posting that here.
We try to disable QT_QPA_PLATFORMTHEME variable to prevent some Qt crashes when opening some general Qt dialogs.
You can however set this variable before starting megasync (ensure it's closed before): DO_NOT_UNSET_QT_QPA_PLATFORMTHEME
. This will cease trying to unset QT_QPA_PLATFORMTHEME
.
Also, setting DO_NOT_SET_DESKTOP_SETTINGS_UNAWARE
will prevent megasync from calling QApplication::setDesktopSettingsAware(false);
. This might improve its look & feel when having dark themes.
In order to do all that, you can launch megasync with
DO_NOT_UNSET_QT_QPA_PLATFORMTHEME=1 DO_NOT_SET_DESKTOP_SETTINGS_UNAWARE=1 megasync
In any case, we might be able to improve you experience if you tell us what's your OS, desktop environment, theme settings, what do you refer with dark themes have issues
? Also some screenshots illustrating your issues will be appreciated.
Hi, I use "obsidian-2" gtk theme. This is a dark theme and it was rendering fine with megasync 3.7. Now if I start as you suggested : DO_NOT_UNSET_QT_QPA_PLATFORMTHEME=1 DO_NOT_SET_DESKTOP_SETTINGS_UNAWARE=1 megasync,
I get this:
DO_NOT_UNSET_QT_QPA_PLATFORMTHEME=1 DO_NOT_SET_DESKTOP_SETTINGS_UNAWARE=1 megasync
it also fixes missing tray icon for me
I think I'm having the same issue on Fedora 29. MegaSync is not using the system theme. Didn't have the issue before 4.0.2.
MegaSync Upload
Regular file browser
I noticed the following. If I use kvantum style (megasync --style=kvantum), then I have the same problem with dark themes (background of the application window remains light). But if I tweak the kvantum style with kvantum manager by ticking in the "Compositing & General look" tab the "Translucent windows" option, then I have the expected result!
Still not working. That might sound a bit stupid but that's one of the reasons why I cancelled my pro plan a few months ago...
Running this fixes the issue for me:
QT_SCALE_FACTOR=1 megasync
I can confirm that you need both settings
DO_NOT_UNSET_QT_QPA_PLATFORMTHEME=1 DO_NOT_SET_DESKTOP_SETTINGS_UNAWARE=1
in order to have megasync follow my own special Qt theme through qt5ct. Setting only DO_NOT_UNSET_QT_QPA_PLATFORMTHEME is not enough.
If I start it with
DO_NOT_UNSET_QT_QPA_PLATFORMTHEME=1 DO_NOT_SET_DESKTOP_SETTINGS_UNAWARE=1 QT_SCALE_FACTOR=1 megasync &
then I see
Not setting scale factors. Using predefined QT_SCALE_FACTOR= 1
and the dialogs are indeed too small. So QT_SCALE_FACTOR is unrelated to the theme, it corrects only the scaling, as the name suggests. So for me the solution is to run megasync as follows:
DO_NOT_UNSET_QT_QPA_PLATFORMTHEME=1 DO_NOT_SET_DESKTOP_SETTINGS_UNAWARE=1 megasync &
For the developers: maybe you can insert some check like "if you are in Linux and if there is a qt5ct theme active, then behave as if DO_NOT_UNSET_QT_QPA_PLATFORMTHEME=1 DO_NOT_SET_DESKTOP_SETTINGS_UNAWARE=1".
Here is some system information for my above comment:
Portage 2.3.99 (python 3.7.7-final-0, default/linux/amd64/17.0/hardened, gcc-9.3.0, glibc-2.30-r8, 4.19.81-gentoo x86_64)
System uname: Linux-4.19.81-gentoo-x86_64-Intel-R-_Core-TM-i7-6700HQ_CPU@_2.60GHz-with-gentoo-2.6
sh bash 5.0_p17 ld GNU ld (Gentoo 2.33.1 p2) 2.33.1 app-shells/bash: 5.0_p17::gentoo dev-java/java-config: 2.2.0-r4::gentoo dev-lang/perl: 5.30.1::gentoo dev-lang/python: 2.7.18::gentoo, 3.6.10-r2::gentoo, 3.7.7-r2::gentoo, 3.8.2-r2::gentoo dev-util/cmake: 3.16.5::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/openrc: 0.42.1::gentoo sys-apps/sandbox: 2.13::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.11.6-r3::gentoo, 1.12.6::gentoo, 1.13.4-r2::gentoo, 1.14.1::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo sys-devel/binutils: 2.33.1-r1::gentoo sys-devel/gcc: 7.3.0-r3::gentoo, 7.4.0-r2::gentoo, 7.5.0::gentoo, 8.3.0-r1::gentoo, 9.2.0-r2::gentoo, 9.3.0::gentoo sys-devel/gcc-config: 2.2.1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.30-r8::gentoo
Note for anybody using Gentoo (Note for the developers: you can use this info to install megasync on a Gentoo system and test it ;-) This will also give you the environment where this issue manifests itself):
How to install megasync 4.3.7.0 on Gentoo
I used the ebuild from
https://data.gpo.zugaina.org/4nykey/net-misc/megasync/ https://data.gpo.zugaina.org/4nykey/net-misc/meganz-sdk/ https://data.gpo.zugaina.org/4nykey/dev-libs/breakpad/
(all three needed for megasync). I copied the
net-misc/megasync/ net-misc/meganz-sdk/ dev-libs/breakpad/
from above to a local overlay of mine and merged the ebuilds from there.
NOTE: If you do it this way, i.e. without adding the whole 4nykey overlay to your local overlays through layman, you must add the file
https://github.com/4nykey/4nykey/blob/master/profiles/thirdpartymirrors
to the profiles directory of your local overlay. Otherwise, portage will not find the mirrors and the right sources. See https://github.com/4nykey/4nykey/issues/14 .
Now you should be able to reproduce the above. :-)
~I have tried every command in this thread but none worked for me, is there any other solution that I'm missing?~
Apparently, megasync --style=qt5
worked perfectly for me :)
~~tried everything in this issue, core dump segfault in ubuntu 21.04~~
issue was unrelated and got solved.
I just purchased a 16TB Megasync account and my only complaint is that it doesn't respect the theme. With a dark theme enabled the client looks very bad and is difficult to use. See:
I use Arch (TROMjaro) + XFCE (desktop env) + the Vimix theme.
Would be great if you allowed the client to use the default system theme. I really struggle to use it. Thanks!
Error unsetting QT_QPA_PLATFORMTHEME vble fish: 'megasync' terminated by signal SIGSEGV
At Linux Mint LMDE 5 (based on Debian 11).
for me, the solution was to remove this qt plugin for deepin that was unrelated.
sudo apt remove qt5dxcb-plugin
MEGA's excellent support found the solution as I worked with them sending gdb traces.
hope it helps someone.