LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
Search this Thread
Old 02-04-2008, 12:30 AM   #1
mel_lai
LQ Newbie
 
Registered: Jan 2008
Posts: 4

Rep: Reputation: 0
restoring desktop directory in /root (or any home directory)


I accidently deleted the Desktop directory from /root. As a result, the contents of /root is now displayed in the desktop along with the icons. How do I restore the Desktop directory?
 
Old 02-04-2008, 12:50 AM   #2
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 36
Have you tried just "mkdir ~/Desktop" ?
 
Old 02-04-2008, 01:32 AM   #3
mel_lai
LQ Newbie
 
Registered: Jan 2008
Posts: 4

Original Poster
Rep: Reputation: 0
more details on my problem:

I am running Fedora 8 using Gnome GUI.

I tried mkdir "Desktop". All it did was create a new folder which ALSO displayed in the desktop but did nothing else. All the /root contents and the icons still displayed in the desktop.

I think the original "Desktop" folder was a hard link of some sort to somewhere else and not just a simple folder. I need to know what that link is or how to re-create that original Desktop folder which is NOT just an empty folder named "Desktop".

There is a user account in /home. The "Desktop" folder in that account which works and displays correctly, shows some sort of emblem attached to the "Desktop" folder which I have not yet figured out the meaning. "ls -l" of that user account lists the Desktop folder as an "ordinary" directory (folder). If it is a hard link, what is the in-line command to get the link path?
 
Old 02-04-2008, 03:13 AM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 162Reputation: 162
It's not likely to be a link to another directory. Even as root on my box I can't create hard links to directories. The output is:
Code:
# ln -d real linked
ln: creating hard link `linked' => `real': Operation not permitted
The man page for ln has this to say:
Code:
-d, -F, --directory
allow  the  superuser  to  attempt  to  hard  link  directories (note: will probably fail due to system
restrictions, even for the superuser)
You could copy an existing directory and modify the contents, but it's better not to use the gui as root.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Root/Home Directory and setting up FTP for home directories? Mankind75 Linux - Newbie 6 07-23-2006 02:37 PM
home-directory taken over by root after halt bramadams Slackware 2 11-18-2004 08:41 AM
Restoring Home Directory Ownership taylortbb Linux - General 1 08-27-2004 09:40 AM
My Home directory shortcut folder on my desktop doesn't work Bensoft Kill MS Linux - Software 2 11-28-2003 09:31 PM
How do i delete my home directory icon on the desktop BajaNick Linux - General 2 08-18-2003 07:54 PM


All times are GMT -5. The time now is 02:22 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration