Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So here I am sitting in a big pile of muck...over the last 2 days things have just been going from bad to worse with version of Ubuntu 12.10. So 2 days ago I was fiddling around with kismet and airmon-ng. I had added a bunch of libraries, I remember adding GTK+, Glib, Pango, etc. After restarting the other day my desktop opened fine but my background was changed to the default and none of my files on the desktop were visible and the top bar and side bar were not visible or functioning. The window managers were still working. I then tried reinstalling my nvidia drivers to see if that would change anything, it did not. Then after doing some searching online I found something that suggested I try deleting the file "libgtk-3.so.0". I deleted this and tried to restart the computer. Upon restart, I was greeted by a black screen with some writing saying something about -starting clamAV [OK] -problem with Apache Server could not verify correct...something... - checking battery state [ok]. After it gets to battery state it just stops and sits there indefinitely. So to sum, I cannot login to ubuntu because it just sits at this black screeen. If anyone has any idea as to what is going on and how to fix it please let me know. Thanks!

share|improve this question

1 Answer 1

Ok, take a deep breath.

First let me get in the needed comment about deleting libraries. NEVER EVER EVER delete any library or program in the way you did. Always use apt-get or one of the gui front ends.

Now on to actual helping.

The problem your having is that gtk (the libraries that tell the computer how and where to draw buttons, windows, boxes etc.) has been deleted from your box. Therefor lightdm (the login screen) needs gtk to tell it where to draw it's boxes and it doesn't have it.

Because you deleted the file by hand, your package manager doesn't know that it's not there. To reinstall GTK try:

sudo apt-get install --reinstall libgtk-3-0

If you are never prompted with a login prompt (it will be text) you can press ctrl+alt+F1 to change to a text console. When entering your password it will not sow on the screen. Just type it as normal, and press enter.

Once you reinstall libgtk you need to fix your original problem. First I suggest creating a new user (from the text console) by typing sudo adduser username and following the prompts. This will allow you to test if your settings are wrong or if it's system wide.

If it's just your settings then as your original user mv .conf .conf.old and try to login again (you can press ctrl+alt+F7 to get back to the GUI based login screen).

If it's system wide, you probably messed up your libraries when you installed those libraries you mentioned above. If that is true, your best path to correction is to either uninstall the libraries if you kept track (assuming you installed them manually) or to backup your home directory and reinstall ubuntu. There are other ways, but they are very time consuming and not for someone new to linux.

Once your get gtk installed again it never hurts to do a sudo apt-get update followed by sudo apt-get -f install and then a sudo apt-get upgrade. Apt can fix many problems as long as you used it, or dpkg (or a gui front end) to install .deb packages.

share|improve this answer
    
Thank you so much. I just read everything and will be trying it shortly. I'm not that entirely new to linux but I have just recently started fiddling around and learning more. I probably should have known not to just delete a library file like that. I'll be back to let you know how it went. Again, thank you so much for your time and insight. You're a lifesaver! –  Kenny Nov 23 '12 at 21:58
    
ok i'm getting a little hung-up on logging in. You said if I don't get prompted, which I didn't, to press ctrl+alt+F1 and that would change it to a text console. Pressing this only displayed the character equivalence on the screen underneath the other stuff I mentioned before. How can I actually log in? –  Kenny Nov 23 '12 at 22:30
    
try ctrl+alt+f2 the ctrl+alt+f keys switch VTYs. You should get a text console on one of them provided your actually done booting. You might also just need to wait for things to time out. –  coteyr Nov 23 '12 at 22:34
    
I actually got to text console a different way...I just edited the boot settings and changed "quiet splash" to "text" that all worked and I got every back to post-deleting-library-file. I'll try uninstalling those libraries I installed, although I'm confused why they would interfere. If I manually installed do I just go into the directory and use "sudo apt-get remove"? –  Kenny Nov 23 '12 at 22:59
    
Also, the "mv .conf .conf.old" did not work. it just said it couldn't find .conf. I checked myself and there is nothing called .conf in my home folder. There is a folder called .config. If I do this thing with changing my settings to old ones is there any way to undo it? –  Kenny Nov 23 '12 at 23:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.