You are not logged in.

#1 2023-04-19 16:46:44

jones
Member
Registered: 2013-03-14
Posts: 276

Weird GUI style problems with TeXstudio and VLC on XFCE

I have run into 2 weird problems in the last weeks. It is demonstrated in this WEBM/GIF: https://streamable.com/hp3dlj
To the best of my knowledge, I cannot think of anything that I installed or uninstalled that directly caused this.

1 - TeXstudio starts up with the wrong GUI style
TeXstudio seems to have a different GUI style when started

  1. by using a launcher, e.g. albert or XFCE's appfinder: the buttons look slightly different and the whole program GUI is a sea of grey and

  2. double-clicking on a .tex-file: it's the usual/"old" style.

I should note that I already asked about this on TeXstudio's github page (issue 3067) and this does not seem to be connected to or caused by TeXstudio. (But I am happy about the replies regardless). So now I am trying here. I intend to cross-post the solution, if there will be one.


2 - VLC has wrong GUI style when instance is started via a video file
I observed 2 cases:

  1. If I start VLC on its own, i.e. without double-clicking on a mime-related file, everything is ok.

  2. If I start VLC by double-clicking on a mime-related file, e.g. asdf.mp4 or test.mkv, an odd GUI style is applied.

So, some info regarding the case 2 with the odd/wrong GUI style:

  1. The font in the task bar and other GUI elements–e.g. its options windows, the file chooser (CTRL+O) or folder chooser (CTRL+F)–is Open Sans, I think. It should be Liberation Sans.

  2. The file picker GUI is... wrong. It still works, but it is the wrong style and a totally different structure.




Some additional info about the system (I hope it helps):

$ pacman -Q xfwm4
xfwm4 4.18.0-1
$ pacman -Q texstudio
texstudio 4.5.2-1
$ pacman -Q vlc
vlc 3.0.18-8
$ pacman -Q qt5-base
qt5-base 5.15.9+kde+r151-1
$ pacman -Q qt6-base
qt6-base 6.5.0-3

Last edited by jones (2023-04-19 16:49:47)

Offline

#2 2023-04-19 17:53:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,063

Re: Weird GUI style problems with TeXstudio and VLC on XFCE

Looks like in some cases it tries to align to the desktop and use the gtk style.
Compare

tr '\0' '\n' < /proc/$(pidof texstudio)/environ

between the good and the bad instances.

Offline

#3 2023-04-19 18:26:20

jones
Member
Registered: 2013-03-14
Posts: 276

Re: Weird GUI style problems with TeXstudio and VLC on XFCE

Good instance: I ran the command after starting TeXstudio:

$ tr '\0' '\n' < /proc/$(pidof texstudio)/environ
HOME=/home/john
LANG=de_DE.UTF-8
LIBVA_DRIVER_NAME=iHD
LOGNAME=john
MAIL=/var/spool/mail/john
PATH=/usr/local/bin:/usr/bin
SHELL=/bin/bash
SYSTEMD_EXEC_PID=2207
USER=john
XDG_RUNTIME_DIR=/run/user/1000
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DISPLAY=:0
SSH_AUTH_SOCK=/tmp/ssh-XXXXXX7x0tkL/agent.1958
XAUTHLOCALHOSTNAME=
XAUTHORITY=/home/john/.Xauthority
MANAGERPID=1877
INVOCATION_ID=281b36ab14ba475586a1a5459d8d5793
JOURNAL_STREAM=8:24803
GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/texstudio.desktop
GIO_LAUNCHED_DESKTOP_FILE_PID=68213

The command for the bad instance:

$ tr '\0' '\n' < /proc/$(pidof texstudio)/environ
SHELL=/bin/bash
SESSION_MANAGER=local/ArchLinuxT480s:@/tmp/.ICE-unix/1886,unix/ArchLinuxT480s:/tmp/.ICE-unix/1886
XDG_CONFIG_DIRS=/etc/xdg
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_MENU_PREFIX=xfce-
DOTNET_ROOT=/usr/share/dotnet
SSH_AUTH_SOCK=/tmp/ssh-XXXXXX7x0tkL/agent.1958
LIBVA_DRIVER_NAME=iHD
DESKTOP_SESSION=xfce
SSH_AGENT_PID=1959
GTK_MODULES=canberra-gtk-module:canberra-gtk-module
XDG_SEAT=seat0
PWD=/home/john
LOGNAME=john
XDG_SESSION_DESKTOP=xfce
XDG_SESSION_TYPE=x11
XAUTHORITY=/home/john/.Xauthority
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/john
MOTD_SHOWN=pam
HOME=/home/john
LANG=de_DE.UTF-8
XDG_CURRENT_DESKTOP=XFCE
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
DOTNET_BUNDLE_EXTRACT_BASE_DIR=/home/john/.cache/dotnet_bundle_extract
XDG_SESSION_CLASS=user
USER=john
DISPLAY=:0
SHLVL=0
XDG_VTNR=7
XDG_SESSION_ID=2
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
XDG_RUNTIME_DIR=/run/user/1000
DEBUGINFOD_URLS=https://debuginfod.archlinux.org 
XDG_DATA_DIRS=/usr/local/share:/usr/share
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/home/john/.dotnet/tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
GDMSESSION=xfce
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
MAIL=/var/spool/mail/john
_=/usr/bin/texstudio

Last edited by jones (2023-04-19 18:27:12)

Offline

#4 2023-04-19 18:32:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,063

Re: Weird GUI style problems with TeXstudio and VLC on XFCE

GDMSESSION=xfce
XDG_CURRENT_DESKTOP=XFCE

Bad news is that the "good" instance is actually the broken one.

You could export QT_STYLE_OVERRIDE and/or QT_QPA_PLATFORMTHEM, https://wiki.archlinux.org/title/Unifor … plications

But you also should figure why the "good" instance doesn't pick up some of the environment.
How do you start the session?

Offline

#5 2023-04-19 20:34:19

jones
Member
Registered: 2013-03-14
Posts: 276

Re: Weird GUI style problems with TeXstudio and VLC on XFCE

seth wrote:
GDMSESSION=xfce
XDG_CURRENT_DESKTOP=XFCE

Bad news is that the "good" instance is actually the broken one.

Oh. What?? Well there surely must be something wrong with the style then. Or maybe the style, that is actually needed in whatever the right format/standard is, isn't installed yet? I doubt grey on grey mixed with light grey is the proper look.

seth wrote:

You could export QT_STYLE_OVERRIDE and/or QT_QPA_PLATFORMTHEM, https://wiki.archlinux.org/title/Unifor … plications

But you also should figure why the "good" instance doesn't pick up some of the environment.
How do you start the session?

About the session start:
yxykw6Rm.png

Regarding the env variables, I opted to choose the alternativ solution. --> After installing qt5ct, qt6ct, adwaita-qt5 and -qt6, I set it to use Adwaita in the first tab of each "control" program. After restarting TeXstudio, it's still all ...grey. So maybe setting the env variables could work?

Last edited by jones (2023-04-19 20:35:20)

Offline

#6 2023-04-19 20:59:56

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,063

Re: Weird GUI style problems with TeXstudio and VLC on XFCE

Well there surely must be something wrong with the style then.

I think it tries to imitate the xfce/gtk style, likely "gtk2"

About the session start

No, whether you use GDM, lightdm, startx, …

Installing qt*ct w/o making it the QT_QPA_PLATFORMTHEME won't do much.
https://wiki.archlinux.org/title/Qt#Con … KDE_Plasma
(If I understand https://github.com/trialuser02/qt6ct correctly, QT_QPA_PLATFORMTHEME=qt5ct should™ work for Qt6 clients as well)

Try to "export QT_STYLE_OVERRIDE=adwaita" to the session.

Offline

#7 2023-04-19 21:40:34

jones
Member
Registered: 2013-03-14
Posts: 276

Re: Weird GUI style problems with TeXstudio and VLC on XFCE

seth wrote:

I think it tries to imitate the xfce/gtk style, likely "gtk2"

Could be. Your guess has probably more substance to it than my own.

No, whether you use GDM, lightdm, startx, …

Lightdm (+lightdm-gtk-greeter)

But for some reason, I also have

$ cat ~/.xinitrc | grep xfce
exec startxfce4

Why I have done that, I do not recall. Should I remove that line?

Installing qt*ct w/o making it the QT_QPA_PLATFORMTHEME won't do much.
https://wiki.archlinux.org/title/Qt#Con … KDE_Plasma
(If I understand https://github.com/trialuser02/qt6ct correctly, QT_QPA_PLATFORMTHEME=qt5ct should™ work for Qt6 clients as well)

Try to "export QT_STYLE_OVERRIDE=adwaita" to the session.

I did the following (per this wiki article... because I haven't done anything regarding (sourcing) environment variables in approx. 5 years or so), which did not work:

$ geany ~/.xprofile
(...added 2 lines, see following lines..)
$ cat ~/.xprofile 
export QT_QPA_PLATFORMTHEME=qt5ct
export QT_STYLE_OVERRIDE=adwaita
$ source ~/.xprofile

Restarted TeXstudio, still the same issue.

Last edited by jones (2023-04-19 22:14:09)

Offline

#8 2023-04-20 05:53:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,063

Re: Weird GUI style problems with TeXstudio and VLC on XFCE

source ~/.xprofile

This will only export the variables to the current interactive shell (terminal) and has no impact on the session.
You'll at least have to re-login, but the two variables also conflict and qt5ct will complain that it cannot control the style because of the syle override.
Good enough for a test though.

Your xinitrc is irrelevant to lightdm - you can delete that file.

Offline

#9 2023-04-20 10:31:55

jones
Member
Registered: 2013-03-14
Posts: 276

Re: Weird GUI style problems with TeXstudio and VLC on XFCE

Holy moly. If this isn't one cumbersome endeavor...
So, some results regarding Texstudio's startup via launcher:

Setting 1

  • qt*ct installed, style and icon set set to "adwaita".

  • xprofile:

    $ cat ~/.xprofile 
    export QT_QPA_PLATFORMTHEME=qt5ct
    export QT_STYLE_OVERRIDE=adwaita

TXS still has some odd styling for the navigator view on the left.
The save prompt on closing has German text, button labels for the prompt are text only in English.
The file chooser dialog is gtk.


Setting 2

  • qt*ct installed, style and icon set set to "adwaita".

  • xprofile:

    $ cat ~/.xprofile 
    export QT_QPA_PLATFORMTHEME=qt5ct
    # export QT_STYLE_OVERRIDE=adwaita

TXS main windows has proper styling.
The file chooser dialog is gtk.
With launcher startup: the save prompt on closing has German text, button labels for the prompt are text only (in English).
UqXsEQym.png
With startup by double clicking on tex-file: save prompt has German text, icons on buttons and text in English.
sgyMeiEm.png


--> ... first lesson apparently is to comment out the QT_STYLE_OVERRIDE option. smile

Regardless, thank you for your replies, seth, I very much very appreciate them.


edit: Seems like having qt5ct AND/OR qt6ct installed makes a difference as well. For now I will keep both. It already is a minor headache.
I suppose I can test a lot more...

Last edited by jones (2023-04-20 11:37:35)

Offline

#10 2023-04-20 11:37:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,063

Re: Weird GUI style problems with TeXstudio and VLC on XFCE

The environment is only relevant to the calling context (albert, thunar) so you can test by exporting the variables in an interactive shell and starting the file browser or launcher process from there (so it inherits the environment)
When you're not exporting QT_STYLE_OVERRIDE but QT_QPA_PLATFORMTHEME=qt5ct, you can change/have to the style w/ qt5ct

The mixed locales will be because the prompt is provided by the localized application, but the dialog uses the (untranslated) standard elements (buttons)
No idea why, though - eg. zenity is fully translated here.

Offline

Board footer

Powered by FluxBB