PDA

View Full Version : Desktop Folder Re-assigned Incorrectly



vamped
22nd August 2007, 06:05 AM
My Desktop folder is no longer linked correctly, for example:

Places > Desktop takes me to the same place as Places > Home Folder. Additionally, my home folder has the Desktop emblem assigned to it. Also, the contents of my home folder now appear on my desktop.

Here's what caused it. My home folder was too small and filled up. I assigned a large partition as my home folder by adding to /etc/fstab the line:

/dev/sda8 /home/robert ext3 defaults 0 0

I thought this would be the easiest solution, and I would like to know how to make it work. Alternately, my home folder is a logical partition and I've read that I could expand it by linking it to another logical partition. /dev/sda8 is not a logical partition.

PhillyFloyd
22nd August 2007, 12:53 PM
First off (a little pet-peeve of mine) they are not folders in Linux/UNIX but directories, that aside, what desktop environment are you using (Gnome/KDE/etc...)

Post:

logged in and inside a terminal window as your userID:

# ls -latr ~

vamped
22nd August 2007, 02:13 PM
FC7 Gnome Beryl (or Metacity) anything else pertinent?

The directory listing from ls -latr ~ is below: (Why does it say "Home Folder" under Places, not "Home Directory" ?)

total 36944
drwxrwxrwx 27 root root 65536 1969-12-31 17:00 Download2
-rw-r--r-- 1 robert robert 176 2007-02-12 08:18 .bash_profile
-rw-r--r-- 1 robert robert 33 2007-02-12 08:18 .bash_logout
-rwxr-xr-x 1 robert robert 125 2007-03-13 21:44 Start Limewire - Beryl.sh
-rw-r--r-- 1 robert robert 500 2007-05-23 08:15 .emacs
drwxr-xr-x 2 robert robert 4096 2007-06-23 21:20 .xemacs
drwxr-xr-x 2 robert robert 4096 2007-06-24 06:16 Videos
drwxr-xr-x 2 robert robert 4096 2007-06-24 06:16 Templates
drwxr-xr-x 2 robert robert 4096 2007-06-24 06:16 Public
drwxr-xr-x 2 robert robert 4096 2007-06-24 06:16 Music
-rw------- 1 robert robert 26 2007-06-24 06:16 .dmrc
drwx------ 2 robert robert 4096 2007-06-24 06:16 .gnome2_private
drwxrwxr-x 3 robert robert 4096 2007-06-24 06:16 .redhat
drwx------ 3 robert robert 4096 2007-06-24 06:16 .metacity
-rw-r--r-- 1 robert robert 88 2007-06-24 06:16 .gtkrc-1.2-gnome2
-rw------- 1 robert robert 0 2007-06-24 07:57 .Xauthority
-rw-rw-r-- 1 robert robert 1030 2007-06-24 18:54 .nvidia-settings-rc
drwxr-xr-x 2 robert robert 4096 2007-06-24 21:27 .supertuxkart
drwxrwxr-x 3 robert robert 4096 2007-06-24 22:45 .local
drwxrwxr-x 4 robert robert 4096 2007-06-24 22:47 .gnome
-rw------- 1 robert robert 16 2007-06-24 22:57 .esd_auth
drwxrwxr-x 4 robert robert 4096 2007-06-25 19:33 .armagetronad
drwxr-xr-x 2 robert robert 4096 2007-06-25 19:43 .xine
drwx------ 4 robert robert 4096 2007-06-25 19:43 .thumbnails
drwxrwxr-x 2 robert robert 4096 2007-06-27 18:35 .mplayer
drwx------ 3 robert robert 4096 2007-06-28 19:32 .bittorrent
drwxrwxr-x 2 robert robert 4096 2007-06-29 21:06 .ppracer
-rwxrwxr-x 1 robert robert 18523974 2007-07-04 16:14 jre-6u1-linux-i586-rpm.bin
-rw-r--r-- 1 robert robert 200 2007-07-04 17:32 .bashrc
drwxrwxr-x 3 robert robert 4096 2007-07-04 17:53 .java
drwxrwxr-x 3 robert robert 4096 2007-07-04 18:15 .emacs.d
drwxrwxr-x 2 robert robert 4096 2007-07-04 18:17 scripts
drwx------ 3 robert robert 4096 2007-07-04 18:39 .macromedia
drwxrwxr-x 8 robert robert 4096 2007-07-04 19:22 .evolution
drwx------ 3 robert robert 4096 2007-07-04 20:50 .thunderbird
-rw-rw-r-- 1 robert robert 3098 2007-07-04 22:13 .mailcap
drwx------ 4 robert robert 4096 2007-07-04 22:22 .mozilla
drwx------ 2 robert robert 4096 2007-07-04 22:45 .rhapsody
drwx------ 3 robert robert 4096 2007-07-04 23:52 .kde
drwxr-xr-x 3 robert robert 4096 2007-07-05 00:08 .mcop
drwxr-xr-x 2 robert robert 4096 2007-07-05 22:06 Games
drwx------ 5 robert robert 4096 2007-07-05 22:34 .xmoto
drwxr-xr-x 3 robert robert 4096 2007-07-10 19:29 .dvdcss
drwxr-xr-x 4 robert robert 4096 2007-07-14 17:49 .emerald
drwxr-xr-x 2 robert robert 4096 2007-07-15 20:05 .cddbslave
drwxr-xr-x 2 robert robert 4096 2007-07-24 02:50 Pictures
-rw-rw-r-- 1 robert robert 0 2007-07-28 09:50 .xinitrc
drwx------ 2 robert robert 4096 2007-07-28 21:52 .purple
drwxrwxr-x 2 robert robert 4096 2007-08-02 23:38 .fontconfig
-rw------- 1 robert robert 34566 2007-08-06 21:45 .realplayerrc
drwxr-xr-x 2 robert robert 4096 2007-08-06 23:14 Documents
drwxrwxr-x 2 robert robert 4096 2007-08-11 22:40 .qt
-rw------- 1 robert robert 31 2007-08-11 22:41 .mcoprc
drwxr-xr-x 3 robert robert 4096 2007-08-12 08:30 .vlc
drwxrwxr-x 5 robert robert 4096 2007-08-12 15:34 .limewire
drwxrwxr-x 2 robert robert 4096 2007-08-12 16:11 Incomplete
drwxr-xr-x 5 root root 4096 2007-08-12 16:12 ..
drwxrwxr-x 2 robert robert 4096 2007-08-14 07:06 Shared
-rw------- 1 robert robert 119845 2007-08-14 07:13 .recently-used
drwx------ 2 robert robert 16384 2007-08-18 12:09 lost+found
-rw-rw-r-- 1 robert robert 194 2007-08-18 16:07 .xscreensaver-getimage.cache
drwxr-xr-x 3 robert robert 4096 2007-08-18 19:49 Desktop
drwxr-xr-x 5 robert robert 4096 2007-08-18 19:56 Download1
-rw------- 1 robert robert 112 2007-08-18 20:10 .gtk-bookmarks
drwxr-xr-x 5 robert robert 4096 2007-08-18 20:36 .config
drwx------ 2 robert robert 4096 2007-08-18 20:48 .Trash
-rw-rw-r-- 1 robert robert 7939 2007-08-18 21:09 nautilus-debug-log.txt
drwx------ 3 robert robert 4096 2007-08-19 10:12 .ymessenger
-rw-rw-r-- 1 robert robert 6555 2007-08-19 11:47 info.odt
-rw------- 1 robert robert 9899881 2007-08-20 20:15 FE-230 FE-240 Basic Manual.pdf
-rw------- 1 robert robert 8219729 2007-08-20 20:16 FE-230 FE-240 Advanced Manual.pdf
-rw------- 1 robert robert 1880 2007-08-20 20:54 .viminfo
drwxrwxr-x 2 robert robert 4096 2007-08-21 17:28 .gstreamer-0.10
-rw------- 1 robert robert 35 2007-08-21 22:43 .lesshst
-rw-rw-r-- 1 robert robert 205259 2007-08-21 23:10 .recently-used.xbel
drwxrwxr-x 3 robert robert 4096 2007-08-21 23:10 .openoffice.org2.0
-rw------- 1 robert robert 5293 2007-08-21 23:10 .bash_history
-rw-rw-r-- 1 robert robert 35 2007-08-21 23:32 .Maelstrom-data
drwxr-xr-x 3 robert robert 4096 2007-08-21 23:32 .nautilus
drwx------ 13 robert robert 4096 2007-08-21 23:32 .gnome2
-rw------- 1 robert robert 1001 2007-08-22 06:59 .ICEauthority
drwx------ 7 robert robert 4096 2007-08-22 06:59 .gconf
-rw-r--r-- 1 robert robert 276 2007-08-22 06:59 .xsession-errors
-rw-rw-r-- 1 robert robert 185 2007-08-22 06:59 .beryl-managerrc
drwxr-xr-x 2 robert robert 4096 2007-08-22 06:59 .beryl
drwx------ 2 robert robert 4096 2007-08-22 07:02 .gconfd
-rw-rw-r-- 1 robert robert 0 2007-08-22 07:04 dir.txt
drwxr-xr-x 57 robert robert 4096 2007-08-22 07:04 .

