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'm triyng to set a different GTk-theme and background for GDM3 (using ubuntu 11.04 and GNOME3 PPA).

As far As I have seen, the GTK-theme used by gdm is exactly the one stored into Gsettings > org.gnome.desktop

So, exactly as I do as another user, I tried executing

gsettings set org.gnome.desktop.interface gtk-theme Adwaita 

from a shell with gdm logged user.

The problem is that it does not change the value of the key into gsettings.

How do I get that gdm can change gsettings keys' values?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

This has something to do with Xauth.... Actually running

xhost +SI:localuser:gdm

as root (or as admin account) let gdm accept gsettings set commands

Actually the solution for setting gtk-theme or background is

  1. as root (or admin account) xhost +SI:localuser:gdm
  2. as root (or admin account) sudo su gdm -s /bin/bash
  3. as gdm execute in sequence

gsettings set org.gnome.desktop.interface gtk-theme GTK3_THEME

gsettings set org.gnome.desktop.interface icon-theme ICON_THEME

gsettings set org.gnome.desktop.interface cursor-theme CURSOR_THEME

gsettings set org.gnome.desktop.background picture-uri 'file://FILE'

for example:

gsettings set org.gnome.desktop.background picture-uri 'file:////usr/share/backgrounds/JardinPolar_by_CarmenGloria_Gonzalez.jpg'

Another important thing to check is that gdm has rw permissions to its home folder, i.e. /var/lib/gdm

!!!IMPORTANT!!! exit to exit from being logged in as gdm followed by

xhost -SI:localuser:gdm as root or admin user after setting above parameters to deny access to gdm (otherwise it may create problems)

share|improve this answer
    
If you are using GDM3setup, just give xhost+SI:localuser:gdm, use the tool and later xhost -SI:localuser:gdm –  Juan Sebastian Totero Jul 11 '11 at 19:05
    
@JuanSebastianTotero: step 3, first line, returns: ** (process:12478): WARNING **: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dfile_2derror_2dquark.Code2: Failed to create file '/var/lib/gdm/.config/dconf/user.GEI68V': Permission denied –  Benjamin Jan 30 '12 at 1:50

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.