How do I make VLC use my desktop's theme?

Got VLC using: snaps, flatpack, .deb and AppImage. And only the .deb installation followed the dark theme of my desktop so far (Yaru-MATE-Dark), why so ? Is there no solution for the other packaging systems ? Is this a persistent problem with QT apps in general? In particular Why even the AppImage can't be made aware of the system's theme !?

2 Likes

.deb files are what you expect it to be: Straight up installer files.
After installation, the app is part of the filesystem and can read and interpret the GUI settingsfiles and such if needed.

snap, flatpack and appimage are isolated from the filesystem and therefore can't see it or use it (just like apps in a virtual machine can't see the host) that also means that they can't see the GUI configurationfiles.

Let's take snap for instance:
A snap is an app packaged as a mini live-distro-image (without the kernel and with only the binaries that are needed).
This image gets mounted read-only but is prohibited access to the rest of the filesystem. Everything that it needs is in the image (except for the kernel).
This is for security reasons, just like people used to 'jail' or 'sandbox' their apps.

It is very attractive to have a self contained application image that can't be infected by malware (because read-only) and can't infect the host system (because it can't see the filesystem of the host)

The drawback is ofcourse that it also can't reach the theme files and settings and altough it brought its own graphic libraries, setting and theme files, you can be pretty sure that the chance is very small that it will match your selected theme on the host.

This is the same problem for flatpak and appimage because they work more or less the same.

This is a persistent problem with all apps (regardless the used graphical libraries).

Now there is this: by way of some complex trickery with extra mountable graphical library images, some restricted theming is made possible but to be honest it is a dirty hack and it only works on some snaps.
Mostly it works on GTK because that is what is partly supported to be themed by this hack.
I have not yet seen a Qt version of this hack

(P.S. what I wrote is not 100% correct in detail, but this is the shortest and clearest way to get the basic principles across)

6 Likes

Thanks for your reply,

This is a pretty clear reply.

So Everyone have this problem with VLC right ? Celluloid is the video player for Ubuntu MATE?

2 Likes

Yes.
(Not me, but that is because I only use the .deb version of VLC and only on my mediacenter and only for DVD/CD playback.
I use MPV for everything else.)

Yes, Celluloid is nothing more than a wrapper around MPV.
( Just like SMplayer was a wrapper around mplayer.)

MPV is pretty much superior (faster, lighter, better hardware acceleration, more flexible, more i/o hardware support, easier to send to 2nd screen) to VLC in every aspect except DVD/CD playback.

It's up to you wether you want to run Celluloid or MPV.
(I prefer MPV because it is already graphical enough for me and I have in my weird usage certain edgecases where the Celluloid wrapper gets in the way, but for you it can be totally different. )

3 Likes

Thanks. I am doing some gui development for a Python app using python-mpv so I'm aware of that. Although about the situation of SMplayer and mplayer I'm not much educated, I have SMP but it seemed to me outdated or something, keeping it for possible use case.

However I notice that the VLC .deb package seems somewhat inferior in performance or something compared to the other releases. They state something about that on their (VLC's) site, and I find it to be the case. While the snaps release takes time to launch, it performs better afterwards.
Do you find it the same ?

2 Likes

That's cool :+1: Mind if I check it out ?

I would not know, i hardly use it, and the heaviest (and only) lifting it has to do here is DVD (576i @ 25fps). Not really a heavy task :slight_smile:

Like I said, I use MPV for everything else :slight_smile:

b.t.w. Since you are writing software anyway. Are you by chance interested in a small bash tool I wrote to generate mpv.config files ?
It's not much and not very pretty (I wrote it purely for myself) but it might come in handy (see below)

3 Likes

I have to tell you: I'm still newbie and reliant on AI to produce snippets. Also short on resources and in fact I don't know how to use git, so I can only share link to the source code files: google-drive link, until the app reaches a state where I can share it with others and upload it to Github. I'm not sure if there is a difference between the two versions, just download either and run the josuke.py file with Python.

Yes! Yes! Yes! That's a TUI tool ? I rarely add options to the mpv config file cuz I feel lazy to google them, or learn about its' customization. This sounds like it will be handy

3 Likes

Yes :slight_smile:

I upped it to wetransfer, you can get it through this url:

It will be available to download for about 3 days :slight_smile:

If you extract it in, for instance, "$HOME/" , the script will then be "$HOME/mpvconfig/mpvconf". The generated configfile wil be written to "$HOME/.config/mpv/mpv.conf" where mpv expects it to be.

I warn you, it is still a bit rough around the edges :wink:

EDIT: I forgot to mention that you have to edit the "mpvconf.conf" file for the right paths, depending where you unpacked it:
These are the paths you need if you put the resulting folder directly in your home directory:

#----directories--------
mpvcfgdir="$HOME/.config/mpv"
mainfolder="$HOME/mpvconfig"
scripts="$mainfolder/scripts"
input="$mpvcfgdir/input.conf"
keys="$scripts/mpv-keys"
allkeys="$scripts/mpv-keys-full"
mpvcfg="$mpvcfgdir/mpv.conf"
editor="pluma"
filemanager="caja"
3 Likes

Looks promising ! Sugoi ! :slight_smile:
I also saw your "example.py" which immediately reminded me about writing a bash-wrapper for 'yt-dlp' but a python wrapper would be better ( and I'm absolutely terrible in python).

2 Likes

I'm surprised you didn't share it before. That's so well written (even the AI assistant is saying this). Thanks, I'll eventually start studying it. For now I'll take it as granted for free and use it. Surprised you can randomly write stuff like that by yourself for hobby.

3 Likes

Bash comes easy to me, and I'm also used to program in C
Thank you very much for your praise.
I really hope it is of some use for you :slight_smile:

3 Likes