0
votes
0answers
8 views

Unix environment variables for Unix-derived apps in Windows

My problem is that cross-platform apps initially written for Unix/GNU+Linux trash my Windows filesystem by placing files wherever they can. In most cases this can be solved by setting environment ...
66
votes
6answers
3k views

Choosing between .bashrc, .profile, .bash_profile, etc [duplicate]

This is embarrassing, but after many years of using POSIX systems full time, I still have a hard time figuring out if a shell customization should go in .bashrc, .profile, or somewhere else. Not to ...
0
votes
0answers
32 views

set/modify environment variable for gnome/kde at runtime

Is there a way to modify or set environment variables in gnome or kde at runtime, ie. after logging in? I specifically need this for gnome, but knowing the kde method would be really useful too. If ...
0
votes
0answers
38 views

Exporting Variables – Reading Them Returns Blank?

Hi – I'm using Mac OS X (Mavericks), which should be UNIX compliant. In my .bash_login, I'm exporting variables for Cocos2D-X. I know this is executing, as I have a 'echo Test' line that executes ...
1
vote
1answer
48 views

Escaping a directory in a $PATH-like list

I'm developing a wrapper for LibGit2, the Git library. And I come out with a problem: Many GIT functions accept path lists, that is, a string composed of a series of paths separated by a token, that ...
3
votes
2answers
339 views

Unix environment variables with arguments

I'm trying to set my $EDITOR variable to be emacs with no window, so the command to call it would be emacs -nw. However if I set it like this: export ...
5
votes
3answers
3k views

What is the Unix PATH variable and how do I add to it?

Many programming tutorials ask users to add something to their PATH but don't explain what it is. The existing resources that explain the PATH to users new to the command line are not very good. ...
1
vote
3answers
3k views

Term Enviroment Variable not set, when executing a Bash File via SSH

i am trying to run a bash script on a remote machine. If I open a ssh connection in a terminal, i can easily run the script. But when i run it like that: ssh user@ip < /etc/script I get an ...
1
vote
2answers
415 views

Unix Commands are not working

New to Unix, I recently tried to add a $PATH variable in Unix in order to debug my android sdk. I looked up online the directions and tried to follow them as thoroughly as possible. What ended up ...
25
votes
3answers
44k views

How do I make sudo preserve my environment variables?

Using sudo 1.7.4p4 on Solaris 5.10 and sudo 1.6.7p5 on RHEL4 u6 I can't see how to preserve my environment variables, for instance $PYTHONPATH. I've added this line to sudoers, but it doesn't make any ...
1
vote
1answer
55 views

overload environment

I've recently switched across to nesting my home directory across all my machines in an svn repo, meaning that my utility scripts, configuration (irssi, vim, zsh, screen etc) as well as my .profile ...
0
votes
2answers
808 views

Setting default path in Unix

I just installed valgrind on my Fedora12 machine. $ valgrind // 1 $ valgrind: Command not found. //error $ /usr/local/bin/valgrind // 2 works fine My $PATH has ...
5
votes
2answers
21k views

How do I reset the $PATH variable on Mac OS X?

I've messed up my path variable, and now some apps that I run raise errors saying Command Not Found (error 127) for commands like date and sleep. These commands work fine when executed directly in the ...
2
votes
1answer
8k views

Setting environment variables in Linux for all processes

I am using Ubuntu 9.1 (Karmic Koala) on my server. A simple matter of setting environment variables so that they are globally available across all processes is driving me crazy and I'd appreciate ...
33
votes
2answers
5k views

'less' command clearing screen upon exit - how to switch it off?

How to force the less program to not clear the screen upon exit? I'd like it to behave like git log command: it leaves the recently seen page on screen upon exiting it does not exit the less even ...
0
votes
2answers
163 views

Existence of USER environment variable in the shell

I heard (although I can't find any sources for proof) that the USER environment variable may not be set in a old Unix shells (maybe even some obscure shells as well). What is the probability that it ...
1
vote
1answer
1k views

Basic *nix Question (Mac OS X): Where is my path being set?

I have a path that starts like this PATH=/opt/subversion:/usr/bin:/bin:/usr/sbin:/sbin [etc] and this is wrong (at least opt/subversion needs to be opt/subversion/bin). Where is this being set? I ...
1
vote
2answers
110 views

Security issues related to storing secrets in scripts

Let's say you have a program you want to run unattended, as root, which requires a secret (such as a passphrase; something you don't want other people to find out), which can be read from an ...
9
votes
4answers
8k views

How do I set an environmental variable for a GNOME session?

On my system, for apps that use SDL, I need to set an environmental variable: export SDL_AUDIODRIVER=alsa to get the sound to work properly. How do I set up my GNOME session so that this variable ...