Created
January 5, 2016 18:21
-
-
Save GuilhermeBarile/a3d91319e83c65624708 to your computer and use it in GitHub Desktop.
Revisions
-
Guilherme Barile created this gist
Jan 5, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,51 @@ #!/bin/bash # ----------------------------------------------------------- # -- Write psdthumbnailer # ----------------------------------------------------------- OUTFILE=/usr/lib/psdthumbnailer ( sudo cat <<'EOF' # bin/bash # Arguments / Parameters %i %o %s f_in=$1 f_out=$2 f_size=$3 # Execute Convert PSD to PNG through ImageMagick exec convert "psd:$f_in[0]" -scale "$f_sizex$f_size" "png:$f_out" EOF ) > $OUTFILE # ----------------------------------------------------------- # -- Write photoshop.thumbnailer # ----------------------------------------------------------- OUTFILE=/usr/share/thumbnailers/photoshop.thumbnailer ( sudo cat <<'EOF' # bin/bash [Thumbnailer Entry] TryExec=/usr/lib/psdthumbnailer Exec=/usr/lib/psdthumbnailer %i %o %s MimeType=image/vnd.adobe.photoshop; image/x-photoshop; image/x-psd; EOF ) > $OUTFILE # ----------------------------------------------------------- # -- Set File Permissions # ----------------------------------------------------------- sudo chmod 0755 /usr/lib/psdthumbnailer sudo chmod 0644 /usr/share/thumbnailers/photoshop.thumbnailer # ----------------------------------------------------------- # -- Add GConf Hooks to parse thumbnails # ----------------------------------------------------------- sudo gconftool-2 --set /desktop/gnome/thumbnailers/[email protected]/enable --type bool true sudo gconftool-2 --set /desktop/gnome/thumbnailers/[email protected]/command --type string "/usr/lib/psdthumbnailer %i %o %s %i %o %s" # ----------------------------------------------------------- # -- Install Dependencies # ----------------------------------------------------------- sudo apt-get install imagemagick