Re: apparently bash export is broken for users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Sun, Mar 11, 2012 at 08:04:27AM -0400, Jude DaShiell wrote:
> I tried setting up emacspeak and emacspeak needs two variables exported to 
> the user's .profile file in order to work.  The EMACSPEAK_DIR variable 
> needs to point at the location of emacspeak and DTK_PROGRAM needs to point 
> at the speech server you intend to use.  

> The export commands did not create a .profile file for me nor did they update
> a .profile file for me with their contents in it.  

I don't think the 'export' bash built-in command works how you think it works.
Read up on it, you'll encounter it frequently. Seriously, do it, I'll be
waiting, and it'll probably solve your problem right away.

> Using echo to create and populate the .profile also has no good effect.

Well, you *could* do that, and that would work if done correctly, too, but it's
probably easier for you to use an editor. 

Still no dice? Please allow me to elaborate. I'll keep things simple, or at
least try to.

When a user logs into an Arch Linux system, a lot of stuff is done
automatically, not entirely unlike the "Autostart" feature of certain other
operating systems. Instead of running dozens of applications, though, the linux
mechanism is primarily used to "set up your environment". The PATH where to
look for programs, how the command prompt is supposed to look like in your
terminals, the location of installed Java environments, your language, as well
as any settings specific to certain applications, as in your case here for
emacspeak.

An user's environment is set up in the /home/<user>/.profile text file, among
others like .bashrc and .bash_profile for instance. Don't bother about the
subtle difference between those files right now, but if you do, it's
"explained" in the bash man page.

Open the file /home/<user>/.profile in an editor of your choice, and append
these lines to the very end:

export EMACSPEAK_DIR=/path/to/the/directory
export DTK_PROGRAM=<the server of your choice>

If this file does not exist, yet, just write these two lines in a new, empty
file and save it as a new .profile in your home directory.

This file is only read and used for your initial login, and it's settings are
"inherited" by any following applications. You should therefore log out
completely and log in back again, or restart altogether if you're not
absolutely sure about being logged out "enough". Just opening a new terminal in
X11 and trying emacspeak will NOT work right away.

After relogging in, open a terminal and try running

  echo $DTK_PROGRAM

Tab completion should work, and you should be presented with the value you set
in your .profile. If not, something went wrong there. If you ARE presented your
value, try running emacspeak. If that doesn't work as intended, your problem is
elsewhere. Maybe the name of the DTK server you chose wasn't correct in the
first place.

You might then contemplate adding a new file called /etc/profile.d/emacspeak.sh
owned by user and group 'root' with 0755 rights to your system, with these two
export lines. This will then be a system-wide setting for all users, properly
installed where expected. You may then remove these exports from your user's
.profile again.

> about to use git to pull the current version of emacspeak down onto this
> system and try with that but I downloaded and built eflite and emacspeak
> that's on this machine from the aur repository. 

You might want to add a comment that such an export is missing, lest it be
included in a new version by the maintainer.
 
> Fortunately, I can test emacspeak on debian without much difficulty and 
> may need to check out where debian stores those export variables since the 
> debian version I have made work in the past.

Remember that the values you have to set may be different. It's unlikely a
simple setting like an environment variable is not working on your system.

When you're still having trouble, post your not working .profile so we know
what you're trying to do. It might be obvious to us.

Best regards,
  Dennis


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux