A script executed as part of the logon process

learn more… | top users | synonyms

68
votes
4answers
92k views

Why ~/.bash_profile is not getting sourced when opening a terminal?

Problem I have an Ubuntu 11.04 Virtual Machine and I wanted to set up my Java development environment. I did as follows sudo apt-get install openjdk-6-jdk Added the following entries to ...
41
votes
2answers
23k views

What are login and non-login shells?

It is said that settings for non login shell to go into .bashrc file and login shell settings to go into .profile file. What is really meant by login and non-login shells? Please explain without ...
26
votes
1answer
14k views

Scripts in /etc/profile.d Being Ignored?

I'm new to Ubuntu. I'm running 13.10 Desktop. I wanted to set some system wide aliases and a custom prompt for bash. I found this article: https://help.ubuntu.com/community/EnvironmentVariables ...
15
votes
3answers
18k views

Configure gnome-terminal to start bash as a login shell, doesn't read .bashrc

I'm trying to integrate RVM with gnome-terminal. Per default, gnome-terminal does not start bash as a login shell. I enabled run command as a login shell as suggested in this answer about the same ...
12
votes
2answers
3k views

Why does Ubuntu's default ~/.profile source ~/.bashrc?

These are the contents of the stock ~/.profile that came with my 13.10 (commented lines removed): if [ -n "$BASH_VERSION" ]; then if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi ...
11
votes
1answer
1k views

Sequence of scripts sourced upon login

I would like to concentrate all my login config in my ~/.bash_profile. There was a ~/.bashrc there by default but I replaced it with a ~/.bash_profile. However, when I log in, something before my ...
9
votes
2answers
3k views

Why .profile (and not .bashrc) appends ~/bin to path?

