Description: This program is used to save/restore/align the Ubuntu and Mint Desktop icons positions when Nautilus, Nemo, or Caja is managing the desktop. I made this script so that I could easily restore icon positions on the Ubuntu desktop. The script also allows you to align icons to a user definable grid. I have tested it with the 64 bit versions of the following: Ubuntu 14.04 with Nautilus Ubuntu 16.04 with Nautilus Mint 18.1 Cinnamon with Nemo Mint 18.2 Cinnamon with Nemo Mint 18.2 Mate with Caja
Requirements (all are included with the default Ubuntu and Mint installations): Nautilus, Nemo or Caja is your file manager gvfs-info (which is used by Nautilus, Nemo & Caja to store icon positions) bash, zenity, gsettings, xprop, sed, grep, awk, xdg-mime
Note: xdotool which was required in version 1 is no longer required.
Install Instructions: Copy all the files to your bin or Nautilus scripts directory (or sub-directories). Make executable and run the script.
9I created a German translation, if you're interested:
[Deutsch]
main1=Symbolpositionen speichern
main2=Symbolpositionen im Gitter speichern
main3=Symbolpositionen wiederherstellen
main4=Konfiguration
main5=Hilfe
main6=Über
main7=Objekt auswählen
main8=Letzte Aktion rückgängig machen
main9=Überlappende Desktopsymbole voneinander trennen
pb_done=Fertig
pb_select=Auswählen
pb_return=Zurück
pb_edit=Bearbeiten
pb_save=Speichern
pb_cancel=Abbrechen
config1=Sprache
config2=Desktopsymbole pro Zeile
config3=Desktopsymbole pro Spalte
config4=Linker Randabstand
config5=Oberer Randabstand
config6=Gitterbreite
config7=Gitterhöhe
config8=Objekt zum Bearbeiten auswählen
msg1=Symbolpositionen gespeichert
msg2=Symbolpositionen wiederhergestellt
msg3=Drücken Sie [F5] um den Desktop neu zu laden
msg4=Neuen Wert eingeben für
msg5=Negative Werte sind\n nicht erlaubt!
msg6=Die Werte müssen Ziffern sein ... Nicht Text!
msg7=Symbolpositionen aktualisiert
msg8=Möchten Sie ei Desktopsymbol erstellen,\num dieses Programm zu starten
msg9=Die Bildschirmauflösung hat sich geändert von
msg10=zu
msg11=seit die Symbolpositionen das letzte mal gespeichert wurden.
msg12=Die Standardvergrößerungsstufe hat sich geändert von
msg13=Dies wird das bisherige Desktopsymbol ersetzen
msg14=Initialisierungswerte müssen angegeben werden!
msg15=Initialisiere Abstände zwischen den Desktopsymbolen
msg16=Geben Sie die Werte ein, die Sie haben möchten:
msg17=Symbolpositionen im Gitter gespeichert
msg18=Abbrechen...
msg19=Einstellung ist zu klein
msg20=Einstellung ist zu groß
msg21=Gittergröße ist zu klein
msg22=Die folgenden Desktopsymbole konnten nicht wiederhergestellt werden
msg23=Desktopsymbole erfolgreich voneinander getrennt
msg24=Bitte treffen Sie eine Auswahl!
msg25=Einige Desktopsymbole wurden nicht gefunden und wurden möglicherweise vor Kurzem gelöscht
msg26=Nur die Dateimanager Nautilus, Nemo and Caja werden unterstützt!
msg27=Das Desktopverwaltungsprogramm konnte nicht herausgefunden werden
msg28=Desktopsymbol erstellen
msg29=Symbolpositionen wurden nicht wiederhergestellt
msg30=Folgendes konnte nicht gefunden werden:
msg31=Desktopsymbolvergrößerungsstufe
msg32=Nicht definiert
Also would it be great if the script was able to do certain tasks without user invention, for example using a new option like "Add Autostart entry for task" i which the user could specify if he wants the script to restore the icon positions every time he logs in to his Computer. (which I would need)
Here is the translation without being messed up by a comment function:
https://dateien.lampe2020.de/Verbesserungen für externe Programme/Happy Desktop/happy_desktop_lang Also would it be great if the script would be able to do certain tasks without user invention, for example using a new option like "Add Autostart entry for task" i which the user could specify if he wants the script to restore the icon positions every time he logs in to his Computer. (which I would need)
I'm getting the following error:
"GtkDialog mapped without a transient parent. This is discouraged.
This tool has been deprecated, use 'gio info' instead.
See 'gio help info' for more info.
gio: file:///home//Desktop/*: Error when getting information for file “/home//Desktop/*”: No such file or directory"
Looks cool. I've downloaded and placed the files in the scripts folder according to the instructions. Now what?
Your instructions jump from copying the files to: "1. During initial run of the script..." - HOW DO I DO THIS? Seems to be some steps missing in between there. I'm a n00b please help thanks.
The script should be executable, if not, change the permission "Executable" or "Allow file to run as program" using the Properties window (usually at the bottom of the right-click context menu or by pressing Ctrl I when the file is selected). Then you should be able to run it by just double-clicking it, if not: open a terminal, navigate to the directory you placed the files inside using "cd " and then type "./Happy_Desktop.sh".
Hi.
For current debian testing (buster), command "gvfs-info" has been deprecated:
https://manpages.debian.org/testing/gvfs-common/gvfs-info.1.en.html
Please, make modification for you script with using "gio info" instead "gvfs-info".
Thanks.
just tried this as i'm very anxious to find a way to key icons tidy on the desktop. after installation i just get a dialog box saying that 'Only Nautilus, Nemo and Caja file managers are supported!' got the same message in caja and nautilus. i'm running ubuntu studio 18.04 and mate 1.20.1.
The error message means (as far as I understand it) something like "This script can only operate properly if your desktop manager is Nautilus, Nemo or Caja."
Liking this a lot now, but would suggest simplifying things to make it nice & slick:-
Change initial menu to offer only 3 things:
1) Align desktop icons to grid
2) Set grid (number of H/V icons on desktop)
3) Go to programmer's showcase version of 'Happy Desktop'
where 3) is your current version. I'm pretty new to Ubuntu, but admire the way you show off techniques for doing things, though it kind of pulls things in 2 different directions.
Lastly, looks 200% better with nice, shiny, glossy icon for 'Happy Desktop' rather than your current offering and with a name like 'Arrange Icons' looks lovely on my desktop - would like to post pic but I'm new to opendesktop & don't know if possible.
(my last post still stands, it's a problem that wants fixed)
I had trouble with icon positions not refreshing until system restart.
Tracked it down to "the move operation forces a desktop refresh" section does not work if not owner & unable to create the /var/tmp/Desktop directory (e.g. if not logged in as root).
Changing this directory to one I have r/w access to solves things.
There is a bug in Linux Mint 18.3 cinnamon which causes the "system icons" to be overlaid one atop another during boot-up, login, or whenever an icon is added to the desktop (via mounting a device or otherwise). The "solution" is to right-click on the desktop, then click "Desktop > By Name" (which properly aligns the system icons), then run "Happy Desktop > Restore Icon Positions" to restore the rest of your desktop layout.
Ratings & Comments
19 Comments
Cannot get to work in linux mint 20.3. Unable to determine my desktop manager.
9 I created a German translation, if you're interested: [Deutsch] main1=Symbolpositionen speichern main2=Symbolpositionen im Gitter speichern main3=Symbolpositionen wiederherstellen main4=Konfiguration main5=Hilfe main6=Über main7=Objekt auswählen main8=Letzte Aktion rückgängig machen main9=Überlappende Desktopsymbole voneinander trennen pb_done=Fertig pb_select=Auswählen pb_return=Zurück pb_edit=Bearbeiten pb_save=Speichern pb_cancel=Abbrechen config1=Sprache config2=Desktopsymbole pro Zeile config3=Desktopsymbole pro Spalte config4=Linker Randabstand config5=Oberer Randabstand config6=Gitterbreite config7=Gitterhöhe config8=Objekt zum Bearbeiten auswählen msg1=Symbolpositionen gespeichert msg2=Symbolpositionen wiederhergestellt msg3=Drücken Sie [F5] um den Desktop neu zu laden msg4=Neuen Wert eingeben für msg5=Negative Werte sind\n nicht erlaubt! msg6=Die Werte müssen Ziffern sein ... Nicht Text! msg7=Symbolpositionen aktualisiert msg8=Möchten Sie ei Desktopsymbol erstellen,\num dieses Programm zu starten msg9=Die Bildschirmauflösung hat sich geändert von msg10=zu msg11=seit die Symbolpositionen das letzte mal gespeichert wurden. msg12=Die Standardvergrößerungsstufe hat sich geändert von msg13=Dies wird das bisherige Desktopsymbol ersetzen msg14=Initialisierungswerte müssen angegeben werden! msg15=Initialisiere Abstände zwischen den Desktopsymbolen msg16=Geben Sie die Werte ein, die Sie haben möchten: msg17=Symbolpositionen im Gitter gespeichert msg18=Abbrechen... msg19=Einstellung ist zu klein msg20=Einstellung ist zu groß msg21=Gittergröße ist zu klein msg22=Die folgenden Desktopsymbole konnten nicht wiederhergestellt werden msg23=Desktopsymbole erfolgreich voneinander getrennt msg24=Bitte treffen Sie eine Auswahl! msg25=Einige Desktopsymbole wurden nicht gefunden und wurden möglicherweise vor Kurzem gelöscht msg26=Nur die Dateimanager Nautilus, Nemo and Caja werden unterstützt! msg27=Das Desktopverwaltungsprogramm konnte nicht herausgefunden werden msg28=Desktopsymbol erstellen msg29=Symbolpositionen wurden nicht wiederhergestellt msg30=Folgendes konnte nicht gefunden werden: msg31=Desktopsymbolvergrößerungsstufe msg32=Nicht definiert Also would it be great if the script was able to do certain tasks without user invention, for example using a new option like "Add Autostart entry for task" i which the user could specify if he wants the script to restore the icon positions every time he logs in to his Computer. (which I would need)
Sorry for that jumbled mess, I didn't know this comment function removes every newline before posting...
Here is the translation without being messed up by a comment function: https://dateien.lampe2020.de/Verbesserungen für externe Programme/Happy Desktop/happy_desktop_lang Also would it be great if the script would be able to do certain tasks without user invention, for example using a new option like "Add Autostart entry for task" i which the user could specify if he wants the script to restore the icon positions every time he logs in to his Computer. (which I would need)
user intervention, not Invention ;)
10 Perfect. Works quickly in Ubuntu 19.04 Disco Dingo 64-bit with Cinnamon v3.8.8 in 4K for over 140 icons of various sizes.
Failed to determine the desktop manager ... Aborting After selecting language it gives above error on Linux Mint 19 Tara, Umbutu, Gnome
It's simple bash script fixed it. In my environment it work now. Ubuntu 19.04 with nemo desktop handle. https://yadi.sk/d/XQ4nqnfl25j9Pg
I'm getting the following error: "GtkDialog mapped without a transient parent. This is discouraged. This tool has been deprecated, use 'gio info' instead. See 'gio help info' for more info. gio: file:///home//Desktop/*: Error when getting information for file “/home//Desktop/*”: No such file or directory"
Looks cool. I've downloaded and placed the files in the scripts folder according to the instructions. Now what? Your instructions jump from copying the files to: "1. During initial run of the script..." - HOW DO I DO THIS? Seems to be some steps missing in between there. I'm a n00b please help thanks.
The script should be executable, if not, change the permission "Executable" or "Allow file to run as program" using the Properties window (usually at the bottom of the right-click context menu or by pressing Ctrl I when the file is selected). Then you should be able to run it by just double-clicking it, if not: open a terminal, navigate to the directory you placed the files inside using "cd " and then type "./Happy_Desktop.sh".
I meant "cd path", not "cd "...
On Ubuntu 18.04 runs pretty well. I cannot see though an option to automatically order the icons to the grid.
Hi. For current debian testing (buster), command "gvfs-info" has been deprecated: https://manpages.debian.org/testing/gvfs-common/gvfs-info.1.en.html Please, make modification for you script with using "gio info" instead "gvfs-info". Thanks.
just tried this as i'm very anxious to find a way to key icons tidy on the desktop. after installation i just get a dialog box saying that 'Only Nautilus, Nemo and Caja file managers are supported!' got the same message in caja and nautilus. i'm running ubuntu studio 18.04 and mate 1.20.1.
The error message means (as far as I understand it) something like "This script can only operate properly if your desktop manager is Nautilus, Nemo or Caja."
Liking this a lot now, but would suggest simplifying things to make it nice & slick:- Change initial menu to offer only 3 things: 1) Align desktop icons to grid 2) Set grid (number of H/V icons on desktop) 3) Go to programmer's showcase version of 'Happy Desktop' where 3) is your current version. I'm pretty new to Ubuntu, but admire the way you show off techniques for doing things, though it kind of pulls things in 2 different directions. Lastly, looks 200% better with nice, shiny, glossy icon for 'Happy Desktop' rather than your current offering and with a name like 'Arrange Icons' looks lovely on my desktop - would like to post pic but I'm new to opendesktop & don't know if possible. (my last post still stands, it's a problem that wants fixed)
I had trouble with icon positions not refreshing until system restart. Tracked it down to "the move operation forces a desktop refresh" section does not work if not owner & unable to create the /var/tmp/Desktop directory (e.g. if not logged in as root). Changing this directory to one I have r/w access to solves things.
There is a bug in Linux Mint 18.3 cinnamon which causes the "system icons" to be overlaid one atop another during boot-up, login, or whenever an icon is added to the desktop (via mounting a device or otherwise). The "solution" is to right-click on the desktop, then click "Desktop > By Name" (which properly aligns the system icons), then run "Happy Desktop > Restore Icon Positions" to restore the rest of your desktop layout.