First go here about:config
Find:
CODE
browser.tabs.closeWindowWithLastTab
Right click selecting toggle, this will set it to false which is what we want.
Now go to your profile folder you can just paste this into run. %AppData%\Mozilla\Firefox\Profiles\
Once open navigate to the Chrome folder and find userChrome.css.
If you do not have one, you can rename userChrome-example.css and use it.
Now open that file with your favorite editor.
Paste this code at the bottom.
CODE
/* Add tab-close-button to last tab*/
.tabbrowser-tabs[closebuttons="alltabs"] > .tabbrowser-tab > .tab-close-button {display: -moz-box!important;
}
.tabbrowser-tabs:not([closebuttons="noclose"]):not([closebuttons="closeatend"]) > .tabbrowser-tab[selected="true"] > .tab-close-button {display: -moz-box !important;}
.tabbrowser-tabs[closebuttons="alltabs"] > .tabbrowser-tab > .tab-close-button {display: -moz-box!important;
}
.tabbrowser-tabs:not([closebuttons="noclose"]):not([closebuttons="closeatend"]) > .tabbrowser-tab[selected="true"] > .tab-close-button {display: -moz-box !important;}
Save on exist and restart Firefox.
You will now have your x button back were you will be able to close the first tab without having to open a new tab.