Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [bashrc]

.bashrc is the primary configuration file for the bash shell.

3
votes
1answer
200 views

RH software collections enable for command run with sudo

We are using RH software collections for python34 and have the following in /etc/profile.d/scl_enable_python34.sh source scl_source enable rh-python34 This works perfectly for interactive users. ...
3
votes
1answer
67 views

What controls the home directory in applications like Geeqie and Thunar?

I have a line in my .bashrc that cd's to a specific directory. For as long as I can remember, this only changed the directory in which terminal sessions began. But then at some point recently, GUI ...
3
votes
1answer
841 views

Invoke subshell command with loaded rcfile

I have some Python code that does: (this is a simplified version) shell = os.environ['SHELL'] os.environ['PATH'] = ... # some new PATH value if call(shell, '-c', '...
2
votes
1answer
256 views

How to configure bashrc to close all tmux sessions when I close the terminal?

I'm using Gnome Terminal and tmux and I'd like that all tmux sessions were closed when I close the Gnome Terminal, is that possible? I checked the Arch Wiki article on tmux and found some relevant ...
2
votes
1answer
664 views

Can I use an environment variable to define an alias?

I'm using an automation engine to run perl scripts. script_X requires a wrapper script so it's run like: wrapper_script script_X --parameters But the automation engine can't understand that ...
1
vote
1answer
239 views

Set the environment variable in bashrc for preferred PDF viewer

I am currently remoted into my linux workstation's command line environment (bash shell) using SSH with X11 forwarding enabled. I am using the mendeley citation manager's desktop application to ...
1
vote
1answer
880 views

~/.bash_profile being executed for non-login shells

My bash_profile looks like: takeapic #print status #do other stuff source ~/.bashrc For some reason, every terminal emulator I call executes this script. Shouldn't it be executed only once, when I ...
1
vote
1answer
498 views

How to execute in-line commands through ssh

I'm struggling to execute commands through ssh, especially aliased command. The alias I need is ldocker which is set in the remote .bashrc. So far I tried: $ssh bugs2 '. .bashrc && echo "--"...
1
vote
1answer
260 views

My terminal is pure white // removal of the things spf13 has done to my Ubuntu

I have installed spf13 by using the command: curl http://j.mp/spf13-vim3 -L -o - | sh I didn't liked what I got, so I tried to get rid of it. I managed to get to my previous VIM configuration, but ...
0
votes
1answer
40 views

Multi-line commands are messed up in my PS1

