Questions tagged [.profile]

A user-specific (not systemwide) configuration script executed when starting login shells.

Filter by
Sorted by
Tagged with
25 votes
3 answers
2k views

What goes in ~/.profile and ~/.bashrc?

I'm having trouble wrapping my head around what belongs in ~/.profile and what belongs in ~/.bashrc. From what I've read, it seems to me that ~/.profile should be used for environment variables and ~/....
user avatar
  • 545
0 votes
1 answer
52 views

Stuck booting to black screen after adding new xrandr mode

One of my monitors is 2560x1440, 60Hz capable but my Ubuntu 20.04 was only allowing me to set the maximum display resolution to 1920x1080. I followed the instructions in this post Unable to set my ...
user avatar
0 votes
3 answers
108 views

Where to Source your .Profile (Ubuntu 21.10)

Recent instructional video I was watching said to put your export PATH="$PATH..." statement in your .profile and after sourcing manually in the terminal to append ". ~/.profile" to ...
user avatar
0 votes
0 answers
27 views

Is ~/.profile effectively sourced on non-login shells?

I see that the path variable is defined in my .profile file, and not in my .bashrc file. I have not changed either file. When using a shell initiated from the terminal icon on my desktop GUI, I can ...
user avatar
1 vote
1 answer
136 views

Is there a default way to run commands on user's logout?

I want to log the logins/logouts of my users. For the logins I only need to modify /etc/profile and add my command or edit any .profile for an specific user. But for the logouts I don't know if there ...
user avatar
  • 111
1 vote
1 answer
125 views

xmodmap not running in .profile

I recently followed this guide to get some keys mapped to my Alt Gr https://medium.com/@retprogramisto/how-to-make-custom-keyboard-map-with-xmodmap-1341a1552d4f It worked fine, but when it came to ...
user avatar
0 votes
0 answers
59 views

After upgrading to 21.10, .profile batch file is not being executed at session startup

Recently, I upgraded my computer to release 21.10. So I'm facing some issues related to it. Among then, .profile is not being executed when I login. it's weird, because I used to have this kind of ...
user avatar
  • 1,473
0 votes
0 answers
380 views

why my .xprofile file doesn't work?

I have xorg and xinit and i want to start some commands before the X enviroment. i did this many times and idk bc doesn't work. i made a touch ~/.xprofile and here i wrote the command that i want to ...
user avatar
  • 1
0 votes
1 answer
83 views

~/.profile not reloading [closed]

I am using Ubuntu 16.04.7 LTS Wanted to know why changes are not reflected when I change the ~/.profile and reloading the file using source ~/.profile or . ~/.profile The changes are only ...
user avatar
0 votes
0 answers
129 views

Error while loading .profile on ubuntu 20.04

Yesterday I have changed my .profile to include go path. And it looks like this: if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then ....
user avatar
  • 101
6 votes
1 answer
532 views

Ubuntu Desktop: Why the .profile script is executed in an interactive non-login shell?

I understand about the difference between Interactive login and Interactive non-login According with this excellent post: Zsh/Bash startup files loading order (.bashrc, .zshrc etc.) we have the ...
user avatar
0 votes
0 answers
104 views

Where is the path for the java command defined in Ubuntu?

I am struggling to get my Ubuntu 20.04 to get to recognize the correct java version. I have set the correct environmental variable inside a shell script in /etc/profile.d/ My $JAVA_HOME output: root@...
user avatar
0 votes
1 answer
63 views

.profile suddenly doesn't like comments [duplicate]

I'm running Xubuntu 20.10 on a MBA 2012. I wanted to use my GTK theme on a QT program, so I did a little searching and ended up with adding export QT_QPA_PLATFORMTHEME=gtk2 to my ~/.profile. That ...
user avatar
0 votes
0 answers
33 views

All Input Methods frozen, how to edit .profile file

I was trying to permanently disable the touchscreen on my ubuntu 20 by writing the following code in my .profile file : xinput disable $16 // for my touchscreen device Now after rebooting all of my ...
user avatar
0 votes
0 answers
242 views

Error found while loading /etc/profile, Ubuntu 20.04

Every time I boot up and Sign in to the account, before getting the desktop screen, I get this error message. I tried looking up stackoverflow & askubuntu but all were different from my error. ...
user avatar
0 votes
0 answers
86 views

dot gitconfig file not reflecting when switch user on ubuntu 20.04 lts

gitconfig not reflecting after switching to user Today i have installed Ubuntu20.04LTS . In that i had a user bob and his git config is like user.name=Bob B user.email=bob@example.com alias.unadd=...
user avatar
0 votes
2 answers
213 views

20.04 "Error found when loading /home/user/.profile Failed to write reboot parameter file" after boot

