Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a desktop that has both Gnome and KDE installed.

When I start non-KDE applications under my user account running KDE, the application widgets obtain the same window decoration, style etc as my KDE applications.

However, when I have to start an application with root privileges (i.e. via kdesudo), the style is like Gnome, not like KDE.

What do I need to do to change this?

share|improve this question
add comment

4 Answers

up vote 1 down vote accepted

It's in the docs ...

KDE Configuration ...

However, you cannot give sudo access before a user is logged in ...

Since kdm must run before any user is logged in, it is not associated with any particular user. Therefore, it is not possible to have user-specific configuration files; all users share the common kdmrc. It follows from this that the configuration of kdm can only be altered by those users that have write access to $KDEDIR/share/config/kdm/kdmrc (normally restricted to system administrators logged in as root).

Edit: I apologize. The answer above does not address the problem ... for clarification I believe this is a possible workaround ...

I tried this and it seems to work ...

su - 
[password]
cd ~/.kde/share/apps
ln -s /home/[user]/.kde/share/apps/color-schemes ./color-schemes
ln -s /home/[user]/.kde/share/apps/QtCurve ./QtCurve
share|improve this answer
    
I am logged in as a user. The problem is that applications that are started within that environment using kdesudo (because the need root privileges) look different (window decorators) than when started without those privileges. –  txwikinger Nov 9 '11 at 13:01
    
Ahh .. yes ... that happens ... If you for instance call an application as kdesudo ~ {kdesudo synaptic} it will run as the un-styled root account. However, if you just run synaptic and then run as sudo it will retain the kde profile ... –  Eddie B Nov 9 '11 at 23:25
    
Try this ~ works for me :-) –  Eddie B Dec 16 '11 at 21:35
add comment

Perhaps try copying:

~/.kde/share/config/gtkrc
~/.kde/share/config/gtkrc-2.0
~/.kde/share/config/colors/
~/.kde/share/config/kwinrc

to /root/.kde/share/config/.

share|improve this answer
    
Sorry... but this did not work. –  txwikinger Aug 12 '10 at 22:11
add comment

This might work. It's a bit manual and you might even need to install it if it doesn't come with the core gnome stuff but there you go.

sudo gnome-theme-manager

My basis for this is gnome stores its theme settings in the user's home. KDE (or Kubuntu) sets you a theme close to your KDE theme but doesn't set one for the root account. By running this, you should be able to pick (or install then pick) a theme that closer matches your current KDE theme.

Edit: Multiple other sites suggest doing this for Gnome users wanting to sync the root theme:

sudo ln -s ~/.themes /root/.themes
sudo ln -s ~/.icons /root/.icons
sudo ln -s ~/.fonts /root/.fonts

I'm not sure if this will work for you but it might be worth a shot as it should be automatic.

share|improve this answer
    
I don't think that is what I had in mind. The Kubuntu desktop already makes provisions how to display gtk applications in the best way in KDE. I would like to extend that configuration to the applications started with kdesudo. –  txwikinger Aug 12 '10 at 15:19
    
I understand what you're trying to do. What I don't understand is how KDE themes Gnome applications. I assume it's telling them to use GTK-QT but where? If it's doing it like Gnome would, I don't see why the above wouldn't work. If it's not, you'll need to drill the KDE devs. –  Oli Aug 12 '10 at 15:45
add comment

have you tried to change the appearance in system settings with the root account? try to open it login as root

$ sudo su
# systemsettings

then change the appearance as you like, in this case using the same settings of your account

share|improve this answer
    
I tried this. It is a good suggestion, but unfortunately it did not solve the problem. The application appearance settings are the same, however, they do not seem to be used. –  txwikinger Nov 9 '11 at 13:08
    
@zurdo -1 for running a shell as root, why not sudo systemsettings. –  richard Jul 18 '12 at 15:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.