Score:1

Bash terminal is not opening

io flag

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.

Amin Kashiri avatar
io flag
@David No, I don't think that I have removed gnome. That script only removes "disabled" snaps. I still have gnome when I run "snap list".
terdon avatar
cn flag
@David if the OP had removed the `gnome-terminal` application, they would get a `command 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 run `sh` manually which they have done.
terdon avatar
cn flag
@AminKashiri if `SHELL=/bin/sh gnome-terminal` works, you have an error in your bash initialization files. Please [edit] your question and post the output of running `grep 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 with `SHELL=/bin/sh gnome-terminal`). If that returns nothing, we will need to see the full contents of your `~/.bashrc` file.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.