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

Unified KDE look for user and root applications

Tags: None
(comma "," separated)
Wizzard
Registered Member
Posts
35
Karma
0
OS
Hello. Is there any simple way how to achieve the same look for the root running applications with the user look and feel settings? For example, when I start Krusader with root privilegies, it looks very different from my look and feel settings (too big fonts, too much desktop effects, etc.).

(except setting root home directory to my home directory :))


KDE Slovak translation team translator and coordinator
User avatar
google01103
Manager
Posts
6668
Karma
25
if you run systemsettings as root and change the application appearance options to that of the user the appearance should be the same. You might also copy the kdeglobals file to root (never did this so you should look to make sure no complications will arise)

though you can do this I don't think it's a good idea as you might forget which user each app is for, I changed both the color and fonts for root to something easily distinguishable (my root colors are ugly)


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I suspect you will need to configure the root account (likely by logging in as root) to be similar in appearance and behaviour to your main account. Ideally KDE applications should not need to be launched as root, and when done so should be done properly (through kdesu or kdesudo, not using a normal "su" or "sudo" as these may break the permissions of configuration files).


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
greatperson
Registered Member
Posts
75
Karma
0
OS
Unfortunately, KWin's decorations always use current (non-root) user preferences, so «KWin+Qt» unified themes don't look unified.

Image

I've looked into KWin sources. It seems to use standard QApplication::palette() to get color palette to use. Is it possible to load root's palette for root's applications instead? Or, is it forbidden by file permissions policy? :-(
Wizzard
Registered Member
Posts
35
Karma
0
OS
Well, I did it by setting my root home directory to /home/wizzard and it looks better, but not exactly like my apps. Maybe it is not a very good idea, but it was the simplest way. I also did it like you said a few years before, setting my KDE look for root separately, but it is annoying to set it again when I change something in my look settings.

And of course, I do not need to run the apps under root usually, just from time to time it is convenient to run Krusader as root to simple make some system changes, and especially to edit sources.list and similar system files.


KDE Slovak translation team translator and coordinator
User avatar
google01103
Manager
Posts
6668
Karma
25
Wizzard - this sounds like a very bad idea, instead link user's kdeglobals to root's (which still may not be a great idea but a much a much better on then you're contemplating). If you want the same kwin rules then also link the winrc file

Code: Select all
ln -s ~/.kde/share/config/kdeglobals /root/.kde/share/config/kdeglobals
ln -s ~/.kde/share/config/kwinrc /root/.kde/share/config/kwinrc


OpenSuse Leap 42.1 x64, Plasma 5.x

Wizzard
Registered Member
Posts
35
Karma
0
OS
Well, using that link it does not work. I even created a link to whole .kde directory and also .kderc, but with no effect.

Even the link from /.kde did not solve this problem.

Last edited by Wizzard on Fri Jun 22, 2012 2:11 pm, edited 1 time in total.


KDE Slovak translation team translator and coordinator
User avatar
google01103
Manager
Posts
6668
Karma
25
.kderc is dimension of dialogs you were talking ~/.kderc, diff file

if you ls -l the files/folders you created as links do they show as being links?

1) you need to run the ln command as root as it's a root file you are creating
2) the link name being created cannot already exist if it does you must use the --force option


OpenSuse Leap 42.1 x64, Plasma 5.x

Wizzard
Registered Member
Posts
35
Karma
0
OS
The link is created properly.

Code: Select all
sudo ls -l /root/.kde
Password:
lrwxrwxrwx 1 root root 18 jún 22 15:49 /root/.kde -> /home/wizzard/.kde
sudo ls -l /root/.kderc
Password:
lrwxrwxrwx 1 root root 20 jún 22 15:50 /root/.kderc -> /home/wizzard/.kderc


I deleted those directory before running the link command.

It is interesting, that now when I run "kdesu systemsettings", the configuration of the fonts etc. is the same as I have configured, but these settings does not affect real application behaviour.


KDE Slovak translation team translator and coordinator
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The QApplication::palette() in use is likely the palette of KWin itself, as a KDE/Qt application rather than the application which it is showing instead.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
greatperson
Registered Member
Posts
75
Karma
0
OS
bcooksley wrote:The QApplication::palette() in use is likely the palette of KWin itself, as a KDE/Qt application rather than the application which it is showing instead.

So, isn't there there a way to get the application's palette?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Due to the design of X and other constraints (such as supporting non-Qt/KDE applications) this is not possible.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
luebking
Karma
0
Sure is - the client can export it to the decoration as X11 property, this way bespin aligns style and deco (for any random client color)
Wizzard
Registered Member
Posts
35
Karma
0
OS
I dont understand. Is there any way to reach unified look without changing root home directory to /home/me? :) I still did not reach the success.


KDE Slovak translation team translator and coordinator
luebking
Karma
0
It's not possible with the oxygen style deco but in general it is, bespin is poc.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]