You are not logged in.

#1 2015-10-23 00:51:58

d125q
Member
From: Europe/Berlin
Registered: 2015-01-01
Posts: 13

Mathematica's GUI menus look bad

Several days ago, I installed Mathematica and noticed that its menus in the GUI look real bad.

B8WOEgi.png

I have followed the Uniform look for Qt and GTK applications wiki page, and all other Qt apps look well.  I have also set Mathematica's "XDefaultApplicationStyle" option to "GTK+" instead of the default "plastique" (the option does work because changing it, e.g. to "windows", yields a different GUI style albeit one that also looks bad).  Has anyone else experienced this issue?  Any suggestions regarding how to solve it?

EDIT: A side-by-side comparison with a Qt app that looks nicely can be seen here.

Last edited by d125q (2015-10-23 12:30:36)

Offline

#2 2015-10-23 10:38:24

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 354

Re: Mathematica's GUI menus look bad

Are you sure that Mathematica is using Qt?
I was looking at my copy and I don't see anything about it being written in Qt.


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#3 2015-10-23 11:12:55

d125q
Member
From: Europe/Berlin
Registered: 2015-01-01
Posts: 13

Re: Mathematica's GUI menus look bad

Pretty sure it does (from the System Requirements page):

Mathematica supports an X Window System front end, and since Version 7 has used the Qt application framework for its user interface—the same used by the major Linux desktop environment KDE.

Offline

#4 2015-10-23 11:51:49

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Mathematica's GUI menus look bad

I believe it is statically linked - there are virtually no dependencies, qt is certainly not listed.  So either the PKGBUILD is horribly lacking, or it is statically linked to all the libs it needs.

If it is statically linked to it's own qt, then your qt settings are irrelevant.  It may look somewhere else for configuration information, or you may be out of luck.

Or best case, it might just be linked against and older version of qt, and it'd pick up the configs if they were appropriate for that older version.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2015-10-23 12:14:39

d125q
Member
From: Europe/Berlin
Registered: 2015-01-01
Posts: 13

Re: Mathematica's GUI menus look bad

Trilby, what you're saying is very interesting.  Could you point me to some directions as to how I might research further into the issue?  I do not see anything fundamentally wrong with the PKGBUILD, as what it does is more or less a simple run of the installer provided by Wolfram.

Offline

#6 2015-10-23 13:45:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Mathematica's GUI menus look bad

I didn't say there was anything wrong with it.  I said *either* the PKGBUILD was flawed, *or* the provided binary is statically linked as qt is not listed as a dependency.  I suspect the latter, but as I have not purchased Mathematica, I have no way to confirm.  You could confirm by running ldd on the binary, or by removing qt (and or installing Mathematica on a machine that does not have qt) and see if Mathematica still runs.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2015-10-23 13:53:48

d125q
Member
From: Europe/Berlin
Registered: 2015-01-01
Posts: 13

Re: Mathematica's GUI menus look bad

Indeed; I was merely trying to eliminate the possibility of the PKGBUILD being flawed.  Anyhow, running ldd on /usr/bin/mathematica gives a "not a dynamic executable" output, so your were correct.  I suppose that I am out of luck, after all.

Last edited by d125q (2015-10-23 13:54:11)

Offline

#8 2015-12-07 13:44:23

donbex
Member
Registered: 2010-12-23
Posts: 53

Re: Mathematica's GUI menus look bad

I don't understand why you say that your Mathematica's GUI looks really bad. Sure, there's a bit of colour mismatch and the font is rather small, but I would just call that mildly annoying... this is what really bad looks like. I can't think of anything worse than black text on a dark background. tongue

Anyway, ldd doesn't work on /usr/bin/mathematica because it is just a wrapper shell script. Sadly, even running it on the actual executable isn't useful

