A script executed as part of the logon process

learn more… | top users | synonyms

56
votes
4answers
76k 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 ...
37
votes
2answers
20k 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 ...
20
votes
1answer
9k 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 ...
12
votes
2answers
15k 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
1k 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 ...
9
votes
1answer
579 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 ...
8
votes
2answers
2k 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 ...
7
votes
4answers
3k 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
767 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
3k 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 ...
4
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
200 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
1k 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
189 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
237 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
184 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
3answers
6k 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.
3
votes
2answers
305 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
396 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
172 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
3k 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
245 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
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
167 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
567 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
279 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
67 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
157 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
2answers
423 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
683 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
496 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
1answer
23 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
219 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
487 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
672 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
116 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
2k 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
49 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
356 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
43 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
503 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 ...
1
vote
1answer
215 views

Node.js NVM causes Xubuntu login loop with ~/.profile line

There are various posts on the Xubuntu login loop, but none of them address NVM (Node Version Manager). I have installed NodeJS via NVM on my Xubuntu VM and it works fine, however after rebooting, I ...
1
vote
1answer
646 views

Why's this PCManFM command line not working?

PCManFM doesn't remember view-mode for specific folders. The pcmanfm.conf file in: /home/user/.config/pcmanfm/default saves view_mode=[0,1,2,3] for all folders. Default being 0 (icon view), I chose ...
1
vote
1answer
217 views

emacs when run from the Applications menu (via. desktop setting) doesn't load environment variables

So when I invoke emacs from the terminal, all my environment variables are loaded correctly from .bashrc. However, when I load emacs from the Ubuntu Application menu (by invoking the ...
1
vote
1answer
537 views

Why this .pam_environment setting prevents me from logging in? [duplicate]

I'm trying to move things from my .bashrc to .pam_enviroment because of this. I've put the following into my .pam_environment but this prevents me from logging in because there should be some mistake. ...
1
vote
1answer
978 views

How can I specify the languages that apt-get uses?

At some point in my installation, I must've selected several languages as default. When I run sudo apt-get update, I got output similar to the following. Ign http://ppa.launchpad.net quantal/main ...