How to "construct" a desktop

Please post suggestions for improvement of Cinnamon here
https://github.com/linuxmint/Cinnamon
Post Reply
WHVW
Level 4
Level 4
Posts: 454
Joined: Tue May 19, 2015 4:31 pm

How to "construct" a desktop

Post by WHVW » Wed Nov 27, 2019 10:17 pm

Hi All:

A few days ago all my desktop icons disappeared, except the ones that were switched on in "settings". I made a post about it, but so far, no one has come up with a solution. I then tried a "solution I discovered using "testdisk", but that just filled out my drive to the end and made the system unstartable.
After I deleted all that detritus, the system started as normal, but still no icons.
It is easy enough ( I suppose ) to re-construct the desktop, but I would like to try a more granular approach when that is done, that is, to learn just how the desktop is created and where the files (that do it) are stored (and their names ) how the files are made to be "clickable", and how they interact.
That way I could back up ALL the files that relate to the desktop, where ever they are, and thus be able to dispatch this stupid problem quickly and effortlessly.
There is another suggestion in this section, I will see if it applies, but even if it works perfectly, I would still like to know the answers to these questions.

Thanks

User avatar
AZgl1500
Level 11
Level 11
Posts: 3743
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: How to "construct" a desktop

Post by AZgl1500 » Wed Nov 27, 2019 11:23 pm

won't help you now, but in future, I highly suggest you use a backup system for /home

I am using LuckyBackup, there are others

I set it up to backup each sub-folder below /home
I have Desktop included in it.

the Advantage to using a File backup type system, is that you can retrieve a single file easily.
For myself, I will not encrypt a hard drive..... I rely on exclusive control of my computers.

LuckyBackup.png

User avatar
smurphos
Level 13
Level 13
Posts: 4826
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: How to "construct" a desktop

Post by smurphos » Thu Nov 28, 2019 1:06 am

They are simply regular files in the directory set by xdg to be the Desktop.

You can check which directory this is with the command
xdg-user-dir DESKTOP

By default the directory is ~/Desktop

Positional information on the desktop is in the files metadata. This data is stored in ~/.local/share/gvfs-metadata. You can't interact with the files in this folder directly. But you can use the commands gio info and gio set to read and write metadata for any particular file.

E.g

Code: Select all

steve@steve-VirtualBox:~/Desktop$ gio info ~/Desktop/firefox.desktop | grep metadata
  metadata::icon-scale: 1
  metadata::monitor: 0
  metadata::nemo-icon-position-timestamp: 1574931319
  metadata::nemo-icon-position: 481,28
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

WHVW
Level 4
Level 4
Posts: 454
Joined: Tue May 19, 2015 4:31 pm

Re: How to "construct" a desktop

Post by WHVW » Thu Nov 28, 2019 6:15 pm

AZgl1500:

Thank you for that suggestion, I will look into it for the implementation of the NAS I want to set up (subject of contemporaneous post).

smurphos:

Thank you for those details. That will really help me understand how it is all put together.

While we are on the subject, why is it that desktop icons are so vulnerable, while other files are not? This is a common occurrence, across many OPSYS's, I have read of this same thing happening to others on this forum, It has happened to me before, and even 'way back in my Winderz days. It seems to me a bizarre anomaly that one particular set of files be singled out in this way....

Thanks, All.

P.S. That other idea did not work.

User avatar
MrEen
Level 15
Level 15
Posts: 5913
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to "construct" a desktop

Post by MrEen » Thu Nov 28, 2019 6:27 pm

I'd certainly check if permissions got messed up. Run sudo chown -Rc $USER:$USER $HOME in the terminal and if a host of files flies by, you had issues that are now fixed.

User avatar
AZgl1500
Level 11
Level 11
Posts: 3743
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: How to "construct" a desktop

Post by AZgl1500 » Thu Nov 28, 2019 8:00 pm

WHVW wrote:
Thu Nov 28, 2019 6:15 pm
AZgl1500:

Thank you for that suggestion, I will look into it for the implementation of the NAS I want to set up (subject of contemporaneous post).
you are welcome, I learned every thing I know, about Linux, from this forum's members