declare __host='\[\e[30;102m\] \h \[\e[0m\]'; declare __dir='\[\e[1;97;44m\] \w \[\e[22m\]'; declare __arrow='\[\e[1m\]▸ \[\e[0m\]'; function __git_status() { local info; info=$(__git_info) &&...
0
votes
1answer
150 views

Is there a way to bind a key to a control-sequence in bash?

In my .bashrc file I'm trying to bind a custom escape-sequence key to a control-sequence. What I have is: bind -x '"\eJD0C": "^C"' And it does not execute the shell control-sequence ^C which ...
0
votes
1answer
93 views

opening vim with custom location for .vimrc

I have my .vimrc file in a custom location (~/dotfiles/vim/.vimrc). When I type i: vim 'filename' I would like to execute the command: vim -u ~/dotfiles/vim/.vimrc 'filename' I put this function ...
0
votes
1answer
40 views

How to ignore keys pushd

I have a bash script in which it is necessary to specify keys and parameters. I created a command for it using alias. alias command="pushd /path; ./somescript.sh; popd" After the script does the ...
0
votes
1answer
385 views

Tmux - Arrow keys return raw data/non-escaped caracters ^[[A ^[[B ^[[D ^[[C

I just updated to Debian/Linux 9 (Stretch) and am in the process of setting everything up. So far I've only installed vim and tmux. My problem is that when I use the arrow keys, they return raw data/...
0
votes
1answer
43 views

unable to delete dir from PATH

I once had in ~/.bashrc PATH=$PATH:$HOME/projects/bin I deleted this line long ago from ~/.bashrc but still any terminal that I open this path continues to appear ? How to permanently delete it ...
0
votes
1answer
114 views

Where you set path for golang or java in ubuntu?

In some tutorials path is set in ~/.profile however in some other tutorials they use etc/path or ~/.bashrc, can you explain whats the difference and how it works in linux.
0
votes
1answer
61 views

I can't find .bashrc on distro astro

I'm using distro astro 3, I tried to add something to .bashrc but I couldn't find it. When I ran the command ls -a ~, I could find only .bash_history & .bash_logout should I create a .bashrc or ...
0
votes
1answer
1k views

Execute script in new gnome-terminal loading bashrc

I have a script in a gnome-terminal shell and I would like to open a new terminal, load the bashrc configuration, execute a new script and avoid the closure of the new terminal window. I have tried ...
0
votes
1answer
334 views

Clear / Reset console at start up

I'm using Bash Windows 10 Bash (WSL). I need to put echo -e '\e[9999H' at the beginning of my .bashrc script in order for it to have 24-bit colors in ConEmu. This unfortunately makes my prompt start ...
0
votes
1answer
78 views

Store a new variable using awk in my bashrc file

I am writing an alias for my .bashrc that fetches my terminals TTY number from my list of processes by greping the ps output and doing an runs an awk code on the result as described below: alias ...
0
votes
1answer
99 views

Which shell configuration files are read for the shell started with “sudo -i”?

According to man sudo sudo -i starts a login shell and should in my understanding read/source ~/.profile, i.e. /root/profile or [non-root user home/.profile and /etc/profile. Adding aliases, e.g. ...
0
votes
1answer
400 views

Showing color in log output using tail command when using Cygwin?

I have a debian install that runs an application server. I ssh into this debian install from a Windows computer using cygwin and with the application server running I use tail -f to monitor the log ...
0
votes
1answer
268 views

how to get terminal to show root prompt in su

I am logged into a (normal) user, but when I go su : password my normal promt goes into showing me this instead of what it should. how to I fix this? ターミナル 10:15 AM (~) $ su Password: \033[1;...
0
votes
1answer
132 views

Why don't I get my bash customizations when I log in normally?

My user's shell prompt is stuck as [bash-4.2]$ and many useful commands like ll don't work on that bash-4.2 shell. I tried the chsh command and usermod commands, but neither fixed this. I've checked ...
0
votes
1answer
250 views

Problem with loading settings from .bashrc

I have a strange problem with terminal settings. I am a Debian 3.16.7 user. I saw the .bashrc file using ls -a but I couldn't open it (no file comunicate), so I restored it from /etc/skel/.bashrc. ...
0
votes
1answer
48 views

Unexpected output after switch to root

Does somebody know, why I get -ne (probably param from echo from section of setting PROMPT_COMMAND line 23) after I switch to root? Here is my /etc/bashrc. Bash 3.2.51, OS X 10.9    &...
-1
votes
1answer
562 views

Terminals like Terminator or Guake terminal are not able to parse prompt profiles for git which is set in .bashrc file

Terminals like Terminator or Guake terminal are not able to parse prompt profiles for git which is set in .bashrc file. PS1 variable is not set for terminals which use xterm as base which guake and ...
5
votes
0answers
453 views

Monitor exit code in tmux

Is there a way to update tmux window attributes based on command exit status? Similar to activity monitoring, I would like the title to change color when a command exits, say, green for success and ...
4
votes
0answers
121 views

xmodmap key bindings reset when I open a new tab in the shell

When I open a shell in ranger with shift-s, open vim and then open a shell with :sh or open a new shell tab with ctrl-shift-t, my xmodmap keybindings (swapped caps lock and escape keys) are reset. ...
2
votes
0answers
24 views

What configuration is loaded at login after user config?

I’m trying to bootstrap Gentoo Prefix and I’m hitting a snag because Prefix insists that LD_LIBRARY_PATH is unset in a login shell. So I put unset LD_LIBRARY_PATH at the very end of both my ~/....
1
vote
0answers
27 views

su - <username> hangs if I added a line in /etc/bashrc

I added this line to /etc/bashrc file export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/glibc-2.14/lib I log in as root throw SSH normally, but if I wanted to change my user by su - myusername the ...
1
vote
0answers
48 views

Export vars env to tmux's window/session/pane's env

Is there any way to export/upgrade list of variable env from a file or something to tmux's window/session/pane? Here I have to manually source .bashrc to update new var env to each tmux's pane.
1
vote
0answers
33 views

Display not working for any user except root on tool vnc for Os Suselinux

I was trying to install SAP Hana Data provisioning agent for which SAP Note said that we need a non-root user who should have read/write access to /usr/sap folder and display access. So I started ...
1
vote
0answers
67 views

How to run vim with a color file from an uncommon place?

I try to make a bash alias like this : alias vi='vim -u /path/to/conf/.vimrc' It works well, but if I add the color file, it failed : vim -u /path/to/conf/.vimrc -S /path/to/conf/colors/foobar.vim :...
1
vote
0answers
429 views

Why can't I add this custom Node PATH to /etc/profile.d scripts?

I may have a problem in the include chain for the profiles, or something may be awry in either my system, or my understanding of profile.d (RHEL7). I added a /etc/profile.d .sh script which is for a ...
1
vote
0answers
158 views

bash history truncated to 2000 at new login after upgrade to ubuntu 16.04

Ubuntu 14.04 with this setup worked fine . Recently re installed my laptop with ubuntu 16.04 and every time I create a new terminal , the history get truncated to 2000 lines. I use both Tilda and ...
1
vote
0answers
1k views

Added anaconda2 lib to LD_LIBRARY_PATH, results in “no version information available” warning

To compile a program (Caffe) I added my anaconda2 libraries to .bashrc as follows: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/anaconda2/lib/ However, now when I run ls or find I get the ...
1
vote
0answers
911 views

tmux not executing ~/.bash_profile on start up

I searched the net and many people complained that tmux wasn't executing their .bashrc. The solution thats suggested everywhere was to source .bashrc from within .bash_profile cos tmux launches bash ...
1
vote
0answers
2k views

CentOs7 Python 3.4 Install Method

This post relates to this question where I was asked to explain how I installed python3 on my system. I was attempting to install python3 on my system for development purposes. Something went wrong ...
1
vote
0answers
588 views

Unable to source .profile and .nvm/nvm.sh from .bashrc

I have configured my Ubuntu 14.04 with dotfiles found here Mathias Dotfiles. Everything is going smooth, I installed both RVM(Ruby Version Manager) and NVM(Node Version Manager). In order for both of ...
1
vote
0answers
550 views

Dynamically Source Bash & Profile Files Across Multiple Enviornments

I'd like to come up with a way to always source the user's profile and bash configuration files upon a interactive login or non-interactive login despite what file structure they may have. It would ...
0
votes
0answers
17 views

Can some or all profile/login scripts be bypassed on local console login?

The situation I'm thinking of is that something in /etc/profile or ~/.profile or ~/.login or similar is causing you to be logged out immediately or some other problem/mischief, and you're at a text-...
0
votes
0answers
82 views

Is a .zshenv or .zprofile necessary for a proper/function zshell?

I have an issue where every terminal I open up has the first line: $home/.zshrc:1: command not found: followed by whatever I have as the first line in my .zshrc file. (See "What changes to a .zshrc ...
0
votes
0answers
36 views

Modifying .bashrc to send history to syslog, problems with quotes

Attempting to enable logging of bash commands to syslog, including the ip of the logged in ssh user. The end goal is to have a script which will echo 'export PROMPT_COMMAND=....'' >> ~/.bashrc ...
0
votes
0answers
45 views

Sourced .bashrc detection

At the user level is there a way for me to craft a sort of 'tripwire' in my .bashrc file to detect if another user has sourced my .bashrc? What I would like to do is have some sort of log created ...
0
votes
0answers
19 views

Ending slogin session with exit command freezes due to PROMPT_COMMAND modification

I recently embedded an "alert" command into my PROMPT_COMMAND to give me a little notify-send screen notification with the exit code of each command (because I always forget to append the alert when a ...
0
votes
0answers
148 views

How to set environment variables to path so it can be read from GUI and command line from the same program?

I installed texlive and I want to add it as an environment variable to my Path so that Emacs AucTeX can read it when I start emacs from the GUI or from the command line. So far I've read that emacs ...
0
votes
0answers
1k views

“fastboot: usage :no command” error when running fastboot standalone

As we know, recently Google released binaries of ADB/Fastboot which now can be downloaded separately. Everywhere they write you can use them as is from the directory (i.e. "just works"), however I ...
0
votes
0answers
195 views

Sharing zsh and vim configuration with root user

I have modified my .zshrc and .vimrc to my likings. Both files source other files containing more configuration and plugins (vundle, antibody). Now I would like to use these configurations when I ...
-1
votes
0answers
1k views

Debian: mvn command not found

I am attempting to install Maven in my Debian 7 environment, but even having followed the instructions from this video, I can't seem to get Maven working. I have the folder apache-maven-3.1.1 in my /...