Questions tagged [.profile]

.profile is the local shell initialization script for Unix shells (such as sh, ksh, bash and zsh). $HOME/.profile, also known as ~/.profile, is run exactly once per session -- when you login. As it runs after system wide /etc/profile script, the typical thing you want to do in this script is set, or modify, environment variables. If you set a shell option or alias in this script, it will not be propagated to a subshell.

Like /etc/profile, ~/.profile runs automatically at startup, and it can be rerun after modification using the source command.

97 questions
1
vote
1 answer

python os.getenv can't see variables defined in ~/.profile

I'm trying to set some environment variables on the DigitalOcean droplet for my python project. I put them to the ~/.profile file. Now it looks like this: # if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if […
Milano
  • 18,048
  • 37
  • 153
  • 353
1
vote
2 answers

How to get .pro file from the set of qt files

I was trying to modify the source code of this open source project https://github.com/haiwen/seafile-client As I can see it contains .ui, .qrc etc files which is used in Qt, but there is no .pro files present in his repository. So how to get the…
Vinay Kumar
  • 674
  • 2
  • 9
  • 21
1
vote
0 answers

How do I get Homebrew on Linux to preserve my PATH when building formulae?

I am trying to use Homebrew on Linux (Ubuntu 20.04) to install Swift Mint. I have installed swiftenv using Homebrew, and swift using swiftenv. In my .profile, I have included export SWIFTENV_ROOT=/home/linuxbrew/.swiftenv if which swiftenv >…
deaton.dg
  • 1,282
  • 9
  • 21
1
vote
1 answer

how can I run a script at the bash command line such that its configuration is identical to its configuration when it is run by cron?

I want to write and test scripts that do not depend on any of the personal environment variables accessible to me at the command line. For instance, each time I open a new command line window on my macbook pro, $PATH is updated by having my personal…
Jacob Wegelin
  • 1,304
  • 11
  • 16
1
vote
1 answer

pyenv: failed to activate virtualenv - settings not read from .profile at login

This is a known topic, almost similar to this one. However - why am I having the pyenv settings passed in ok from .profile at login only up to the virtualenv string. export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" if command -v…
Leo
  • 33
  • 5
1
vote
1 answer

Why does Cygwin not start Bash as a login shell

Apparently, when I start cygwin, bash is not invoked as a login shell with the consequence that my ~/.profile is not read. I am not sure if this by design or if I have goofed with some setting somewhere. Is there a canonical way to start cygwin's…
René Nyffenegger
  • 39,402
  • 33
  • 158
  • 293
1
vote
0 answers

Jobs Started from .profile getting killed

Jobs which are triggered from OS Users .profile are getting killed after Putty Session is closed/exitted. From the OS User "user1" jobs are triggered in application using sudo login to application id "app1". .profile of user1 set -o vi mesg…
Bibek Lal
  • 11
  • 4
1
vote
0 answers

Terminal is not sourcing .bash_profile, but sourcing .profile

I created a .bash_profile and added the following: export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home export M2_HOME=/Users/aastha/apache-maven-3.3.9 export PATH=$PATH:$M2_HOME/bin When I check echo $PATH, I get the…
Micky
  • 11
  • 2
1
vote
0 answers

Overwritten .profile in OSX affecting Terminal Start

The .profile on OSX 10.11.5 was overwritten by accident. When a path for PHP 7 is added to it, on Terminal launch we get: declare -x Apple_PubSub_Socket_Render="/private/tmp/com.apple.launchd.RVAZ5aB2CN/Render" declare -x HOME="/Users/fw" declare…
jkdoyle
  • 369
  • 1
  • 2
  • 5
1
vote
2 answers

How to fix path variable in bash on Mac OSX Snow Leopard

This might be a noob question, but I need help. I screwed up my terminal by trying to alter my path variable using the following command: $ sudo nano .profile Before I did that, if I were to type: $ echo $PATH I would get:…
Adam
  • 12,236
  • 9
  • 39
  • 44
1
vote
1 answer

How to change shell and execute some command in .profile

My requirement is that when I log-in into Linux, I should be able to change the default shell, initialize some variables and remain in new shell. I put below commands inside ".profile" file but it is just changing the default shell to bash and not…
BhushanD
  • 101
  • 1
  • 6
1
vote
0 answers

Creating permanent PYTHONPATH not working

I have been trying to set up a permanent PYTHONPATH in my /.bash_profile, but it doesn't seem to be working. I can get it to work for one session, then it will be blank the next time I try. Or, as happened today, it remains blank. If I had to guess,…
1
vote
1 answer

How can I run my *.pro file with QtCreator?

All. I just setup Ubuntu 14.04 and installed QT5.4 using command below. (VMware) $ wget http://download.qt-project.org/development_releases/qt/5.4/5.4.0-rc/qt-opensource-linux-x86-5.4.0-rc.run $ chmod +x qt-opensource-linux-x86-5.4.0-rc.run $…
Honken
  • 11
  • 1
  • 2
1
vote
1 answer

Sourcing .bashrc from .profile not working

I have many environment variables set with 'export' in my ~/.bashrc. My .profile sources my .bashrc with source /home/doriad/.bashrc However, QtCreator doesn't seem to know about these environment variables. If, instead, I put the exports directly…
David Doria
  • 9,873
  • 17
  • 85
  • 147
1
vote
2 answers

How do I get the .profile file to work on Solaris machine?

This has been frustrating me for two days and it seems like it should be a very simple thing. I was just created an account on a Solaris machine. Sun OS 5.10 I believe. The default is Bourne shell which I don't want. I did a cat /etc/shells…
noblerare
  • 10,277
  • 23
  • 78
  • 140