This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to change default GTK/QT colorscheme for Root Mode apps?

Tags: None
(comma "," separated)
boris
Registered Member
Posts
2
Karma
0
If someone (like me) is not very familiar with kde config files and their locations, a bit more implicit configuration approach may be useful.
I am not very experienced in such manipulations so it would be great if if someone more qualified would criticize.

Even though running gui apps as root is a bad practice, running, say, '$ sudo -u sandbox firefox' may be useful, imho.
1. Try to login normally with your secondary user via your default display manager (sddm, lightdm, etc). At sddm login screen i`ve choosen 'sandbox' and logged in. When desktop appears - all necessary configuration files should take their place. (At this step u may open "systemsettings5" and alter the default configuration).
2. Edit .bashrc for your secondary user (/home/sandbox/.bashrc in my case) and put this variables into it (double-check if u have different id`s / locations!):
Code: Select all
export DESKTOP_SESSION=/usr/share/xsessions/plasma
export DISPLAY=:0
export GS_LIB=$HOME/.fonts
export GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:$HOME/.gtkrc-2.0:$HOME/.config/gtkrc-2.0
export GTK_RC_FILES=/etc/gtk/gtkrc:$HOME/.gtkrc:$HOME/.config/gtkrc
export KDE_SESSION_UID=777
export KDE_SESSION_VERSION=5
export LANG=ru_RU.UTF-8
export LANGUAGE=ru
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
export QT_ACCESSIBILITY=1
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export XCURSOR_SIZE=0
export XCURSOR_THEME=Adwaita
export XDG_CURRENT_DESKTOP=KDE
export XDG_DATA_DIRS=/usr/share:/usr/share:/usr/local/share
export XDG_SESSION_CLASS=user
export XDG_SESSION_DESKTOP=KDE
export XDG_SESSION_TYPE=x11
export XDG_VTNR=7

3. Run "$ xhost +SI:localuser:sandbox" to allow your second user connect to X-display. This setting is not persistent so add this line somewhere to be run automatically on boot.

Now login with your ordinal everyday-use user and try to execute:
Code: Select all
$ sudo -i -u sandbox
$ sandbox@pc:~$ systemsettings5

and u should have neat window style.

The realization is very clumsy but i think the main idea is good enough in general.
P.S. I`m on debian 10 and plasma 5.14.5


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]