Tag Info

New answers tagged

0

Currently, as I have not found an actual fix, my temporary workaround is to not invoke tmux in my .bashrc. I've created an alias t for tmux so that once I open a terminal window I can just type t[return] to enable tmux for that session.


3

From Debian's bash README: What is /etc/bash.bashrc? It doesn't seem to be documented. The Debian version of bash is compiled with a special option (-DSYS_BASHRC) that makes bash read /etc/bash.bashrc before ~/.bashrc for interactive non-login shells. So, on Debian systems, /etc/bash.bashrc is to ~/.bashrc as /etc/profile is to ...


1

From man bash: When an interactive shell that is not a login shell is started, bash reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if these files exist. This may be inhibited by using the --norc option. The --rcfile file option will force bash to read and execute commands from file instead of ...


-1

Of course, you should not import a user's .bashrc into a script that runs as root at system startup. Two suggestions: Write a script to launch the service (let's say mystart.sh) . That script can source the .bashrc, then start the app: #!/usr/bin/bash . .bashrc hypnotoad app To run that script at startup, I suggest use the user's crontab. Have the user ...


0

I quick search found these resources: How to uninstall How to uninstall spf13 vim distribution If you have saved your own configuration, it should be enough to remove the following files and directories, and restore your own, pre-spf13 configuration: ~/.vimrc ~/.gvimrc ~/.vim/


2

(Just as a guideline, the format is not exactly the same): ll=$(last -1 -R $USER | head -1 | cut -c 20-) export PS1="last login time [$ll]"'\n\h:\W\$ ' Edit: if you want last information to be printed only once (wise idea) ll=$(last -1 -R $USER | head -1 | cut -c 20-) echo "last login time [$ll]" # adjust to your login messages, fortunes, etc ...


2

Are you sure that the su - dummy is executed when you login?  Are you sure that your .bashrc is processed when you login?  bash(1) says, When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists.  After reading that ...


6

Please have a look at bash manual: /etc/profile The systemwide initialization file, executed for interactive login shells /etc/bash.bashrc The systemwide initialization file, executed for interactive, non-login shells. ~/.bash_profile The personal initialization file, executed for interactive login shells ~/.bashrc The individual per-interactive-shell ...


1

I can't speak for other distributions, but Ubuntu has a file, /etc/environment, that is the default search path for all users. Since my computer is only used by me, I put any directories that I want in my path there, unless it is a temporary addition that I put in a script.


1

See if this helps. .bashrc always executes everytime an interactive non-login bash instantiates so use .bash_profile instead so it would only run once during login to ssh. If the script or processes of the script summons bash, it would cause repeated summoning. So instead of putting that line in ~/.bashrc put it in ~/.bash_profile and see if you only ...


5

The second line “sources” the .bashrc script; that means it loads and executes its contents in the same shell context. The result is the same as putting the contents of .bashrc in .bash_profile. This statement is useful because the two files are used in different contexts: .bash_profile is executed when bash starts as a login shell, whereas .bashrc is ...



Top 50 recent answers are included