09.09.2018

I am trying to use as my login shell in Ubuntu (using chsh). I noticed that it does not read $HOME/.rcrc file on startup. The documentation says that if invoked as a login shell with either *argv[0] == '-' or with -l flag, it reads the.rcrc file, and I can verify that by executing it directly by $ rc -l. Or from zsh ARGV0=-rc /usr/bin/rc. However when executed on login, it does not read the.rcrc file, and ps output indicates that the shell name is just 'rc' not '-rc'.

Login

Free mp4 video converter for mac os x el capitan. Thus my question is, how to get /usr/bin/rc to read.rcrc at startup? And why is ubuntu not prefixing '-' to the shell? Is there a different way to detect the shell is a login shell? Linux terminal emulators on the GUI do not usually open login shells by default as opposed to e.g. OS X's Terminal. If you press Ctrl Alt F1 and log in on the command line, you'll have a login shell whose.rcrc commands will be executed. In Ubuntu's Terminal, go to Edit » Profile Preferences » Title and Command » Run command as a login shell.

Rvm installation not working: “RVM is not a function”. You need to check the option 'Run as login shell' in the Gnome terminal's settings. It is required to open new terminal after this setting the flag. ' will not work. You need to change your terminal emulator preferences to allow login shell. Sometimes it is required to use `/bin.

Allow

Alternatively, your terminal emulator might support execution of an arbitrary command. Use /usr/bin/rc -l. You can also create a short script that simply launches rc as a login shell: #!/bin/bash exec -l /usr/bin/rc '$@' This will start bash to execute the script, and the script replaces it completely with rc invoked as a login shell ( -l argument), plus all other arguments to this script. You could also add the -c argument to sanitize the environment. Save as /usr/bin/rcl, make executable, and add a corresponding entry to /etc/shells.

W hen working with Linux, Unix, and Mac OS X, I always forget which bash config file to edit when I want to set my PATH and other environmental variables for my shell. Should you edit.bash_profile or.bashrc in your home directory? You can put configurations in either file, and you can create either if it doesn’t exist. But why two different files? What is the difference?

According to the,.bash_profile is executed for login shells, while.bashrc is executed for interactive non-login shells. What is a login or non-login shell? When you login (type username and password) via console, either sitting at the machine, or remotely via ssh:.bash_profile is executed to configure your shell before the initial command prompt. But, if you’ve already logged into your machine and open a new terminal window (xterm) inside Gnome or KDE, then.bashrc is executed before the window command prompt.bashrc is also run when you start a new bash instance by typing /bin/bash in a terminal.

Why two different files? Say, you’d like to print some lengthy diagnostic information about your machine each time you login (load average, memory usage, current users, etc). You only want to see it on login, so you only want to place this in your.bash_profile. If you put it in your.bashrc, you’d see it every time you open a new terminal window. Mac OS X — an exception An exception to the terminal window guidelines is Mac OS X’s Terminal.app, which runs a login shell by default for each new terminal window, calling.bash_profile instead of.bashrc. Other GUI terminal emulators may do the same, but most tend not to. Recommendation Most of the time you don’t want to maintain two separate config files for login and non-login shells — when you set a PATH, you want it to apply to both.