0

I recently asked this question on ow to change default folder icons within Gnome's Nautilus file browser, which was all good and worked perfectly well.

I've since created new folder svg's and replaced the one I used previously, using the same method described in the post mentioned above.

For some reason, these folder icons do not display properly when using Nautilus as a normal user. This is all I see, note the Untitled Folder has no icon:

No Folder Icon - User

On the other hand, if I run Nautilus as root with sudo nautilus, this displays the icons as expected:

Folder Icon - Root

This makes me instantly think this problem must be permission based, however the folder.svg files have the same permissions as the Downloads / Documents svg files do, so I cant work out what the problem is.

I've tried the suggestion made here, however this has made no difference.

Zanna
  • 70,465
devklick
  • 127

2 Answers2

1

Your idea about the file permissions, feels right to me, yet it is not about the file permissions of the folder, but of the image you use for your folder.

If you drag&drop your files, the permissions of the original file stay alive, so if only the user/owner of the file are allowed to read/write, the user on your VM will not have the permissions, as it is a different user.

To solve this issue:

  • either run sudo chown VM-USERNAME YOURFOLDERIMAGE.svg inside the virtual machine, this makes you the owner of the file

  • or give sufficient rights to the file before drag&drop via chmod a+r YOURFOLDERIMAGE.svg, this would give all the permission to read.

The linux file permissions get lost if you use a filesystem not capable of storing them - this is the case with (v)fat(32) and ntfs, which are most commonly used on usb-sticks or external harddrives - therefore your "solution" worked.

To learn more about linux file permissions look at the link in above paragraph and check out man chmod.

d1bro
  • 2,304
  • Your spot on! I had tried manually setting my user as the owner which didnt seem to have any affect - I was under the assumption that chown done the same thing, but I clearly need to take at the provided link. Thanks for the help! – devklick May 04 '17 at 20:49
  • @Zanna: yeah you're right, I edited the answer to only grant read rights. – d1bro May 07 '17 at 22:03
0

So I've got to the bottom of this, kinda.

I cant explain why the icons show for the the root user but not for the normal user, but I've worked out what was causing the icons not to display correctly in the first place.

My Ubuntu runs in a virtual machine. The svg's were created on my host machine and were copied across to the virtual machine using copy/paste, and it seems this is what causes the issue. Not sure why, but I'm accepting it for what it is.

When I upload the svg's to Google drive or similar, or onto a USB stick and download them into the virtual machine, they work fine.

devklick
  • 127
  • 1
    This isn't an answer, post a comment or update your question with these details – Sumeet Deshmukh May 03 '17 at 17:17
  • I disagree. I think this is an answer - it at least contains a workaround. A better answer is needed and someone has posted one I think... – Zanna May 04 '17 at 04:53