OpenSUSE: how to login to shell without /bin/bash --login ? (automatically) [closed]

StackOverflow https://stackoverflow.com/questions/19082476

  •  29-06-2022
  •  | 
  •  

Pregunta

I'm programming in Ruby, on latest OpenSUSE.

Every time I open new tab (which I do a lot during the day) - I need to type:

/bin/bash --login

Otherwise it won't load all my settings.

Tried to create alias for that, but aliaces are saved into .bashrc file, so they don't work until I log in.

Is there a way to have terminal login right after I opened a new terminal window?

Tried to make a Bash file:

!/bin/bash
xterm -e "/bin/bash --login"

But I can't go to desktop every time I need to open a new tab.

Does anyone know how to set up OpenSUSE properly?

¿Fue útil?

Solución

Login bash reads ~/.bash_profile, interactive bash - ~/.bashrc. See Bash Startup Files for more details.

When you open a terminal window it starts bash in the interactive mode which makes bash read ~/.bashrc. Settings from ~/.bash_profile are normally read when you log into the desktop, so that when ~/.bash_profile is changed you need to re-login for the changes to apply.

People often make ~/.bash_profile invoke ~/.bashrc as well, so that you get the same environment in both modes.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top