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 doing some housekeeping in my Home directory, using the gui/konqueror. I was deleting files (highlight, hit delete key). I obviously wasn't paying attention to what I was deleting, and the next thing you know, I deleted the entire contents of my home dir. I hit cancel before it deleted EVERYTHING, but all i have now is the trash icon (even deleted the desktop folder), and when I try to view the trash, I get "Klauncher could not be reached via the DCOP."
My concern is that I had 2 programs installed that stored info there - primarily, evolution for my mail/contacts. Now I'm getting all kinds of errors about not being able to access folder (surprise, because I deleted them! )
Is there anything I can do to restore those files? (A command line tool perhaps?)
If not... any suggestions on "fixing" things?
My desktop icon for "Home" is gone too
Just when I was so glad to have switched over to linux.... my gut wants to run to the windows world where i know everything! It's hard to be a newb all over again...
I don't know how you could get your files back but I do know what I would do in this scenario, that is create a new account and delete the old one, then I would have a 'working' home directory again.
This info is what the Gnome desktop does, but KDE is probably similar...
The trash can is just a "front end" for a hidden directory inside your home directory. Specifically: ~/.Trash
Now, you can log into a virtual terminal (Ctrl-Alt-Shift-F1) or with a terminal inside KDE (if you can open one without errors), and search for that directory or one like it. If you can't find it, then there probably is not much you can do to restore it. If it does exist, it's just a matter of copying the files in that directory back to their proper places. That, however, could be long, tedious, and difficult depending on whether the directory structure remained intact when the files were put in the trash can.
If you can't find the directory or it's mangled beyond recognition, then brynjarh and ToniT give good advice on creating a new account and copying it to use as a template to rebuild your stuff. Unfortunately though, that won't restore contact info, but it will get you running again.
OK, seemingly good news here. In KDE, under my Desktop directory in home, there is a hidden Trash folder, and indeed all of my folders/files are still in it. I'm now trying to copy its contents back to my home directory.
Is there a "more correct" way to copy directories than using
cp -r ??
OK, all files are back in place. I'm going to log out and back in and cross my fingers that this DCOP error stops - otherwise I imagine I must fix KDE somehow? With an update/reload off the CD perhaps?
/edit - Oh I am a happy happy girl
Logged out, back in - it went through the new user wizard as if my user account was brand new, and upon re-answering its various questions, it loaded me back into a working KDE (but somehow had saved most of my previous settings - application buttons in the toolbar, etc). In evolution, I had to re-setup my configuration settings for my email accounts, but all of my previously existing mail folders were there and contacts in-tact.
Happy happy joy joy, happy happy joy joy!!!
Thank you SO MUCH everyone for your immediate responses!! I am fully functional once again, and learned something in the process.
That is the best part of running linux, I think (well aside from stability, lack of bluescreens and viruses....) - the fact that there's actual accountability on the users. You have to actually know what the system is doing, how things work, etc. to operate it effectively. Yes, it's a learning curve for newbies, but the sense of accomplishment when you actually fix a problem without relying on some wizard to hold your hand - not much in computing can beat that feeling.
Day 5 of my life as a linux convert, and I'm doing just fine!
Thanks again !!!!!
Last edited by phlyersphan; 07-05-2004 at 03:17 PM.
In case you're ready to try the "next step", there's a simple way to backup your home directory. Assuming your home dir is /home/shelly
[you@your_host]$ cd /home
[you@your_host]$ tar cvjf /tmp/shelly_home_backup.tar.bz2 shelly lots of output
[you@your_host]$ mv /tmp/shelly_home_backup.tar.bz2 /path/to/some/safe/backup_directory
In fact, you could automate that easily with a script to run everytime you shotdown the computer, logout, or at a specific time each day/week/month/whatever.
Then, if something like this should ever happen again, you simply do the "reverse"
[you@your_host]$ cd /home
[you@your_host]$ rm -rf shelly
[you@your_host]$ tar xvjf /path/to/some/safe/backup_directory/shelly_home_backup.tar.bz2 lots of output
And that's it! You would restore your home directory back to the exact state it was in the last time you did a backup. Backups are a good thing
Thanks, Dark_Helmet! I wrote a little bash script that creates a backup of my home directory and stores it on my separate data partition. Works like a charm
It made me realize that I need a better organizational scheme, as I probably don't need to back up all of this stuff!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.