Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was recently installing a a package and in due course, I typed by mistake the following code in a terminal:
sudo rm -r /usr/share/applications/
Now all my program shortcuts are gone and my gnome terminal as well as icons,and panels are not accessible as a root user....(Thank god I was using AWN on my current account!)
Can anyone help me restore the folder because from the terminal, the command says it possible.
You said 'recently', so does it follow it was just the gnome thing that it puts in automatically? You know you hadn't changed it much.
In which case just reinstall Gnome seems the simple course.
Is gnome a 'metapackage' or whatever they are called. In which case:
Code:
sudo apt-get install --reinstall gnome
Hope helps.
EDIT: Sorry that was a bit crass even by my usual standards. You've presumably removed all your *.desktop files. The above suggestion might still be worth a try. Or try recovering the directory with some sort of recovery program, but its likely to be a bit iffy.
Last edited by lugoteehalt; 01-13-2010 at 02:55 PM.
Thanks a lot. Re-installing gnome has at least returned most functionality, but I am still missing my .desktop icons. I have tried to get recovery software but apparently none exit for Linux.
Is gnome a 'metapackage' or whatever they are called. In which case:
Code:
sudo apt-get install --reinstall gnome
Hope helps.
Interesting. I'd have thought that if it was a meta package, the above, would not do much at all. Since the "gnome" package that is being reinstalled would not actually have any files.
Thanks a lot. Re-installing gnome has at least returned most functionality, but I am still missing my .desktop icons. I have tried to get recovery software but apparently none exit for Linux.
If you've been using the computer for a bit since the incident the accidentally deleted directory is probably long gone. There is recovery software for example: http://www.data-recovery-software.ne...Recovery.shtml I have no idea whether it is any good or not.
You mean icons showing on the desktop, the root window as twer? Don't know but it should be simple - start a program and then drag its icon onto the desktop, that sort of thing.
Thanks a lot. Re-installing gnome has at least returned most functionality, but I am still missing my .desktop icons. I have tried to get recovery software but apparently none exit for Linux.
Desktop icons are probably not even worth the effort of trying to recover them, but for the record, there ARE recovery tools for Linux, including PhotoRec, Test-disk (I think that's a recovery tool, if not an assistant), and Recover, to name a few. Of course, using any given tool for recovery, is influenced by (A) how much use the machine has had since the loss, and (B) what filesystem is in question.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.