Gnuru.org
Productive Linux


Subscribe

 Subscribe via Feedburner in a reader

Enter your email address:

Delivered by FeedBurner


Login
Login:
Password:



Don't have an account?
Sign up to Gnuru.org
Forgot your password?

KDE and PATH issues
23 August 2005 @ 21:20 BST
by Paul

There is little as annoying as your computer not running as you think it should. This very thing has been happening to me in the last few days.

One thing that I really like is typesetting documents in TeX and LaTeX. These typesetting languages are like many things in GNU/Linux, in that once you start doing anything serious you need to have your own libraries.

TeX has the path to its libraries in an environment variable TEXINPUTS. So, you can set TEXINPUTS like you can with other environment variables:

export TEXINPUTS=$TEXINPUTS:$HOME/mylibs::

That's what I thought. That's what I did. Did it work? Did it hell. Emacs, whose TeX mode is great, just wasn't finding my libraries. I tried setting TEXINPUTS in .bashrc, .bash_profile, .profile, but nothing worked.

But then it did. A bit. When I ssh'ed to the computer using X forwarding, emacs correctly found TEXINPUTS. Something odd was going on here.

If it was running OK in an SSH session, would it also run properly if started emacs from a xterm? So, I tested it by starting emacs from a console window instead of from the K Menu. It worked correctly. Suddenly, it dawned on me; it was a KDE problem. KDE just wasn't running .bashrc, or .bash_profile or .profile or anything else.

I hit Google to come up with an answer. Yes, it is known. Even though, I'd call it a bug, apparently it isn't, it's a 'feature' which isn't going away. So, we need a permanent work-around.

The answer is to be found here: http://lists.debian.org/debian-kde/2005/05/msg00079.html.

The best solution is to create a file, for example /etc/X11/Xsession.d/85LOCAL-sourcefiles that runs for every user when they start an X session. The file should contain this:

    if test -f $HOME/.Xsession-common; then
        . $HOME/.Xsession-common
    fi

This way, you can set your environment variables in ~/.Xsession-common. At the moment though I'm setting the environment variable in ~/.xsession just before I call 'startkde'.

So, there you have it - my sanity was saved.

Tags: emacs latex



Leave a comment:

Are you human?