Every time I boot into Ubuntu I get this error message Error found when loading /home/user/.profile Failed to write reboot parameter file: permission denied Everything seems to work normally ...
user avatar
0 votes
0 answers
209 views

Error found when loading /home/[username]/.profile, tput: No value for $TERM and no -T specified

When I login to my system, I got this popup: Error found when loading /home/[username]/.profile: tput: No value for $TERM and no -T specified As a result the session will not be configured correctly....
user avatar
2 votes
2 answers
2k views

Remove brew completely from my system

I interrupted the execution of homebrew while installing. Consequently, I ran into a problem mentioned here Error found when loading /home/user/.profile:. I had to comment eval statements in the ...
user avatar
  • 147
0 votes
1 answer
864 views

Error found when loading /home/user/.profile:

Previously, I was needed to install homebrew. I opened the terminal and executed the command for it. However, it was taking to long and I was also short on the data limit. So, I interupted the ...
user avatar
  • 147
0 votes
1 answer
51 views

How do I run a command with uxterm after running ~/.bashrc lines in Ubuntu 18.04?

My ~/.profile file has the following code source ~/.bashrc When I run the following command, uxterm firefox I do not see any log of the lines of the file ~/.bashrc on the corresponding uxterm window ...
user avatar
4 votes
3 answers
949 views

Which bash profile file should I use for each scenario?

I have seen many detailed explanations on how .bashrc, .bash_profile and the various other profile files interact, so I'm not after an explanation of how they fit together (I've read many such ...
user avatar
  • 243
0 votes
0 answers
36 views

Where are profile files sourced?

I am setting PATH LD_LIBRARY_PATH in my ~/.profile and expect these variables to bet set system-wide (for my user at least). However, upon inspection I find PATH is set correctly but LD_LIBRARY_PATH ...
user avatar
  • 145
0 votes
1 answer
30 views

Can I run apt apt-mark in .profile script?

Can I run an apt-mark command in home/.profile? I added the line as it works in the terminal (apt-mark showmanual >> ~/installed_packages.txt) but after I logged out and tried to log back in, ...
user avatar
  • 390
0 votes
1 answer
246 views

Ubuntu 18.04 Login Loop .- bashrc and .profiles edited

When I enter my password on the login-screen, the screen goes black for a couple of seconds before it returns to the login-screen. I.e. login loop. I can log-in through remote desktop and SSH (puTTy). ...
user avatar
  • 1
0 votes
1 answer
329 views

Including ssh-agent in .profile at boot

I am using 20:04 desktop and have added some code to .profile to start ssh-agent. If this code is present, I get what appears to be a spurious error message saying that an error occurred. The script ...
user avatar
  • 1,168
5 votes
1 answer
1k views

`alias` command in `.profile` not recognized until `source .profile` is called

I have the following line in my .profile file in my home directory: alias flux='redshift -O 2500' But whenever I login and type flux I get a flux is not a recognized command. I then do a source ....
user avatar
  • 153
2 votes
1 answer
1k views

Is ~/.profile read? [duplicate]

I'm quite a newbie, but I know every time you start Terminal, some files are taken into account; and among those there is ~/.profile, which contains the following lines: if [ -d "$HOME/bin" ]...
user avatar
  • 123
1 vote
1 answer
319 views

.profile not beeing sourced

some time ago I installed byobu and ran byobu-enable and it still didn't started automatically, I just ignored it since I could just press super and open up byobu terminal directly. But now I tried to ...
user avatar
0 votes
0 answers
154 views

Help me find the source of this item in my $PATH

When I start a new shell, I end up with the following $PATH: /home/ldt/.local/bin:/home/ldt/bin:/home/ldt/.pyenv/plugins/pyenv-virtualenvwrapper/shims:/home/ldt/.pyenv/libexec:/home/ldt/.pyenv/...
user avatar
  • 111
1 vote
1 answer
1k views

Set global environment variables from a custom file

I am trying to execute a file containing environment variables so that whenever I log in, those variables are immediately accessible. The $PATH variable is defined in /etc/environment so underneath ...
user avatar
0 votes
1 answer
164 views

how to retrieve profile in ubuntu 18.04 [duplicate]

I accidentally deleted the .profile in my Ubuntu 18.04 today. How to retrieve this. regards,
user avatar
5 votes
3 answers
3k views

How to fix ~/.profile and ~/.bashrc syntax errors

Ubuntu 18.04.4 (automatic upgrade from 18.04.3 just a few weeks ago) /bin/bash After I log in from the Gnome shell, this message appears while the screen is just plain purple and before the desktop ...
user avatar
2 votes
2 answers
658 views

The same string twice in the $PATH environmental variable

