Skip to content

Instantly share code, notes, and snippets.

@echuber2
Created October 24, 2020 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save echuber2/a7e1c57a108283082b1f6bf8f076d3a5 to your computer and use it in GitHub Desktop.
Save echuber2/a7e1c57a108283082b1f6bf8f076d3a5 to your computer and use it in GitHub Desktop.
Restart nemo in Cinnamon
#!/bin/bash
echo Asking nemo to quit...
nemo --quit &
sleep 2
echo Killing nemo... 6 seconds remaining
killall -9 nemo
nemo --quit &
sleep 2
echo Killing nemo... 4 seconds remaining
nemo --quit &
sleep 2
echo Killing nemo... 2 seconds remaining
killall nemo
sleep 2
killall -9 nemo
echo Resetting background...
gsettings set org.nemo.desktop background-fade false
gsettings set org.nemo.desktop background-fade true
echo Restarting nemo...
nemo -n > /dev/null 2>&1 & disown
@echuber2
Copy link
Author

echuber2 commented Oct 24, 2020

This script was meant to restart nemo independently from Cinnamon if it begins acting strangely. It may not be needed in newer versions of nemo. The multiple rounds of quitting and killing were (originally) necessary to get it to actually quit and restart successfully.

I forget why I had the gsettings calls. Something used to get weird with desktop icons from time to time too.

@Maxcrazy1
Copy link

Glorious, very thx ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment