-3

I'm using Linux Mint. When I click on terminal, it doesn't open (there is no response.)

How can I open it? Below information may be useful:

Kernel: 4.4.0-21-generic x86_64 (64 bit) Desktop: Cinnamon 3.0.6

Distro: Linux Mint 18 Alex

I have tried what suggested here, but it didn't solve the problem. It returns:

gnome-terminal is already the newest version (3.18.3-linuxmint1)

EDIT: It is very odd, because I have created another account and in new account terminal can be opened.

  • Compare the shell initialization files between the two accounts. If the shell fails or exits while running e.g. .bashrc, it may prevent the terminal from starting. – Kusalananda Apr 07 '18 at 13:50
  • How can I do that? @Kusalananda – Alexander Fill Apr 07 '18 at 13:52
  • How can I "Compare the shell initialization files between the two accounts."? @Kusalananda – Alexander Fill Apr 07 '18 at 13:53
  • Log into the account whose terminal works and look at the two sets of files and/or run a diff on them. The two sets of files being the shell initialization files on the two accounts. – Kusalananda Apr 07 '18 at 13:55
  • where can I find "two sets of files"? @Kusalananda – Alexander Fill Apr 07 '18 at 13:57
  • Please help me. I don't know how to get rid of this problem @Kusalananda – Alexander Fill Apr 07 '18 at 14:06
  • On the account where the terminal does not open, the shell's initialization files (either .bashrc or .bash_profile) may be broken somehow, or there may be some other configuration that is not correct. You never told us what you changed before this started happening (it does not happen by itself). Until you have given more information and looked into the possible issues that I have mentioned, I'm going to vote to close this question as "too broad". – Kusalananda Apr 07 '18 at 14:20
  • I don't know what have I done which has made it not work. I have also searched alot, but I didn't find any useful thing @Kusalananda – Alexander Fill Apr 07 '18 at 14:28
  • There is no .bash_profile in .bash folder @Kusalananda – Alexander Fill Apr 07 '18 at 14:29
  • In your home folder, there will be a file called .bash_profile and/or another called .bashrc You view their contents from inside your home directory with cat .bash_profile or cat .bashrc Compare them for each user and see if there's anything different. – Nasir Riley Apr 07 '18 at 15:48
  • I can find .bashrc in the account in which terminal doesn't open, but there is no .bashrc in the other account @NasirRiley – Alexander Fill Apr 07 '18 at 19:02
  • Is there a .bash_profile? – Nasir Riley Apr 07 '18 at 19:37
  • No, there isn't @NasirRiley – Alexander Fill Apr 07 '18 at 19:41
  • Then I recommend what the others have suggested which is to rename your .bashrc file or comment out it's contents and see if that fixes the issue. Worst-case scenario, if you have root access, you can just wipe the account out and recreate it. – Nasir Riley Apr 07 '18 at 23:29
  • This is an unanswerable question, as it does not give any log contents or error messages that GNOME Terminal will have written. Contrast better questions such as https://unix.stackexchange.com/questions/413880/ and https://unix.stackexchange.com/questions/344617/ . – JdeBP Apr 11 '18 at 07:58

1 Answers1

2

As the commenters have mentioned, things in your bash startup files (~/.bashrc, ~/.bash_profile) could be causing your shell to exit instantly, which could be causing the terminal emulator to instantly close.

It working properly on another account without a .bashrc suggests that something in your .bashrc is causing this.

If this is the case, renaming your .bashrc file should allow you to open your terminal emulator. You can then try to isolate the error by removing parts of your .bashrc until it starts up normally, or you can try using shellcheck.

boxama
  • 56
  • It doesn't need to be an issue in a shell startup file, but it's a very real possibility. For example, the result of a botched edit. – Kusalananda Apr 07 '18 at 21:04
  • I renamed bashrc but it didn't solve the problem – Alexander Fill Apr 08 '18 at 04:15
  • @AlexanderFill try opening a TTY (I think a shortcut should be Ctrl+Alt+F2), and logging in to the account that isn't working, to see if bash is working there – boxama Apr 08 '18 at 09:40
  • When I opened TTY, how can I check if the bash is working ? @boxama – Alexander Fill Apr 09 '18 at 04:37
  • 1
    @AlexanderFill if you can sign in and the bash prompt appears without error, it is working. To test your terminal emulator try DISPLAY=':0' gnome-terminal to open it on your X display. If that's failing you should get some error message at least – boxama Apr 09 '18 at 09:50
  • It is what it returns: Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Terminal exited with status 9 @boxama – Alexander Fill Apr 15 '18 at 04:54
  • 1
    @AlexanderFill sounds similar to https://stackoverflow.com/questions/24735447 – boxama Apr 15 '18 at 15:18
  • I typed sudo localedef -f UTF-8 -i en_US en_US.UTF-8 in komsol but terminalstill doesn't start @boxama – Alexander Fill Apr 15 '18 at 15:24
  • @AlexanderFill The answers also tell you that a restart is necessary to apply changes. Also, check the contents of /etc/locale.conf to check it contains what is expected. – boxama Apr 15 '18 at 15:29