When I run $PATH on my terminal in Ubuntu 18.04.3, it displays the following: /home/ubuntu/bin:/home/ubuntu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/...
user avatar
  • 1,755
1 vote
0 answers
3k views

how to run or re-load /etc/profile.d/ scripts?

From within the GUI, I'm seeing this result: My problem is exactly that this does not happen in the terminal run under the graphical user interface; neither in Ubuntu 16.04.3 or 18.04. – Thomas ...
user avatar
  • 4,343
0 votes
1 answer
411 views

Ubuntu 18.04 boot error: syntax error :unexpected end of file when loading .profile

I am unable to do anything after this dialog box appears: /home/hp/.profile: line 31:syntax error :unexpected end of file As a result the session will not be configured correctly. You should fix the ...
user avatar
3 votes
2 answers
1k views

Syntax error when signing onto the bash subsystem (WSL)

I am trying to sign onto the bash Windows Subsystem for Linux when I get this error: -bash: /home/User1/.profile: line 28: syntax error near unexpected token `(' Before getting this error I was ...
user avatar
0 votes
1 answer
196 views

Why doesn't gdbus output work when invoked from ~/.profile?

If I open a terminal and run the below script, it works fine. The values from the gdbus call get written to the lockScreenTest.txt file. The values are true when the screen is locked and the values ...
user avatar
  • 801
0 votes
1 answer
432 views

Stata installation: how to add stata to the .profile PATH?

I am completely new to Linux and have no idea what to do. What I am trying to do is the following: I want to install Stata 16 on Ubuntu 18.04.3 LTS 64-bit. I followed the stata installation guide and ...
user avatar
  • 3
0 votes
1 answer
405 views

Error found when loading /etc/profile [mariadb,mysql]

Booting to Ubuntu 19.04 I get black screen (frozen and not able to press the OK button) with this error message popup: Error found when loading /etc/profile find:'/usr/lib/mysql/plugin/...
user avatar
0 votes
0 answers
49 views

Making a file run every time an user account is logged in and also every time the user is switched in ubuntu 18.04

I'm a beginner to Ubuntu, working on a script to save the current user name in a file in /tmp.. Previously I've used /etc/gdm3/PostLogin/Default script to do this #!bin/sh current_user= "$...
user avatar
0 votes
0 answers
425 views

Environmental Variables are not reflected until restarting the machine

I know there are similar questions for mine, but still they weren't helpful with my issue. Scenario: I set a variable in either ~/.bashrc ~/.profile /etc/environment Whether the variable is assigned ...
user avatar
1 vote
1 answer
937 views

Ubuntu 19.04 .bash_profile doesn't exists

I'm trying to setup the WP-CLI completion from their site but I couldn't find the ~/.bash_profile file in my home directory and I tried the instructions with the ~/.bashrc file, I followed the zsh ...
user avatar
1 vote
2 answers
2k views

how to add .sh file or path to .profile to run my app?

In home I have a project folder nomse/bin/main.dart. in terminal. If I use command like, dart nomse/bin/main.dart I can run my app. UPDATE-1: I need to add path to .profile so I can run my app ...
user avatar
  • 113
0 votes
1 answer
1k views

Error in source ~/.profile [closed]

~/.profile (line 25): Missing end to balance this if statement if [ -d "$HOME/local/bin" ] ; then ^ from sourcing file ~/.profile called on standard input source: Error while reading file “/home/...
user avatar
  • 1
1 vote
1 answer
1k views

`exec /bin/bash -il` fails in .profile

The Bash manpage says: After reading that file (/etc/profile), it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that ...
user avatar
0 votes
1 answer
2k views

Export path working from terminal but not bash script

If I run export PATH=$PATH:/home/mike/bin/*:/home/mike/app/* from a command line it works fine, but if I put it into a bash script, it doesn't work (even with a restart). I have also tried including ...
user avatar
0 votes
1 answer
360 views

Ubuntu 18.04 on startup error, [-f: command not found

I booted to installed Ubuntu 18.04 on my system and faced the error and pressing Ok button does not work The only thing I did was following the react-native installation instruction: created a ....
user avatar
0 votes
1 answer
1k views

How can I change $ to > in terminal? [duplicate]

In any terminal there is specific meaning of puneet@Puneet-Ubuntu-PC:~$I want to replace '$' symbol with '>'. Please guide me How can I make this change.
user avatar
0 votes
1 answer
1k views

Ubuntu 18.04 boot error: syntax error: unexpected end of file when loading .profile [duplicate]

I can't figure out what is wrong with my Ubuntu 18.04. I was trying to set a path for an application in my .profile and restarted the machine. Since then, I've been getting this error on the screen. I ...
user avatar