While we are on the subject, why is it that desktop icons are so vulnerable, while other files are not? This is a common occurrence, across many OPSYS's, I have read of this same thing happening to others on this forum, It has happened to me before, and even 'way back in my Winderz days. It seems to me a bizarre anomaly that one particular set of files be singled out in this way....

Thanks, All.

P.S. That other idea did not work.
I fully suspect that is answered with the post above mine....
My old Windose machines have at times, suffered the "missing Desktop" folders.
as I checked back into that, it because totally obvious.

I had made a Shortcut to an external drive and when that USB drive was removed, and placed in a Safe place, the folder/data suddenly disappeared. :D

WHVW
Level 4
Level 4
Posts: 454
Joined: Tue May 19, 2015 4:31 pm

Re: How to "construct" a desktop

Post by WHVW » Thu Nov 28, 2019 10:24 pm

AZgl1500:

Well, I don't know it that will clear it up. The icons have not re-appeared if that's what you mean, however I did not think they would. Beautiful dog, by the way.

MrEen:

Lots if stuff did get changed, but 99.99999999999999999999999 per cent of it had to do with the VPN, which wants root privileges, for reasons I have never understood, unless they are trying to cover you if you choose to do edgy things such as surfing the 'net as root. Will those changes upset the VPN?

smurphos:

In looking over those files I find that I am not quite sure what I am looking at. I figured that I would see some sort of reference to the four icons that are there, but no. There is nothing that looks like the example you posted. There are quite a few 32kb files.

So what are things supposed to look like?

Thanks

deepakdeshp
Level 16
Level 16
Posts: 6284
Joined: Sun Aug 09, 2015 10:00 am

Re: How to "construct" a desktop

Post by deepakdeshp » Thu Nov 28, 2019 10:49 pm

As for backup, Clonezilla has served me well, as the name suggests it clones the whole partition.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

I am using Mint 19.2 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

User avatar
MrEen
Level 15
Level 15
Posts: 5913
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to "construct" a desktop

Post by MrEen » Thu Nov 28, 2019 10:51 pm

WHVW wrote:
Thu Nov 28, 2019 10:24 pm
Will those changes upset the VPN?
I don't use one, so can't say for sure, but nothing in your home directory should be owned by anything than you. I'm guessing you use sudo to fire it up, which will probably end up reversing what the chown command did.

User avatar
smurphos
Level 13
Level 13
Posts: 4826
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: How to "construct" a desktop

Post by smurphos » Fri Nov 29, 2019 12:40 am

WHVW wrote:
Thu Nov 28, 2019 10:24 pm
smurphos:

In looking over those files I find that I am not quite sure what I am looking at. I figured that I would see some sort of reference to the four icons that are there, but no. There is nothing that looks like the example you posted. There are quite a few 32kb files.
I'm not sure which files you are looking at? ~/.local/share/gvfs-metadata contains a file for each partition in your system, and any external drives that ever been mounted, and those files includes metadata for every single file in the partition.

The icons provided by nemo-desktop (Home / Computer / Trash etc) are different - they are not files, but virtual shortcuts. Their positional metadata is is a plain text file - ~/.config/nemo/desktop-metadata.

There's no reason the files stored on the desktop should be any more at risk that files stored anywhere else. Issues with the program managing the Desktop (e.g. nemo-desktop in Cinnamon, Caja in MATE etc) can cause problems with files being displayed on the Desktop, but those types of problems don't effect the files themselves.

If your power outage did cause data loss I'd be very surprised if there weren't other files elsewhere in the file system also damaged.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

WHVW
Level 4
Level 4
Posts: 454
Joined: Tue May 19, 2015 4:31 pm

Re: How to "construct" a desktop

Post by WHVW » Fri Nov 29, 2019 10:20 pm

smurphos:
There's no reason the files stored on the desktop should be any more at risk that files stored anywhere else.
My point exactly. There is no reason they should disappear, but they do, and it is a bit on the frustrating side.

