Re: [arch-general] apparently bash export is broken for users

2012-03-12 Thread Heiko Baums
Am Mon, 12 Mar 2012 11:08:57 +0800
schrieb XeCycle xecy...@gmail.com:

 Not everyone uses bash as the default shell, you can also source
 ~/.profile in your bash_profile if you like.

But the thread subject says bash export.

Heiko


Re: [arch-general] apparently bash export is broken for users

2012-03-11 Thread XeCycle
Jude DaShiell jdash...@shellworld.net writes:

 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.

Aren't you supposed to edit ~/.profile by hand?

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

How come?

 I'm 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.  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.

A package can add something to the system profile directory, IIRC
/etc/profile on arch sources everything in /etc/profile.d, so you
can source /etc/profile if some environment is provided by the
package as system-wide.

-- 
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591


pgpHxFruKIZza.pgp
Description: PGP signature


Re: [arch-general] apparently bash export is broken for users

2012-03-11 Thread Dennis Herbrich
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


Re: [arch-general] apparently bash export is broken for users

2012-03-11 Thread Heiko Baums
Am Sun, 11 Mar 2012 21:18:43 +0800
schrieb XeCycle xecy...@gmail.com:

 Aren't you supposed to edit ~/.profile by hand?

Isn't the correct file to set such environment variables locally
~/.bash_profile resp. ~/.bashrc?

For global settings it's /etc/profile or better a new file
in /etc/profile.d with the permissions 755.

Heiko


Re: [arch-general] apparently bash export is broken for users

2012-03-11 Thread XeCycle
Heiko Baums li...@baums-on-web.de writes:

 Am Sun, 11 Mar 2012 21:18:43 +0800
 schrieb XeCycle xecy...@gmail.com:

 Aren't you supposed to edit ~/.profile by hand?

 Isn't the correct file to set such environment variables locally
 ~/.bash_profile resp. ~/.bashrc?

Not everyone uses bash as the default shell, you can also source
~/.profile in your bash_profile if you like.

-- 
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591


pgpV9c3Qx9xVe.pgp
Description: PGP signature