PhillyFloyd
22nd August 2007, 02:41 PM
I've never noticed if it says Home Folder in Gnome ... I don't use gnome often enough ... if it does, it is merely because it is easier identified that way ... sort ok like when you want a piece of tissue paper, you say "Give me a kleenex" or if you want a photocopy you say "Go Xerox this" it is just a misnomer that is hard to shake

Like I said, that idiosyncrasy aside, you can change the emblem by right clicking on the desktop "folder" or the home "folder" and changing the emblem, that is simple enough -- the question is why did it happen without user input (i.e. automatically)

Does everything work fine just running the default windows manager - that is turn off beryl....I also recommend installing compiz-fusion instead of beryl, but personal preference

let me fiddle around with gnome a bit and get back to you

vamped
22nd August 2007, 04:01 PM
It doesn't matter if it is Beryl or Metacity: the desktop has been reassigned. Also, trying ot change the emblem doesn't remove the desktop emblem, it just adds the other emblem at the bottom of the icon, making two emblems.

"without user input", well it happened because I mounted a partition to /home/robert. If I delete the line from fstab then it's back to normal, but then I don't have enough home space.

I'll look into compiz-fusion. Thanks.

gthill
22nd August 2007, 05:00 PM
It is better practice to move your /home/* users to the new disk, then mount the new disk on the mount point /home.
To do this, unmount the new disk (if as you say things work normal in this state)
Now you need to back up all your users on /home but as you say you are nearly out of space so you need to put the tar file somewhere it will fit. You may have to mount the new disk on a temporary mount point. Use /mnt if available or create one if not, (#mkdir /newhome )
mount /dev/sda8 /mnt or mount /dev/sda8 /newhome
now
cd /home
tar -cvf /mnt/users.tar *
now untar your users file to the new disk
cd /mnt
tar -xvf users.tar
this will create all you user directories on the new disk in the paths /mnt/robert, /mnt/user1,
/mnt/user2...etc etc.

now you can unmount the /mnt and remount as /home
umount /mnt
mount /dev/sda8 /home

everything should be in the original state now and all your users have been moved to the new bigger disk.
Your issue may be with permissions here so check the tar manual
man tar
you may need the p flag in your tar command to preserve permissions as well.
tar -cvpf /mnt/users.tar *

You can mount over the top of your old /home/robert files, you won't be able to access them unless you unmount the new disk. Once everything is working as you like then you can unmount the new disk, clean up your old /home/robert files to make some room, then remount /home and you should be
good.
You need to be root to do all this
Don't forget to clean up if you made a temp mount point
#rmdir /newhome

one more note: You will need to do this from a console and don't forget to log out of robert and all other users before mounting over home, best to reboot to runlevel 3, then log in as root only on the console.

vamped
23rd August 2007, 06:21 AM
I did as was suggested: I moved the user folders to the new partition. I mounted /home to the new partition. The line in fstab is:
/dev/sda8 /home ext3 defaults 0 0

This created a new set of problems, without solving the old set. When I log in, I get this error message:
User's $Home/.dmrc file is being ignored. File should be owned by user and have 644 permissions. User's $Home directory must be owned by user and not be writable by other users.

I checked the .dmrc file and changed the permission from 600 to 644. My Home directory is owned by me and has 775 permissions. I don't understand why I'm getting the above error message.

The original issue persists: Fedora still thinks that my $Desktop directory is the same as my $Home directory. That gives me an idea. How is $Desktop defined, and what is a $blabla called, ie $Home and $Desktop?

Also, here is the entire fstab file. I was concerned that /home was mounted more than once:

/dev/Fedora/root / ext3 defaults 1 1
LABEL=/boot1 /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/Fedora/opt /opt ext3 defaults 1 2
/dev/Fedora/var /var ext3 defaults 1 2
/dev/Fedora/usr /usr ext3 defaults 1 2
/dev/Fedora/user_local /usr/local ext3 defaults 1 2
/dev/Fedora/tmp /tmp ext3 defaults 1 2
/dev/Fedora/home /home ext3 defaults 1 2
/dev/sdb2 /mnt/Windows ntfs defaults,noauto,users 0 0
/dev/sda8 /home ext3 defaults 0 0
/dev/sda9 /home/robert/Download1 ext3 defaults 0 0
/dev/sda10 /home/robert/Download2 vfat defaults,umask=0000 0 0
LABEL=SWAP-sda7 swap swap defaults 0 0

While I would really like to know what Fedora is doing here with my Desktop directory, unless someone can provide an answer, perhaps it's time to find a different way of doing this. What does anyone think of undoing the mount and tweaking the logical partition(s)? I don't know at all how to manage logical partitions.

PhillyFloyd
24th August 2007, 12:08 AM
Wow that is one very unique fstab ;-)

can you post the output of `fdisk -l` as well

you should be mounting /home twice

try also as your user:

# cd ~
# pwd

then

# cd ~/Desktop
# pwd

the first one should take you to /home/robert and the second to /home/robert/Desktop, if it does, then it is more than likely something wrong with .gnome in your homedir, and you can back that up then remove it and see how that goes, you will loose all desktop customization though

vamped
27th August 2007, 02:43 AM
I've been out of town, now back to this 'challenge'. Thanks for still trying.

[root]# fdisk -l

Disk /dev/sda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 3277 26218080 8e Linux LVM
/dev/sda3 3278 6541 26218080 8e Linux LVM
/dev/sda4 6542 48641 338168250 5 Extended
/dev/sda5 6542 6554 104391 83 Linux
/dev/sda6 6555 6803 2000061 7 HPFS/NTFS
/dev/sda7 6804 6927 995998+ 82 Linux swap / Solaris
/dev/sda8 6928 19085 97659103+ b W95 FAT32
/dev/sda9 19086 33917 119138008+ b W95 FAT32
/dev/sda10 33918 48641 118270498+ b W95 FAT32

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 2611 20972826 7 HPFS/NTFS
/dev/sdb2 2612 7833 41945715 7 HPFS/NTFS
/dev/sdb3 7834 8094 2096482+ 82 Linux swap / Solaris
/dev/sdb4 8095 30401 179180977+ f W95 Ext'd (LBA)


And the second part plus some
[robert ~]$ cd ~
[robert ~]$ pwd
/home/robert
[robert ~]$ cd ~/Desktop
[robert Desktop]$ pwd
/home/robert/Desktop
[robert Desktop]$ cd $HOME
[robert ~]$ pwd
/home/robert
[robert ~]$ cd $DESKTOP
[robert ~]$ pwd
/home/robert

The third part: I renamed .gnome to .gnome.mybackup and rebooted. Nothing appeared to be different.

Lastly, why is my fstab unique?

vamped
1st September 2007, 01:31 AM
Thank you all for your efforts, even though I finally ended up solving it myself.

After much effort and time I found the little bug. It was the file: /home/robert/.config/user-dirs.dirs. I deleted it, logged out and back in. Fedora recreated it correctly, and everything is working!

The old file:


XDG_DESKTOP_DIR="$HOME/"
XDG_DOWNLOAD_DIR="$HOME/"
XDG_TEMPLATES_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/"
XDG_MUSIC_DIR="$HOME/"
XDG_PICTURES_DIR="$HOME/"
XDG_VIDEOS_DIR="$HOME/"

The recreated correct file:


XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Download"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

I also found a solution to my disk storage space problem. I went the LVM route and extended my home logical volume onto a large physical partition sda8. My volume group was named "Fedora", and I had a logical volume for the home directory.


[robert ~]$ su -
Password: ************
[root ~]# pvcreate /dev/sda8
[root ~]# vgextend Fedora /dev/sda8
[root ~]# vgdisplay


The section "Free PE / Size" said I had 93 GB to use.


[root ~]# lvextend -L +93G /dev/Fedora/home
[root ~]# resize2fs -p /dev/Fedora/home


That was a lot to learn from the cryptic man pages, but I think that LVM is useful now that I am gaining a working knowledge of it. I just wish there was a graphical interface for LVM that could be used post-installation.

scm
1st September 2007, 09:03 AM
Glad you got it sorted.

BTW, an alternative (and easier IMO) way to transfer your home directories, assuming you've got the new home partition mounted on /mnt as above, would be:


cd /home
find . -print -depth | cpio -pvdum /mnt

I tend to use find and cpio far more than tar.