Since .bashrc is more "generic" (in the sense that .profile sources it), why "include ~/bin to path" procedure is not inside .bashrc? Why the user would not want it in a non-login shell? (Especially ...
9
votes
3answers
13k views

I can not find .bash_profile in ubuntu

I can't find .bash_profile in Ubuntu 14.04 in my /home/user directory. I use ls -a command to see the .bash_profile, but there isn't such a file.
7
votes
4answers
4k views

/etc/profile vs ~/.profile

I run ubuntu 12.04.1 LTS. And I can't get what is the order/priority for loading profile files. When I start the system and login using GUI which file is loaded? And why? What if run login-shell? Will ...
6
votes
1answer
804 views

Is there one file that all Desktop Managers (GNOME, KDE, XFCE and etc) are required to read/execute when users login?

I use GNOME and it first executes commands from /etc/profile and then from ~/.profile. This I have found by putting statements like echo 'something' > test in all files that i could think of like ...
5
votes
3answers
4k views

Can I ssh into my account without invoking .profile?

I want to ssh into my account, but I don't want the current version of my .profile login script to be executed. Is there a way to log in without running .profile? (Disclaimer: I found a work-around ...
5
votes
1answer
3k views

Ubuntu 12.04 doesn't seem to execute my .profile file

(I'm kinna n00bish) 1: I had ubuntu 11.10 installed, then upgraded to 12.04. 2: I had a script in my .profile file to turn off my laptop's touchpad (it worked, and was executed on login) 3: Now it ...
4
votes
2answers
212 views

Something wrong with my `.profile`

I recently installed a few softwares and needed to add their bin/ directories to my PATH. Nothing abnormal so far. But I decided to be smart about it, and rewrote a part of my .profile so I didn't ...
4
votes
1answer
2k views

run .profile function as cron job

In the .profile file of the root user I have defined a function, e.g. function printDate() { date } I want to run this function every minute and append the output to cron.log. I tried adding the ...
4
votes
1answer
190 views

App installed in ~/usr launches from terminal but not Applications menu (or why does setting ld_library_path in .profile not work as it should)

I have built and installed an application under a directory of my choosing, let's say under /home/jim/usr, so files have been put in three-four folders, all under this $HOME/usr folder (e.g., bin, ...
4
votes
1answer
273 views

Function inside .profile results in no log-in

I've created a custom function in my .profile, and I've added right at the bottom, after my custom aliases : # custom functions function eclipse-gtk { cd ~/development/eclipse-juno ...
4
votes
1answer
256 views

Can't login after adding script to /etc/profile.d

I have created a little script to add bookmarks in Nautilus to redirect users to network share. If I run the script manually, it works brillantly but as soon as I try to add it in /etc/profile.d, I ...
3
votes
3answers
2k views

How to log in after wrongly modifying path

I wanted to add a path so that the system could find some manually installed executable. However, instead of typing PATH=xxx:$PATH;export PATH at the end of ~/.profile where xxx is the directory in ...
3
votes
2answers
400 views

Can't login (unexpected EOF in .profile)

I am having a problem with login. Its in a cycle login with password correct - > login -> login with password correct -> login. I've seen a few threads about this matter but none helped. I do ...
2
votes
3answers
2k views

Why won't environment variables added to .profile show up in screen

I'm running Ubuntu 12.04 I added export LD_LIBRARY_PATH=/home/dspies/workspace/hdf5-1.8.11-linux-shared/lib to .profile but when I log in and open terminal and put echo $LD_LIBRARY_PATH there's ...
2
votes
1answer
667 views

how to reset ~/.profile to default

I have been playing around with the ~/.profile file trying to add something permanently to my $PATH variable and it seems i have done some damage. I can't log into ubuntu now. When I enter my ...
2
votes
1answer
314 views

Why isn't .profile sourced when opening a terminal?

Just installed Ubuntu 14.04.1 LTS. According to .profile, # ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash, if ~/.bash_profile or ~/.bash_login ...
2
votes
1answer
4k views

What can cause my .profile file to not be loaded when a new terminal shell is initialized?

There are no errors in xsession and I don't have a .bash_login or .bash_profile file, so I'm 100% certain neither of those is loaded and thus cancels .profile loading. When I rename the .profile to ...
2
votes
1answer
258 views

.profile ran into an infinite loop

I changed my .profile to run a script at startup. That scripts loops through all the files in a folder and sets it as the background image. It sleeps for 10 seconds before it sets the next one as the ...
2
votes
1answer
57 views

Is .profile read upon GUI login

In this question, it is mentioned that there is no standard behavior in terms of whether .profile is read or not when a user logs in from the GUI in today's Linux and Unix systems. So for Ubuntu, is ...
2
votes
2answers
3k views

Can't Set Environment Variables in ~/.profile

All, I need to set environment variables in my ~/.profile since I am running a program (QtCreator) that doesn't start a bash shell. I cannot for the life of me get it to work though. QtCreator will ...
2
votes
2answers
178 views

How do I finish the installation of a program from source?

I compiled sqlite3 from source code, version 3.6.16. I used --prefix=/usr/bin as my only compiling option. The binaries compiled and installed correctly, but at the directory /usr/bin/sqlite3/bin. So ...
2
votes
1answer
1k views

How to set environment without sourcing .bash_profile myself every time? [duplicate]

When I restart Ubuntu 14.04, environment variables are set back to default and I have to run source .bash_profile every time which is very annoying. I generally keep my environment vars in ...
2
votes
2answers
308 views

How can I set up different startup profiles?

I'm fairly sure this is a basic question, nevertheless I'm having some problems with solving this. I'm trying to set up different startup profiles set specifically to different activities... like ...
2
votes
1answer
612 views

How do I get Ubuntu to use Anaconda's python instead of the standard /usr/lib/python…?

I installed Anaconda using instructions provided on the main website, which are similar to those that can be seen here: Installing Anaconda python on ubuntu However, I found that I had to manually ...
2
votes
1answer
315 views

Ubuntu / Bash recognising “export PATH=$PATH:~/…” but not “export PATH=$PATH:/home/…”

So I've been using ubuntu since 09.04 but have limited experience with sys admin. I now want to get into web development and as part of installing the Play Framework, I had to add the activator path ...
2
votes
0answers
170 views

Ensuring .profile gets executed when using nX

The $PATH I have when I run terminal in an nX session is different to that I have when I run terminal after logging on physically. The former is ...
1
vote
3answers
53 views

bash: /home/rathin/.profile:: No such file or directory while trying to reload it via “source ~/.profile” after editing it through “vi ~/.profile”

After I edited my ~/.profile via vi command, couldn't get out of it successfully. So I closed the terminal and when I tried it again after reopening terminal, it showed duplicate file named ...
1
vote
2answers
624 views

Where to place local executables

Where is the correct place to store user-local executable files? echo $PATH gives /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games It doesn't include eg. $HOME/bin Would ...
1
vote
2answers
910 views

Problem in .bashrc

I try to edit .bashrc to view the C-compilers that I installed before. But after opening the new terminal I am stuck with strange error. I am unable to ls the files/directories and nothing works. It ...
1
vote
2answers
559 views

How to organize scripts and tools under ~/bin in directories, but have them in $PATH?

I always have ~/bin added to the $PATH in my ~/.profile. As is default in Ubuntu. # set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi ...
1
vote
1answer
2k views

Path not setting up for a setup

I am unable to add path of my omnet bin directory for the installation. During the installation i go to the omnet directory and enter ./configure which gives me the following errors WARNING: your ...
1
vote
2answers
2k views

“$MAKEOPTS” ignored, why?

I have defined export MAKEOPTS="-j4" in my ~/.profile file. But when I do a compilation with make, this option is ignored. I've consulted the GNU Make manual but it says nothing about this ...
1
vote
2answers
62 views

What environment variable should I use to set a default web browser?

I'm trying to set my default web browser as google chromium inside of either my .bashrc or .profile. What Environment Variable do I need to set in order to achieve this? Edit: Here's some more ...
1
vote
1answer
48 views

Why I cant see password prompt when .profile executes?

I want to use keychain for SSH cron jobs. I've found this good answer. I've add command keychain --nogui id_rsa in .profile And when I reboot and login I have to enter password. But I don't see any ...
1
vote
2answers
246 views

Where are the pristine, untouched contents of a 12.04 .profile file?

Several files in my home directory have been disappearing. E.g. .bashrc, .bash_profile, authorized_keys and now .profile. I would like to reconstruct .profile. Where can I find the .profile contents ...
1
vote
1answer
574 views

deleting a file from an user account when only the guest account is accessible

I was trying stuff and my cousin (owning applestuff) sent me a bash_profile file. I replaced it with my old profile file (the one you find in home, .profile) - I backed up the existing one as ...
1
vote
2answers
754 views

JAVA_HOME : .bashrc or .profile

I need to set some variables such as JAVA_HOME and add them to the PATH. Can I somehow define them in .profile, and have them pulled into .bashrc? Or maybe add them to a 3rd file, and have that file ...
1
vote
1answer
119 views

what is .profile~ (not .profile)

I was trying to uninstall NVM, and saw I have a .profile~ file as well .profile - both have different content. what is the different between them? thanks.
1
vote
1answer
3k views

How do I source a shell script for Node Version Manager?

Hi and thanks for looking! I am new to Linux/Ubuntu, but I have set up an Ubuntu box on which to run Node.js. I have had moderate success, but now I need to be able to easily upgrade my version of ...
1
vote
1answer
28 views

Diffrence among environment/profile/bash files

I know the difference among ~/.bash, ~/.profile vs. /etc/profile. I know (please correct me if I am wrong) configuration in ~/.bash is applicable for a specific user and terminal only.Configuration in ...
1
vote
1answer
82 views

Can I log in without loading my .profile?

I recently inserted an error into my .profile file and now logging in just presents me back to the log in page, much like in this question. I've booted into recovery mode and recovered my encrypted ...
1
vote
1answer
684 views

`TERM` environment variable not exported from `.profile`?

I have this in my .profile (I'm running Ubuntu 12.04): export TERM="xterm-256color" The variable seems not exported or be invariably later overwritten as TERM="xterm". A test with Gnome Terminal: ...
1
vote
2answers
56 views

How to skip StartUp and/or .profile on log-in?

Is there a login option to skip processing the .profile and Startup Applications? I basically have a script in there that's hanging the system upon log-in. The filesystem is encrypted and I don't have ...
1
vote
1answer
527 views

14.04 - Old Firefox Version won't install, can't use profile manager

I'm new to Ubuntu. (14.04) Firefox comes default as version 31.x, but I need to use 29.0.1. I've tried following multiple instructions, whereby copying an old firefox (old v29) to the usr/bin ...