I recently moved from 16.04 to 18.04. When I login to the system no files are shown on the desktop and 'file' icon also doesn't open. When I ran the command time nautilus it gave the following response:
Failed to register: Timeout was reached real 0m25.074s user 0m0.042s sys 0m0.025s But after 5 minutes all the windows suddenly open and folder in the desktop also start showing up. The response of the same command is as follows:
real 0m0.060s user 0m0.038s sys 0m0.008s Although, I can access all the files and folder using terminal. Also, it works fine even after I issue the command nautilus -q and doesn't take much time. It seems like the problem is only when I login to the system. Although this was not the case with ubuntu 16.04 where everything started instantaneously.
Edit: I removed and installed nautilus again but no help.
Output of free -h
total used free shared buff/cache available Mem: 7.6G 2.7G 1.4G 268M 3.5G 4.3G Swap: 0B 0B 0B Output of sysctl vm.swappiness
vm.swappiness = 60 Output of ls -al ~/.local/share/gnome-shell/extensions
ls: cannot access '/home/bhavy/.local/share/gnome-shell/extensions': No such file or directory Output of ls -al /usr/share/gnome-shell/extensions
total 16 drwxr-xr-x 4 root root 4096 Jun 7 01:52 . drwxr-xr-x 6 root root 4096 Jun 7 01:17 .. drwxr-xr-x 3 root root 4096 Jun 7 01:52 drwxr-xr-x 3 root root 4096 Jun 7 01:52 Output of cat /var/log/syslog|grep nautilus
Jun 7 18:22:41 bhavy-HP whoopsie[1956]: [18:22:41] Parsing /var/crash/_usr_bin_nautilus.1000.crash. Jun 7 18:22:41 bhavy-HP whoopsie[1956]: [18:22:41] Uploading /var/crash/_usr_bin_nautilus.1000.crash. Jun 7 18:30:30 bhavy-HP nautilus-deskto[4472]: can't init metadata tree /home/bhavy/.local/share/gvfs-metadata/home: open: Permission denied Jun 7 18:30:30 bhavy-HP nautilus-deskto[4472]: message repeated 2 times: [ can't init metadata tree /home/bhavy/.local/share/gvfs-metadata/home: open: Permission denied] Jun 7 18:30:30 bhavy-HP nautilus[4565]: can't init metadata tree /home/bhavy/.local/share/gvfs-metadata/home: open: Permission denied Jun 7 18:30:30 bhavy-HP nautilus-deskto[4472]: can't init metadata tree /home/bhavy/.local/share/gvfs-metadata/home: open: Permission denied Jun 7 18:30:31 bhavy-HP nautilus-deskto[4472]: message repeated 44 times: [ can't init metadata tree /home/bhavy/.local/share/gvfs-metadata/home: open: Permission denied] Jun 7 18:30:31 bhavy-HP dbus-daemon[1403]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.269' (uid=1000 pid=4565 comm="/usr/bin/nautilus --gapplication-service " label="unconfined") Jun 7 18:30:31 bhavy-HP nautilus[4565]: can't init metadata tree /home/bhavy/.local/share/gvfs-metadata/home: open: Permission denied Jun 7 18:30:31 bhavy-HP nautilus[4565]: can't init metadata tree /home/bhavy/.local/share/gvfs-metadata/home: open: Permission denied Jun 7 18:30:31 bhavy-HP nautilus[4565]: can't init metadata tree /home/bhavy/.local/share/gvfs-metadata/home: open: Permission denied Jun 7 18:30:31 bhavy-HP nautilus-deskto[4472]: can't init metadata tree /home/bhavy/.local/share/gvfs-metadata/home: open: Permission denied Jun 7 18:30:31 bhavy-HP nautilus-deskto[4472]: message repeated 191 times: [ can't init metadata tree /home/bhavy/.local/share/gvfs-metadata/home: open: Permission denied] Jun 7 18:30:32 bhavy-HP nautilus[4565]: can't init metadata tree /home/bhavy/.local/share/gvfs-metadata/home: open: Permission denied Jun 7 18:30:33 bhavy-HP nautilus[4565]: message repeated 129 times: [ can't init metadata tree /home/bhavy/.local/share/gvfs-metadata/home: open: Permission denied] Jun 7 18:30:37 bhavy-HP nautilus-deskto[4472]: can't init metadata tree /home/bhavy/.local/share/gvfs-metadata/home: open: Permission denied Jun 7 18:30:38 bhavy-HP nautilus-deskto[4472]: message repeated 143 times: [ can't init metadata tree /home/bhavy/.local/share/gvfs-metadata/home: open: Permission denied] There was one system program error detected window as well. When I looked at the /var/crash folder with ls. It gave the following output
_usr_bin_nautilus.1000.crash _usr_bin_nautilus.1000.upload _usr_bin_nautilus.1000.uploaded Edit 2: The following two commands sudo grep -i swap /etc/fstab and sudo blkid | grep -i swap prints nothing.
For ls -al /home/bhavy/.local/share/gvfs-metadata/ the output is
drwx------ 2 bhavy bhavy 4096 Apr 1 13:47 . drwx------ 37 bhavy bhavy 4096 Jun 7 19:32 .. -rw------- 1 root root 90096 Apr 14 2018 home -rw-r--r-- 1 root root 32768 Apr 14 2018 home-520671b4.log -rw------- 1 bhavy bhavy 1068 May 10 2018 'mtp:host=%5Busb%3A001%2C004%5D' -rw-rw-r-- 1 bhavy bhavy 32768 May 10 2018 'mtp:host=%5Busb%3A001%2C004%5D-ea794164.log' -rw------- 1 bhavy bhavy 892 Apr 1 13:47 'mtp:host=%5Busb%3A001%2C006%5D' -rw-rw-r-- 1 bhavy bhavy 32768 Apr 1 13:50 'mtp:host=%5Busb%3A001%2C006%5D-96429231.log' -rw------- 1 bhavy bhavy 1904 Mar 17 14:49 'mtp:host=%5Busb%3A001%2C008%5D' -rw-rw-r-- 1 bhavy bhavy 32768 Mar 17 14:49 'mtp:host=%5Busb%3A001%2C008%5D-1ef4e927.log' -rw------- 1 bhavy bhavy 988 Jan 3 2018 'mtp:host=%5Busb%3A001%2C019%5D' -rw-rw-r-- 1 bhavy bhavy 32768 Jan 3 2018 'mtp:host=%5Busb%3A001%2C019%5D-295b34d0.log' -rw------- 1 root root 23428 Apr 20 2018 root -rw-r--r-- 1 root root 32768 Apr 20 2018 root-a7cd5a51.log -rw------- 1 bhavy bhavy 528 Oct 16 2019 'sftp:host=172.27.28.229,user=jatindev' -rw-rw-r-- 1 bhavy bhavy 32768 Oct 16 2019 'sftp:host=172.27.28.229,user=jatindev-50511b70.log' -rw------- 1 bhavy bhavy 360 Jun 28 2018 uuid-13F2-1B57 -rw-rw-r-- 1 bhavy bhavy 32768 Jun 28 2018 uuid-13F2-1B57-ef6bea9f.log -rw------- 1 bhavy bhavy 152 Dec 15 2017 uuid-15F6-1853 -rw-rw-r-- 1 bhavy bhavy 32768 Dec 15 2017 uuid-15F6-1853-dd280f53.log -rw------- 1 bhavy bhavy 168 Feb 5 2019 uuid-1CB5-2250 -rw-rw-r-- 1 bhavy bhavy 32768 Feb 5 2019 uuid-1CB5-2250-57328334.log -rw------- 1 bhavy bhavy 3652 Oct 14 2019 uuid-2E18-2B51 -rw-rw-r-- 1 bhavy bhavy 32768 Oct 14 2019 uuid-2E18-2B51-148fcb14.log -rw------- 1 bhavy bhavy 7444 Jan 1 2019 uuid-70F1-3FAB -rw-rw-r-- 1 bhavy bhavy 32768 Jan 1 2019 uuid-70F1-3FAB-80580a55.log -rw------- 1 bhavy bhavy 3036 Mar 4 2018 uuid-858A-D414 -rw-rw-r-- 1 bhavy bhavy 32768 Mar 4 2018 uuid-858A-D414-6d31293d.log -rw------- 1 bhavy bhavy 716 Aug 6 2018 uuid-CC63-C4D1 -rw-rw-r-- 1 bhavy bhavy 32768 Aug 6 2018 uuid-CC63-C4D1-86f630c5.log Edit 3: After allocating swap memory and changing ownership of gvfs-metadata Output of free -h
total used free shared buff/cache available Mem: 7.6G 2.1G 3.0G 221M 2.5G 5.1G Swap: 4.0G 0B 4.0G Output of ls -al /home/bhavy/.local/share/gvfs-metadata/
total 716 drwx------ 2 bhavy bhavy 4096 Jun 7 20:12 . drwx------ 37 bhavy bhavy 4096 Jun 7 20:12 .. -rw------- 1 bhavy bhavy 90096 Apr 14 2018 home -rw-r--r-- 1 bhavy bhavy 32768 Jun 7 20:12 home-520671b4.log -rw------- 1 bhavy bhavy 95220 Jun 7 20:12 home.AQPML0 -rw------- 1 bhavy bhavy 1068 May 10 2018 'mtp:host=%5Busb%3A001%2C004%5D' -rw-rw-r-- 1 bhavy bhavy 32768 May 10 2018 'mtp:host=%5Busb%3A001%2C004%5D-ea794164.log' -rw------- 1 bhavy bhavy 892 Apr 1 13:47 'mtp:host=%5Busb%3A001%2C006%5D' -rw-rw-r-- 1 bhavy bhavy 32768 Apr 1 13:50 'mtp:host=%5Busb%3A001%2C006%5D-96429231.log' -rw------- 1 bhavy bhavy 1904 Mar 17 14:49 'mtp:host=%5Busb%3A001%2C008%5D' -rw-rw-r-- 1 bhavy bhavy 32768 Mar 17 14:49 'mtp:host=%5Busb%3A001%2C008%5D-1ef4e927.log' -rw------- 1 bhavy bhavy 988 Jan 3 2018 'mtp:host=%5Busb%3A001%2C019%5D' -rw-rw-r-- 1 bhavy bhavy 32768 Jan 3 2018 'mtp:host=%5Busb%3A001%2C019%5D-295b34d0.log' -rw------- 1 root root 23428 Apr 20 2018 root -rw-r--r-- 1 root root 32768 Apr 20 2018 root-a7cd5a51.log -rw------- 1 bhavy bhavy 528 Oct 16 2019 'sftp:host=172.27.28.229,user=jatindev' -rw-rw-r-- 1 bhavy bhavy 32768 Oct 16 2019 'sftp:host=172.27.28.229,user=jatindev-50511b70.log' -rw------- 1 bhavy bhavy 360 Jun 28 2018 uuid-13F2-1B57 -rw-rw-r-- 1 bhavy bhavy 32768 Jun 28 2018 uuid-13F2-1B57-ef6bea9f.log -rw------- 1 bhavy bhavy 152 Dec 15 2017 uuid-15F6-1853 -rw-rw-r-- 1 bhavy bhavy 32768 Dec 15 2017 uuid-15F6-1853-dd280f53.log -rw------- 1 bhavy bhavy 168 Feb 5 2019 uuid-1CB5-2250 -rw-rw-r-- 1 bhavy bhavy 32768 Feb 5 2019 uuid-1CB5-2250-57328334.log -rw------- 1 bhavy bhavy 3652 Oct 14 2019 uuid-2E18-2B51 -rw-rw-r-- 1 bhavy bhavy 32768 Oct 14 2019 uuid-2E18-2B51-148fcb14.log -rw------- 1 bhavy bhavy 7444 Jan 1 2019 uuid-70F1-3FAB -rw-rw-r-- 1 bhavy bhavy 32768 Jan 1 2019 uuid-70F1-3FAB-80580a55.log -rw------- 1 bhavy bhavy 3036 Mar 4 2018 uuid-858A-D414 -rw-rw-r-- 1 bhavy bhavy 32768 Mar 4 2018 uuid-858A-D414-6d31293d.log -rw------- 1 bhavy bhavy 716 Aug 6 2018 uuid-CC63-C4D1 -rw-rw-r-- 1 bhavy bhavy 32768 Aug 6 2018 uuid-CC63-C4D1-86f630c5.log 41 Answer
swap
You have no swap, as seen in free -h.
total used free shared buff/cache available Mem: 7.6G 2.7G 1.4G 268M 3.5G 4.3G Swap: 0B 0B 0B We'll create a 4G /swapfile.
Note: Incorrect use of the dd command can cause data loss. Suggest copy/paste.
sudo swapoff -a # turn off swap sudo rm -i /swapfile # remove old /swapfile sudo dd if=/dev/zero of=/swapfile bs=1M count=4096 sudo chmod 600 /swapfile # set proper file protections sudo mkswap /swapfile # init /swapfile sudo swapon /swapfile # turn on swap free -h # confirm 8G RAM and 4G swap Add this line to /etc/fstab...
/swapfile none swap sw 0 0 Then reboot and verify proper swap operation.
gvfs-metadata
You've been starting nautilus with sudo. You should be using sudo -H when starting GUI apps as root from the terminal.
sudo chown bhavy:bhavy /home/bhavy/.local/share/gvfs-metadata/home* sudo chmod 664 /home/bhavy/.local/share/gvfs-metadata/home*.log sudo rm -i /home/bhavy/.local/share/gvfs-metadata/root* desktop-icons
Reinstall missing gnome-shell extension:
sudo apt-get update sudo apt-get install gnome-shell-extension-desktop-icons Go to to enable/configure Desktop Icons.
~/.cache
We found corruption in the ~/.cache folder. Recreated a new folder and Files now works.