Remote applications and Gnome settings: an irritation

March 31, 2010

Here is a conundrum that I have recently run into, posed as a question: when you run a Gnome application remotely through ssh-forwarded X, where does it get its Gnome configuration settings from?

In the old days of X resources, this sort of question had a simple answer; custom settings were attached to the screen itself (they got stuffed into an X property) and thus were accessible to all X programs, regardless of where they were running. In the new ultra-modern world of GConf and friends, the answer is far from obvious.

In theory, Gnome applications get their settings from a per-user GConf daemon, which they talk to via DBus. As usually implemented, DBus is strictly local to the local machine, so the answer should be that they get their configuration settings from whatever Gnome settings you have established on whatever machine the application is running on. (I will not think too hard about how the necessary user GConf daemon gets started; I find it better not to think much about Gnome magic.)

In practice, this seems to work for some settings but not others. In my testing, Gnome's application specific settings work on a remote machine, but the general desktop settings do not (even when they influence application behavior). Specifically, I know that a custom setting for the cursor_blink key in /desktop/gnome/interface is ignored when my session isn't actually on the machine that I'm running gnome-terminal on. Sadly, this is is kind of a problem for me.

(In theory this behavior could be justified on the grounds that my session isn't on that machine, but it results in undesirable behavior that I have no way to control. And yes, gconftool on the remote machine claims that the key is properly set and everything works if my session actually is native to the remote machine (apart from the bit where I am using a slow LTSP instead of my nice desktop machine).)

Comments on this page:

From at 2010-04-05 03:27:30:

There's several things going on here. First, gconf is activated by DBus activation on your local session bus. You don't get a local session bus if you log in via SSH, only if you run gnome-session. So that's why the remote gnome-terminal doesn't know about your settings when run from SSH. I haven't tried either of these, but one way to fix it could be forward DBUS over ssh. Another is to start a DBus session bus on the remote machine, either manually or with gnome-session, although the latter sounds like a bad idea to me as it will start other things you don't want.

There are some GNOME settings that are put into XSETTINGS values, which being X do get forwarded by SSH, and so GNOME apps on the remote host obey them.

All of the above will soon be moot as GNOME is moving to using GSettings (which has dconf as a n*x backend), but I don't know how well they'll work remotely. I think dconf just mmaps the file into the process, so it'll use the settings from each machine rather than your session per se. Not that "What is a n*x graphical login session?" is well defined beyond utmp; much as ConsoleKit is trying hard for local sessions I don't think it covers SSH at all.


Written on 31 March 2010.
« One possible future for Solaris
Looking back at a year of our disk-based backup system »

Page tools: View Source, View Normal, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Wed Mar 31 01:01:10 2010
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.