The power failure was on of those half-second switch the feeder affairs. So far (and I'll emphasise that) nothing else seems to have been affected.

You have shown me a few files that contain this info (and they are not in the same folder) so it seems an act of surgical precision to have gotten the desktop files while avoiding everything else.

I fully admit that I cannot write code, and that some might attack my logic on this ground. However, logically speaking I would postulate that there is, buried somewhere in the start-up routines, one (routine) that causes the desktop to be reset. Except for a special set of circumstances, this routine would never be invoked, but that the power failure corrupted the "do it" bit- et voilà!

I think I read somewhere that even Winderz uses Grub. This could explain the fact that it happens in Winderz systems too.

Later..

User avatar
MrEen
Level 15
Level 15
Posts: 5913
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to "construct" a desktop

Post by MrEen » Fri Nov 29, 2019 10:31 pm

One thing I don't see as being checked here. Have you navigated to your Desktop folder in the File Manager to see if everything is still listed there?

WHVW
Level 4
Level 4
Posts: 454
Joined: Tue May 19, 2015 4:31 pm

Re: How to "construct" a desktop

Post by WHVW » Sat Nov 30, 2019 10:37 am

MrEen :

Oh, yeah. Checked them a long time ago. They are as gone as gone can be. Unless there is another esoteric place I don't yet know of, they are trés fini.

Later..

deepakdeshp
Level 16
Level 16
Posts: 6284
Joined: Sun Aug 09, 2015 10:00 am

Re: How to "construct" a desktop

Post by deepakdeshp » Sun Dec 01, 2019 2:16 pm

Please check the trash can .
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

I am using Mint 19.2 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

WHVW
Level 4
Level 4
Posts: 454
Joined: Tue May 19, 2015 4:31 pm

Re: How to "construct" a desktop

Post by WHVW » Mon Dec 02, 2019 9:44 pm

deepakdesh :

I should have mentioned it before, but yes, I checked the "trash", and nope! Although I did not, come to think of it, check the "trash" in root....I cannot imagine how it could happen, but...stranger things...hold on, I'll check, just to make sure!

I just had to do it, it would have been too bizarre if the damn thing had been in root's trash all along, but no, not there either.

Later...

gm10
Level 20
Level 20
Posts: 10274
Joined: Thu Jun 21, 2018 5:11 pm

Re: How to "construct" a desktop

Post by gm10 » Mon Dec 02, 2019 10:08 pm

If you keep losing the files on your desktop across several OS then the only explanation is that you're doing some drunk/accidental house keeping, either you delete them or you move them into another folder (search your file system). Or somebody with access to your computer does it.
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

deepakdeshp
Level 16
Level 16
Posts: 6284
Joined: Sun Aug 09, 2015 10:00 am

Re: How to "construct" a desktop

Post by deepakdeshp » Mon Dec 02, 2019 11:08 pm

In Nemo search for Desktop. May be it's moved to some other location.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

I am using Mint 19.2 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

User avatar
AZgl1500
Level 11
Level 11
Posts: 3743
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: How to "construct" a desktop

Post by AZgl1500 » Mon Dec 02, 2019 11:56 pm

Install Catfish from the Software Manager, and let it try to find the lost files.

it is super fast, and displays what it finds "on the fly"

WHVW
Level 4
Level 4
Posts: 454
Joined: Tue May 19, 2015 4:31 pm

Re: How to "construct" a desktop

Post by WHVW » Tue Dec 03, 2019 6:12 pm

gm10:
The other systems part of this happened decades ago. None of your other suggestions have happened.

deepakdeshp:
Can't find it there, either.

AZgl1500:
I'll try that and report.

Thanks.

WHVW
Level 4
Level 4
Posts: 454
Joined: Tue May 19, 2015 4:31 pm

Re: How to "construct" a desktop

Post by WHVW » Mon Dec 09, 2019 8:41 pm

AZgl1500:

Wow! Catfish seems to work..I found the old desktop! Now the question is:

I swapped out those the files into "Desktop" (old Desktop into present Desktop). But...the intermediate desktop I created a few days ago is still there!

What other files do I need to (also) swap?

Thanks

Post Reply

Return to “Cinnamon”