Application specific environment variable settings

Posted by SuperElectric on Ask Ubuntu See other posts from Ask Ubuntu or by SuperElectric
Published on 2011-01-29T20:21:10Z Indexed on 2011/01/29 23:33 UTC
Read the original article Hit count: 267

I'm trying to work around a known bug in Ubuntu 9.10, where using the scrollbar in emacs causes text to be highlighted, and the cursor to move. This page here shows that you can fix this by setting an environment variable before launching emacs:

$ GDK_NATIVE_WINDOWS=1 emacs

So a lazy fix would be to alias "emacs" in my .bashrc:

alias emacs="GDK_NATIVE_WINDOWS=1 emacs"

This, however, has the drawback of setting this environment variable for all subsequent commands run from that shell. Is there any way to set GDK_NATIVE_WINDOWS=1 for just emacs, whenever I run emacs?

© Ask Ubuntu or respective owner

Related posts about gnome

Related posts about 9.10