I was in the situation that an application I had was not available in the Unity applications lens after I removed a custom .desktop
launcher file in my home directory that had overridden the system-wide one.
My problem was that I needed to apply those changes and update in this case the database of installed .desktop
files, but other similar scenarios are also imaginable.
So what could I have done (and do the next time) instead of rebooting or logging out and back in to update the Unity configuration and force it to reload and reinitialize all of its stuff?
I am on 15.10, so unity --reset &
does not work because it's deprecated.
I then tried unity --replace &
instead, but that crashed my desktop and rendered my TTY7 unusable. It first flashed dark and looked like it was restarting Unity and restoring the desktop, but then it did not react to anything any more. Switching to TTY1 and back left me with a black screen plus mouse cursor. After rebooting via TTY1 login and reboot
, it worked again and Unity even recognized my application now.
But if I would have been in a situation where a reboot or logout was no option, what would have been my way to go?
Press Alt+F2 type
unity
and press Enter.Unity is just a Compiz plugin, you can reload it using:
Or to let you close terminal
To confirm, you can check:
Another way, light reload only the plugin (very quick)
Create the
compiz_plugin_reloader
scriptSource: iXce’s blog: Compiz plugin reloader
Fix permissions
Run as: