Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Make QT apps (look) great again (Read 1443 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Make QT apps (look) great again

I've been running Cinnamon on my desktop, but lately I switched to LXQT and replaced some applications with their QT variants, nemo got replacet with pcmanfm-qt. Sometimes I need to run a GUI applications with sudo. GTK applications don't have any issues, but QT ones look awful with default widget styling and missing icons allover the place. So for example when i sudo pcmanfm-qt I get:
Code: [Select]
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
isPrimaryInstance
Therefore I tweak /etc/sudoers to have:
Code: [Select]
Defaults env_keep += "HOME XDG_RUNTIME_DIR"
The difference is that now when trying to sudo pcmanfm-qt I get:
Code: [Select]
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
isPrimaryInstance
and the application interface still looks ugly. I actually tried the LXQT LiveCD and it has the same issue. I also tried my search-fu to get some answers but all trails lead nowhere. Is this issue fixable?

Re: Make QT apps (look) great again

Reply #1
pkexec is recommended for GUI use, not sudo. It might not help with this though. Perhaps using pkexec or even sudo su and putting some .config files from ~/ in /root might help. If I have alias ls='ls --color=auto' in /root/.bashrc it uses color with sudo su ... ls but not for sudo ls, apparently this is something intentional in sudo's design.

Re: Make QT apps (look) great again

Reply #2
sudo was more of a figure of speech than the tool itself. It is lxqt-sudo that does the job actually, but it doesn't matter. What matters is that elevated QT apps look ugly, don't know why. Another thing - installed enlightenment, ran pcmanfm-qt inside its session and the same thing happens - the app looks ugly. Can't remember the exact error message, but it was different than those from first post. I suspect it may have something to do with some environment/session vars not being set, but can't tell if and which.

 

Re: Make QT apps (look) great again

Reply #3
Dunno if this should be the recommended way to fix this, but what helped in my case was to edit /etc/sudoers and add:
Code: [Select]
Defaults env_keep += "HOME XDG_CURRENT_DESKTOP"