Desktop files missing

I don’t know how it happened but a few files on the desktop are missing. Maybe I accidentally moved them into another folder, possibly while another folder via Thunar was open. Unfortunately, I don’t know the names of the files, but I see only a gap at the former positions of the files. How can I get the files back? Can a movement of files be seen via journalctl?

System:    Kernel: 5.4.123-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 Desktop: Xfce 4.16.0 Distro: Manjaro Linux 
       base: Arch Linux 
Machine:   Type: Portable System: Dell product: Inspiron N5030 v: N/A serial: <filter> 
       Mobo: Dell model: 07K12X serial: <filter> BIOS: Dell v: A02 date: 09/13/2010 
Battery:   ID-1: BAT0 charge: 22.1 Wh (67.0%) condition: 33.0/73.3 Wh (45.1%) volts: 12.4 min: 11.1 
       model: Samsung SDI DELL 7XFJJA status: Charging 
CPU:       Info: Dual Core model: Pentium T4500 bits: 64 type: MCP arch: Penryn rev: A cache: L2: 1024 KiB 
       flags: lm nx pae sse sse2 sse3 ssse3 bogomips: 9181 
       Speed: 1197 MHz min/max: 1200/2300 MHz Core speeds (MHz): 1: 1197 2: 1197 
Graphics:  Device-1: Intel Mobile 4 Series Integrated Graphics vendor: Dell driver: i915 v: kernel bus-ID: 00:02.0 
       Device-2: Microdia Laptop_Integrated_Webcam_0.3M type: USB driver: uvcvideo bus-ID: 1-6:3 
       Display: x11 server: X.Org 1.20.11 driver: loaded: intel resolution: 1366x768~60Hz 
       OpenGL: renderer: Mesa DRI Mobile Intel GM45 Express (CTG) v: 2.1 Mesa 21.1.2 direct render: Yes 
Audio:     Device-1: Intel 82801I HD Audio vendor: Dell driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 
       Sound Server-1: ALSA v: k5.4.123-1-MANJARO running: yes 
       Sound Server-2: JACK v: 0.125.0 running: no 
       Sound Server-3: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Qualcomm Atheros AR8152 v2.0 Fast Ethernet vendor: Dell driver: atl1c v: 1.0.1.1-NAPI port: df00 
       bus-ID: 09:00.0 
       IF: enp9s0 state: down mac: <filter> 
       Device-2: Qualcomm Atheros AR9285 Wireless Network Adapter vendor: Wistron NeWeb DNXA-95 802.11bgn driver: ath9k 
       v: kernel port: df00 bus-ID: 0c:00.0 
       IF: wlp12s0 state: up mac: <filter> 
Drives:    Local Storage: total: 465.76 GiB used: 170.55 GiB (36.6%) 
       ID-1: /dev/sda vendor: Samsung model: HM501II size: 465.76 GiB 
Partition: ID-1: / size: 449.16 GiB used: 170.55 GiB (38.0%) fs: ext4 dev: /dev/sda1 
Swap:      Alert: No swap data was found. 
Sensors:   System Temperatures: cpu: 44.0 C mobo: 0 C 
       Fan Speeds (RPM): cpu: 0 
Info:      Processes: 180 Uptime: 1d 18h 37m Memory: 3.81 GiB used: 2.24 GiB (58.8%) Init: systemd Compilers: gcc: 11.1.0 
       Packages: 1739 Shell: Bash v: 5.1.8 inxi: 3.3.04

Is this information provided by inxi okay for you?

It’s a start. At least we now know what desktop environment you’re using. That’s important.

Unfortunately, XFCE is not my thing, so I’m going to have to defer to another member. :wink:

Then it will be possible to find them. You have to look someplace where you as user have permission to write (normaly under /home/username). You can’t accidentally move something to /etc or to /root.

You should look for the command find

I don’t use find because i use zsh instead of bash and there it is easy to search with:

print -l /home/**/*.desktop

All listed files should be in an Folder named /home/username/Desktop (Schreibtisch bei mir)

Thanks for the answer! According to your command, I tried find ~ -name "*.desktop", which lists, as one expects, files whose name end in .desktop. But the results I get refer only to programs (and are located in .cache, .config or .local). The files that have disappeared and that I’m looking for are my own files.