$ldd /opt/Mathematica/SystemFiles/FrontEnd/Binaries/Linux-x86-64/Mathematica
	linux-vdso.so.1 (0x00007ffc7bd9d000)
	libML64i4.so => not found
	libMesaGL.so.1 => not found
	libMesaGLU.so.1 => not found
	libportaudio.so.2 => /usr/lib/libportaudio.so.2 (0x00007f9c612ea000)
	libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00007f9c610dd000)
	libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00007f9c60ec7000)
	libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00007f9c60c7c000)
	libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f9c60a18000)
	libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007f9c606e9000)
	libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f9c60497000)
	libffi.so.6 => /usr/lib/libffi.so.6 (0x00007f9c6028e000)
	libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f9c5ffe3000)
	libXmu.so.6 => /usr/lib/libXmu.so.6 (0x00007f9c5fdc8000)
	libz.so.1 => /usr/lib/libz.so.1 (0x00007f9c5fbb2000)
	libGLU.so.1 => /usr/lib/libGLU.so.1 (0x00007f9c5f931000)
	libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f9c5f5fd000)
	libSM.so.6 => /usr/lib/libSM.so.6 (0x00007f9c5f3f5000)
	libICE.so.6 => /usr/lib/libICE.so.6 (0x00007f9c5f1d8000)
	libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f9c5efce000)
	libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00007f9c5edc3000)
	libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x0000003937200000)
	libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00007f9c5ebb8000)
	libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f9c5e979000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f9c5e6bb000)
	libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f9c5e4a9000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f9c5e167000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f9c5df4a000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f9c5dd46000)
	libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007f9c5db44000)
	libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f9c5d836000)
	librt.so.1 => /usr/lib/librt.so.1 (0x00007f9c5d62e000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007f9c5d330000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f9c5cfae000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f9c5cc0a000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f9c5c9f4000)
	libasound.so.2 => /usr/lib/libasound.so.2 (0x00007f9c5c6ed000)
	libjack.so.0 => /usr/lib/libjack.so.0 (0x00007f9c5c4cd000)
	libthai.so.0 => /usr/lib/libthai.so.0 (0x00007f9c5c2c4000)
	libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007f9c5c099000)
	libEGL.so.1 => /usr/lib/libEGL.so.1 (0x00007f9c5be94000)
	libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f9c5bc5f000)
	libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x00007f9c5ba5b000)
	libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007f9c5b851000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f9c5b62e000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f9c61519000)
	libXt.so.6 => /usr/lib/libXt.so.6 (0x00007f9c5b3c5000)
	libnvidia-tls.so.358.16 => /usr/lib/libnvidia-tls.so.358.16 (0x00007f9c5b1c1000)
	libnvidia-glcore.so.358.16 => /usr/lib/libnvidia-glcore.so.358.16 (0x00007f9c59560000)
	libuuid.so.1 => /usr/lib/libuuid.so.1 (0x00007f9c5935b000)
	libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f9c59131000)
	libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f9c58f21000)
	libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f9c58cb1000)
	libdb-5.3.so => /usr/lib/libdb-5.3.so (0x00007f9c588f1000)
	libdatrie.so.1 => /usr/lib/libdatrie.so.1 (0x00007f9c586e9000)
	libGLdispatch.so.0 => /usr/lib/libGLdispatch.so.0 (0x00007f9c58451000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f9c5824d000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f9c58047000)

Furthermore, while running namcap on the compiled AUR package throws a lot of errors, none of them is related to QT. By the way, from the "open file" window it looks like Mathematica is indeed using QT.

It might be worth noting that the aforementioned wrapper script sets things up so that the executable takes its libraries from /opt/Mathematica/SystemFiles/Libraries/Linux-x86-64, but even that directory doesn't seem to shed a light on the problem:

