How to Make Ubuntu Unity 2D Launcher Work with an NFS Mounted Home

Back in July I repor­ted a bug that I was hav­ing with Ubuntu’s Unity 2D Launcher. The launcher would crash and restart con­stantly, chew­ing up a lot of CPU time. I had to switch back to the clas­sic Gnome desktop to con­tinue work­ing, I can’t run Unity (3D) because of a bug in NVIDIA’s drivers that pre­vent icons being dis­played in the launcher.

For­tu­nately Florian Bou­cault picked up the bug report and poin­ted out that dconf — the sys­tem that Unity 2D uses to store its con­fig­ur­a­tion — does not cur­rently work over NFS.

The work­around is to store dconf data­bases loc­ally by set­ting XDG_CONFIG_HOME dur­ing the user login pro­cess, before X gets star­ted. Here is a script that will do the job when placed in /etc/profile.d/

# /etc/profile.d/local-config.sh

# Set XDG_CONFIG_HOME, XDG_CONFIG_CACHE and ICEAUTHORITY to a local path

# Gnome dconf does not cur­rently work over NFS,
# so make sure con­figs are stored locally.

# Ubuntu Bug: https://bugs.launchpad.net/ubuntu/+source/unity-2d/+bug/817368
# Gnome Bug: https://bugzilla.gnome.org/show_bug.cgi?id=595579

# All other pro­grams that hon­our the loc­a­tion of XDG_CONFIG_HOME
# will also store their con­fig­ur­a­tions here.

# Set CONFIG_BASE_DIR to any local dir­ect­ory where the user
# has write access to cre­ate it.

CONFIG_BASE_DIR=/home/configs/${USER}
[ –d ${CONFIG_BASE_DIR} ] || mkdir –p ${CONFIG_BASE_DIR}

export XDG_CONFIG_HOME=$CONFIG_BASE_DIR/config
export XDG_CACHE_HOME=$CONFIG_BASE_DIR/cache

# X11 throws an error on login when .ICEau­thor­ity is loc­ated on NFS
# Ubuntu Bug: https://bugs.launchpad.net/ubuntu/+bug/761991

export ICEAUTHORITY=$CONFIG_BASE_DIR/.ICEauthority

I also took the oppor­tun­ity to move .ICEau­thor­ity from my home dir­ect­ory because I get an error that it can’t be updated every time I log in.

 

Pos­sibly Related Posts

One thought on “How to Make Ubuntu Unity 2D Launcher Work with an NFS Mounted Home

  1. Pingback: Evince on NFS kills Ubuntu Desktop: - steveblamey.co.uk

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>