May be you moved the files further away then ~ . you could also try:

find /home -name “*.desktop”

or

find / -name “*.desktop”

but this gives a very long list

if you know part of the name of one file, it would be a shorter list:

find / -name “M*.desktop 2>&1 | egrep -u ‘M.*desktop’”

Here searching for desktopfile beginning with “M”. (The other files may be nearby) Be aware of “M.*” instead of “M*”. for egrep

I only now realize: Did you mean Files .desktop or did you mean some Documents you had on the Desktop ?
(
.desktop - files are the programm-icons you use to start some programms)

  • Do you know parts of the name of at least one missing file ?
    (So now you know how to use find )
  • Do you have Folders on the Desktop ?
    (Maybe have a look inside these folders for the missing files. This has happend to me too when i accidentally drag & drop on the desktop)

Sorry, a little misunderstanding. By desktop files I didn’t mean specific files that end in .desktop, but some documents I had on the desktop, which could be folders, too. I don’t have any system or program files there except for the folders linking to /, ~ and the trash which I think links to ~/.local/share/Trash/files/. Unfortunately, my desktop (screen) is almost full and I don’t know the names anymore. All I can see is the gap at the former positions. I checked the folders on the desktop but I couldn’t find any noticeable change. I tried also ls -alt ~/.local/share/Trash/files/ and ls -alt ~/.local/share/Trash/info/ but I couldn’t find any accidental deletion. Maybe I had opened another folder via Thunar and the files have been moved there. Can any movement of files be seen by a program that logs (almost) everything, for example journalctl? Thank you so far!

No. journalctl won´t log what you do with your mouse. If you would have done it via terminal as a command, there would be the .history where you could find what you did.

My advice:

  • clean up your desktop to a point you can overlook it (and you can name everything when it is missing)
  • don’t link / (or other folders that are not owned by your user) onto your Desktop (this is a way to disaster)
  • don’t ever work as root in the desktop (or you will regret this. This is the reason some linux systems will paint the Background in RED when you login as root)
  • don’t save any files to your Desktop. Instead use the folder ~/Documents
  • order your files in subfolders with good names in ~/Documents/Letters …
  • don’t save files to other places on your disk

Every folder in / has ist own meaning. Please respect these meanings. The meaning of /home is that there are all users. The meaning of /home/username/Documents is that there are all Documents from this user. The meaning of /home/username/Desktop is that there are a few often(daily) used Programm-starters, Links to a few folders of this user, even some links (!) to daily used documents may be there.
If you don’t follow the rules, you will be bitten from time to time.
If this is kept, you are able to search for your documents in /home and under ~/Documents, and you are able to make usable backups from /home.

This said, there is another possibility to search for these “missing” files.
If these files belong to your user, and now are somewhere where they don’t belong, you could find them by searching for files with find and “owner=yourusername”

Otherwise you will need to look into your good backup There will be the folder Desktop with all missing files and folders.

1 Like

Thanks for the advice!

This sounds reasonable but it was already predefined by Manjaro (the bar “symbols” in “desktop settings”, in German: Schreibtischeinstellungen → Symbole → Standardsymbole → Dateisystem).

Do you refer this also to sudo? I usually open the terminal via right click on the desktop, which means that the standard current path of the terminal is the path of the desktop. Then, for example, I do updates via sudo. Are you saying that this procedure is not recommendable either?

I’ve found a syntax to exclude certain folders for the search: sudo find / -user [username] -not -path "/home/*". Besides /home, should I exclude something more? The results I get are located in /run/user, /run/faillock, /dev/pts, /usr/share, /proc, /sys/fs, /var/lib, /tmp.

Naja falls du deutsch verstehst, können wird das einfacher machen :wink:
ls -lA / sollte in etwa so aussehen:

ls -lA /                                                                                       
insgesamt 208
lrwxrwxrwx   1 root root      7 20. Jan 17:33 bin -> usr/bin
drwxr-xr-x   1 root root    676 30. Mai 14:18 boot
drwxr-xr-x  23 root root   4480 12. Jun 17:39 dev
drwxr-xr-x   1 root root   4762 12. Jun 15:40 etc
drwxr-xr-x   1 root root     74 18. Aug 2020  home
lrwxrwxrwx   1 root root      7 20. Jan 17:33 lib -> usr/lib
lrwxrwxrwx   1 root root      7 20. Jan 17:33 lib64 -> usr/lib
drwxr-xr-x   1 root root     18 28. Mär 2019  media
drwxr-xr-x   1 root root    314 30. Apr 16:36 mnt
drwxr-xr-x   1 root root    138  6. Mai 13:39 opt
dr-xr-xr-x 562 root root      0 12. Jun 08:52 proc
drwxr-xr-x   1 root root    612 10. Jun 21:54 root
drwxr-xr-x  31 root root    780 12. Jun 15:12 run
lrwxrwxrwx   1 root root      7 20. Jan 17:33 sbin -> usr/bin
drwxr-xr-x   1 root root    950 12. Jun 20:01 .snapshots
drwxr-xr-x   1 root root     14  4. Dez 2019  srv
dr-xr-xr-x  13 root root      0 12. Jun 08:52 sys
drwxrwxrwt  26 root root    800 12. Jun 20:34 tmp
drwxr-xr-x   1 root root    132 12. Jun 15:40 usr
drwxr-xr-x   1 root root    128 11. Jun 07:43 var

nicht durchsuchen solltest du: /proc /sys /run das geht sonst regelmäßig schief

In allen diesen anderen Verzeichnissen könnten deine Dateien theoretisch gelandet sein wenn du den Dateimanager mit root-rechten ausgestattet hattest. Wenn du dort nach Dateien suchst deren Eigentümer du bist, sollte das die Liste trotzdem kurz halten.

Wenn du nicht mit root-rechten gearbeitet hast, können die Dateien nur in einem Verzeichnis gelandet sein, in dem du auch Schreibrechte hast. Das schränkt den Bereich stark ein. Dann bleibt eigentlich nur noch /tmp und /home/username

Oder hast du einen USB-Stick gemountet gehabt, oder eine andere Partition wo die Dateien jetzt liegen könnten ?

Es wäre echt viel leichter, wenn du wenigstens einen einzigen Dateinamen kennen würdest. Oder den Namen eines directories.

Wenn die Dateien unter /home/username/irgendwas gelandet sind, ist die Suche Handarbeit. Dann am besten im Dateimanager links im Dateibaum mit der Maus durchwandern und mal probeweise die einzelnen Unterverzeichnisse anklicken(aufklappen) so dass der Baum expandiert wird. Dann kann es sein, dass dir schon irgendwo ein Verzeichnis auffällt, das da nicht hingehört.

Wenn nicht, musst du bei aufgeklapptem Baum alle Verzeichnisse unter /home/deinUserName/ mit der Maus (oder den Cursortasten) besuchen

Cursortasten: up /down wandert, rechts/links klappt auf/zu (hab ich gerade das erste mal probiert)

Eine Heidenarbeit, aber wenn man was verloren geglaubtes wieder findet ist das die Mühe wert.
Ich wünsche dir viel Erfolg

P.S. sudo ist OK. Aber den Dateimanager sollte man nicht als root laufen lassen (geht bei manchen). Ich hatte schon Angst du hast dich beim grafischen login als root angemeldet.
Das Dateisystemsymbol von XFCE für / ist OK und tatsächlich nicht gefährlich. Solange du als user arbeitest, kannst du nix dahin verschieben (hab ich grad nochmal ausprobiert)

Ja klar, gerne. Das ist mir natürlich schon bei deinem „Schreibtisch bei mir“ aufgefallen, aber ich wusste nicht, ob ich sofort auf Deutsch hätte antworten sollen. Daher habe ich mich erst mal an die allgemeine Forumsprache gehalten, damit auch Leute, die Deutsch nicht verstehen, die Möglichkeit haben mitzulesen.

Danke für die Ratschläge! In der Tat ist mein Desktop ein wenig chaotisch und ich muss da mal aufräumen. Vielleicht tauchen die fehlenden Dateien dann auf einmal auf, wenn ich die ordentlich in entsprechende Ordner einsortiere. Das mühsame Aufklappen und Durchsuchen klingt auf jeden Fall zielführend, auch wenn’s aufwendig ist. Danke!

Ach so, nein nein, in der graphischen Oberfläche nie. Ich hab mich nur ganz selten in der (echten) Konsole mal als Root angemeldet, die Schrift wird rot bei so was. Verstehe, danke!