Quick optimization of jpeg files in a directory (Linux bash)

Firstly install jpegoptim.

You can do this on Debian like systems using apt:

sudo apt-get update && sudo apt-get install jpegoptim

Then go to directory with jpeg files and use this command:

find . -name '*.jpg' -exec jpegoptim -m70 -o -f --strip-all {} \;

It will find all jpg files recursively and optimize with following settings:

  • m70 stands for jpeg quality (about 70 – 80 should be fine but lossy)
  • o is for overwrite
  • f is for force
  • strip-all removes all EXIF and other textual data from files

How to install Google Chrome and fix the goddamn icon after it?

  1. Navigate to: https://www.google.pl/chrome/browser/desktop/index.html
  2. Download deb file using Download Chrome button.
  3. Run terminal and type:
    cd ~/Downloads
    sudo dpkg -i google-chrome-stable_current_amd64.deb
    sudo apt-get update && sudo apt-get -f upgrade
  4. If you don’t have proper icon in your menu nor plank:
    sudo nano /usr/share/applications/google-chrome.desktop
  5. Find [Desktop Action NewWindow] and add text below after all language declarations:
  6. Press both CTRL + X and save your changes. That’s it 🙂

How to install Spotify on Loki 0.4.1?

Run terminal and type:

sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-add-repository "deb http://repository.spotify.com stable non-free"
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 94558F59 D2C19886
sudo apt-get update
sudo apt-get install spotify-client

In case of a problem please comment below. Official instruction can be found here (it was incomplete at the moment of writing).