My ubuntu terminal is not opening for unknown reasons. The last thing I remember is that I removed the old snap using this link. My terminal starts and suddenly crashes without showing any error. Things that I've tried:
- I tried reinstalling gnome-terminal using grub safe-mode and entering root.
- I tried the following command using alt+f2:
env SHELL=/bin/sh gnome-terminal
and I was able to open the terminal (not bash shell though). Now if I run bash I get the following error:
bash: VIRTUAL_ENV: unbound variable
I don't remember changing anything related to python or virtualenvs, or changing .bashrc or .profile. Now I'm stuck and I can't use bash. Even the TTY terminals are not working (jumps back to login after login).
If you need any extra information, please let me know. Thanks in advance.
gnome-terminal
application, they would get acommand not found
error and wouldn't be able to open the terminal at all (here, they can but it crashes) and also wouldn't be able to runsh
manually which they have done. – terdon Oct 28 '22 at 15:09SHELL=/bin/sh gnome-terminal
works, you have an error in your bash initialization files. Please [edit] your question and post the output of runninggrep VIRTUAL_ENV ~/.bashrc ~/.bash_profile ~/.profile ~/bash.login ~/.bash_aliases /etc/bash.bashrc /etc/profile /etc/profile.d/* /etc/environment 2> /dev/null
(you can run this in the terminal you open withSHELL=/bin/sh gnome-terminal
). If that returns nothing, we will need to see the full contents of your~/.bashrc
file. – terdon Oct 28 '22 at 15:11