# gnome-terminal instantly closes after messing with the profile settings

I am using Gnome Terminal in Ubuntu 14.04 and I modified the profile preferences, setting it to start with a custom command instead of the default. I can't remember what that custom command was, but now when I launch the terminal, it instantly closes.

Is there any way to change the profile preferences in terminal without having it open?

• What command did you set it to, because I bet the 'command' is running and then terminating automatically, which is going to cause problems all the time. – Thomas Ward Mar 10 '15 at 2:48
• This is being marked as "offtopic" in that it can't be reproduced nor can it be useful in the future. The OP has commented in an answer that they fixed it themselves. If the OP posts their 'solution' as an answer then I may remove that close vote, however it does not appear this question in the form it's in will be useful to future readers. – Thomas Ward Mar 10 '15 at 2:57
• @ThomasW. it can trivially be reproduced e.g. by setting the default profile's 'Custom command' to /bin/false – steeldriver Mar 10 '15 at 3:01
• @steeldriver but as it currently is in its current form, it's not relevant or useful to future readers. As well, it could also be "Unclear" or "Too Broad", it could fall into multiple close reasons. – Thomas Ward Mar 10 '15 at 3:02
• @ThomasW. I would concede that the title is unclear, however the body of the question seems clear enough to me. – steeldriver Mar 10 '15 at 3:12

You can manipulate the gnome-terminal settings programmatically using gconftool e.g. to restore the settings of the default profile

1. open a plain xterm from the dash
2. execute gconftool --recursive-unset /apps/gnome-terminal/profiles/Default

Delete everything in ~/.gconf/apps/gnome-terminal/ folder. Profile preferences are stored there. In nautilus make sure you enable viewing hidden files and folders to actually find .gconf directory

• Nevermind I got it fixed – Listener Mar 10 '15 at 2:52

Create a file named 'something.desktop' and add the following code. If you are familiar with the commands on launching the 'something.desktop', it will list all the files in the home directory in a terminal.

And, make sure to make 'something.desktop' executable. Fro making any file executable the code is

chmod +x /path/to/your/something.desktop


Edit it with your own values

[Desktop Entry]
Type=Application
Name=IPT
GenericName=IPT
Comment=IPT Desktop icon developed by Mritunjay
Categories=Network;Security;
X-KeepTerminal=true
Icon=/usr/img/ip.png
Exec=gnome-terminal --tab --title="List files" --command="bash -c '/home; ls; \$SHELL'"

NoDisplay=true


I have answered it on U&L also.

• Yeah, it is my answer. Well, thanks for the edit. – Mrityunjay Kumar May 12 at 4:43