First, you shouldn't have to reboot a Linux for anything short of a kernel upgrade.
You set an environment variable like this:
If you want the variable to be set "permanently", you can append that command to the .bash_profile file in your home directory.
If you want every user to have the same setting, append it to the end of the /etc/profile file.
Once you change a configuration file, you'll have to either log out and log back in or issue the source command to re-initialize the environment.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com