$ls -1 /opt/Mathematica/SystemFiles/Libraries/Linux-x86-64       
Mesa
libGLU.so.1
libML32i4.so
libML64i4.so
libMesaGL.so.1
libMesaGLU.so.1
libWolframEngine.so
libWolframRTL.so
libWolframRTL_Minimal.so
libWolframRTL_Static_Minimal.a
libaspell.so.1
libcairo.so
libcairo.so.2
libconcorde.so
libcrypto.so
libcrypto.so.1
libcrypto.so.1.0.0
libespeak.so
libffi.so
libffi.so.6
libffi.so.6.0.1
libfreetype.so
libfreetype.so.6
libgio-2.0.so
libgio-2.0.so.0
libglib-2.0.so
libglib-2.0.so.0
libgmodule-2.0.so
libgmodule-2.0.so.0
libgmp.so.10
libgobject-2.0.so
libgobject-2.0.so.0
libgthread-2.0.so
libgthread-2.0.so.0
libharfbuzz.so
libharfbuzz.so.0
libiomp5.so
libippcc.so.8.2
libippcce9.so.8.2
libippccl9.so.8.2
libippccm7.so.8.2
libippccmx.so.8.2
libippccu8.so.8.2
libippccy8.so.8.2
libippcore.so.8.2
libippcv.so.8.2
libippcve9.so.8.2
libippcvl9.so.8.2
libippcvm7.so.8.2
libippcvmx.so.8.2
libippcvu8.so.8.2
libippcvy8.so.8.2
libippi.so.8.2
libippie9.so.8.2
libippil9.so.8.2
libippim7.so.8.2
libippimx.so.8.2
libippiu8.so.8.2
libippiy8.so.8.2
libipps.so.8.2
libippse9.so.8.2
libippsl9.so.8.2
libippsm7.so.8.2
libippsmx.so.8.2
libippsu8.so.8.2
libippsy8.so.8.2
libippvm.so.8.2
libippvme9.so.8.2
libippvml9.so.8.2
libippvmm7.so.8.2
libippvmmx.so.8.2
libippvmu8.so.8.2
libippvmy8.so.8.2
liblemon.so
libmkl_avx.so
libmkl_avx2.so
libmkl_avx512.so
libmkl_avx512_mic.so
libmkl_core.so
libmkl_def.so
libmkl_intel_ilp64.so
libmkl_intel_thread.so
libmkl_mc.so
libmkl_mc3.so
libmkl_sequential.so
libmkl_vml_avx.so
libmkl_vml_avx2.so
libmkl_vml_avx512.so
libmkl_vml_avx512_mic.so
libmkl_vml_cmpt.so
libmkl_vml_def.so
libmkl_vml_mc.so
libmkl_vml_mc2.so
libmkl_vml_mc3.so
libpango-1.0.so
libpango-1.0.so.0
libpangocairo-1.0.so
libpangocairo-1.0.so.0
libpangoft2-1.0.so
libpangoft2-1.0.so.0
libpangoxft-1.0.so
libpangoxft-1.0.so.0
libpixman-1.so
libpixman-1.so.0
libpng12.so.0
libportaudio.so.2
libsndfile.so.1
libsqlite3.so
libsqlite3.so.0
libssl.so
libssl.so.1
libssl.so.1.0.0
libterm.so
libtutte.so
libuuid.a
libz.so.1

Frankly, I'm stumped. If Mathematica was using its own QT style, ignoring the system configuration, then I figure it should always run with a light background. On the other hand, I tried changing the default themes for GTK+ 2, GTK+ 3, QT 4, and QT 5, but none had any effect whatsoever on Mathematica...

Edit: I managed to solve my problem. Apparently it was caused by QT themes not setting the background colour of windows — I don't know if there's something wrong with my QT or if it is supposed to work this way. A (partial) fix for me was to set a custom window and button background colour in qtconfig-qt4.

Anyway, Mathematica seems to be using a statically linked version of QT (4.7.4 in Mathematica 10.3), but it still uses the system themes. To change the theme go to Preferences -> Advanced -> Open Options Inspector -> Global Options -> PrivateFrontEndOptions, change the value of the "XDefaultApplicationStyle" option, and restart Mathematica (credit here).

Last edited by donbex (2015-12-07 16:22:46)

Offline

#9 2016-01-21 14:14:44

yoyowinwin
Member
From: China
Registered: 2010-07-25
Posts: 9

Re: Mathematica's GUI menus look bad

donbex wrote:

Anyway, Mathematica seems to be using a statically linked version of QT (4.7.4 in Mathematica 10.3), .

Hi, I am just interested. why you said Mathematica 10.3 use QT-4.7.4 ?  would you please let me know your way coming to this theory,  thanks.

Offline

#10 2016-01-22 15:49:52

donbex
Member
Registered: 2010-12-23
Posts: 53

Re: Mathematica's GUI menus look bad

yoyowinwin wrote:
donbex wrote:

Anyway, Mathematica seems to be using a statically linked version of QT (4.7.4 in Mathematica 10.3), .

Hi, I am just interested. why you said Mathematica 10.3 use QT-4.7.4 ?  would you please let me know your way coming to this theory,  thanks.

$strings /opt/Mathematica/SystemFiles/FrontEnd/Binaries/Linux-x86-64/Mathematica | grep -i qt
[...]
qt_prfxpath=/mnt/qt/4.7.4/linux64
[...]

Offline

#11 2016-01-26 12:19:27

yoyowinwin
Member
From: China
Registered: 2010-07-25
Posts: 9

Re: Mathematica's GUI menus look bad

thank you. tongue

donbex wrote:
$strings /opt/Mathematica/SystemFiles/FrontEnd/Binaries/Linux-x86-64/Mathematica | grep -i qt
[...]
qt_prfxpath=/mnt/qt/4.7.4/linux64
[...]

Offline

Board footer

Powered by FluxBB