Restoring your Desktop folder in Ubuntu
July 2017
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
About
This site is an effort to share some of the base knowledge I have gathered through all this years working with Linux, FreeBSD, OpenBSD, Python or Zope, among others. So, take a look around and I hope you will find the contents useful.
Recent Entries
Recent Comments
Recent Trackbacks
Categories
OpenBSD (9 items)
BSD (0 items)
FreeBSD (19 items)
Linux (3 items)
Security (3 items)
Python (22 items)
Zope (13 items)
Daily (144 items)
e-shell (9 items)
Hacks (14 items)
PostgreSQL (3 items)
OSX (8 items)
Nintendo DS (0 items)
enlightenment (0 items)
Apache (3 items)
Nintendo Wii (1 items)
Django (24 items)
Music (12 items)
Plone (7 items)
Varnish (0 items)
Lugo (2 items)
Sendmail (0 items)
europython (7 items)
Cherokee (1 items)
self (1 items)
Nature (1 items)
Hiking (0 items)
uwsgi (0 items)
nginx (0 items)
cycling (9 items)
Networking (1 items)
DNS (0 items)
Archives

Syndicate this site (XML)

RSS/RDF 0.91

15 abril
2010

Restoring your Desktop folder in Ubuntu

This is useful if you've lost your desktop folder in ubuntu due to some Filesystem crash

This morning one of the Ubuntu workstations at work began to perform incredibly bad. It seems there was some kind of problem with the workstation and the user that works everyday with it just rebooted the machine (everybody know a reboot is the solution to all the problems you could find in a computer... ains...).

After the reboot, she found that the desktop wallpaper and all the icons were gone. She came to me and asked me if I could take a look and I did.

After some tests and a lot of log parsing (thnk god Ubuntu developers didn't get rid of /var/log/* yet) I found that there was a problem with the ext3 filesystem, and some inodes were deleted during the reboot (urgh!). It seems those inodes were related to the contents in the Desktop folder (where all the desktop items are stored). When she started a new gnome session, the system picked up a folder called Desktop within another folder in the user's home directory (Why? I've no idea... and I don't know why a folder called Desktop was in there.). Then I moved the Desktop folder to $HOME and restarted the gnome session (hey, it seemed like a reasonable solution to me) just to find out that the system was then using the whole home folder as the desktop (and all the contents in the home folder were spread all over the screen).

After some more digging, I tried removing all the .gnome2, .gconf, .gconfd, .nautilus, etc config files and directories and I checked that, in the gconf editor, nautilus had not activated the "Use your home folder as the desktop folder" option. Nothing worked.

But, in the end, I found ~/.config/user-dirs.dirs. It seems to be Ununtu-specific and it is a file where you can set not only your desktop folder, but your pictures/movie/public/etc folders (those you would find in your home after your first login in a Ubuntu workstation). The contents of that file were:

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME"
XDG_DOWNLOAD_DIR="$HOME"
XDG_TEMPLATES_DIR="$HOME/Plantillas"
XDG_PUBLICSHARE_DIR="$HOME/Público"
XDG_DOCUMENTS_DIR="$HOME/"
XDG_MUSIC_DIR="$HOME/Música"
XDG_PICTURES_DIR="$HOME/"
XDG_VIDEOS_DIR="$HOME/"

So, I only had to change it a little bit:

XDG_DESKTOP_DIR="$HOME/Escritorio"
XDG_DOWNLOAD_DIR="$HOME/Escritorio"
XDG_TEMPLATES_DIR="$HOME/Plantillas"
XDG_PUBLICSHARE_DIR="$HOME/Público"
XDG_DOCUMENTS_DIR="$HOME/"
XDG_MUSIC_DIR="$HOME/Música"
XDG_PICTURES_DIR="$HOME/"
XDG_VIDEOS_DIR="$HOME/"

To get it working properly again (after logging out and logging in again in the gnome session).

Posted by wu at 14:58 | Comments (1) | Trackbacks (0)
<< Real Madrid vs F.C. Barcelona, daños colaterales | Main | Getting lost in porto >>
Comments
Re: Restoring your Desktop folder in Ubuntu

it not worked

Posted by: sharmila at enero 31,2013 10:46
Trackbacks
Please send trackback to:http://blog.e-shell.org/237/tbping
There are no trackbacks.
Post a comment