在查看列表中的文件时,可以让 Nautilus 显示 Photoshop .psd 文件缩略图吗?
如果是,具体步骤是什么?一直在谷歌上搜索,但还没找到。
谢谢
答案1
好的,找到了这个,它对我大多数的.psd文件都有效:
#!/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
答案2
尝试一下该开发人员维护的程序:https://moritzmolch.com/1749
我认为它可能比上面的脚本更好,因为上面的脚本对我来说不起作用,而这个脚本似乎维护得很好,对其他人也起作用。它对我来说不起作用,但我认为这是因为尝试使用此页面上的脚本弄乱了我的设置 :(
答案3
安装Ubuntu PSD 缩略图
sudo apt install librsvg2-common
答案4
我刚刚将它安装到 Ubuntu 21.04 / GNOME 3(可能是 40)版本:
# become root
sudo su
# ensure imagemagick is there
apt install imagemagick
# create script for thumbnailer
cat <<'EOF' > /usr/local/bin/gnome-thumnbail-psd
#!/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
chmod a+x /usr/local/bin/gnome-thumnbail-psd
cat <<'EOF' > /usr/share/thumbnailers/photoshop.thumbnailer
[Thumbnailer Entry]
TryExec=gnome-thumnbail-psd
Exec=gnome-thumnbail-psd %i %o %s
MimeType=image/vnd.adobe.photoshop; image/x-photoshop; image/x-psd;
EOF
sudo chmod 0644 /usr/share/thumbnailers/photoshop.thumbnailer
可以在 org.gnome.desktop.thumbnailer 的 gsettings 中找到一些用于禁用特定缩略图的键。无需在 GNOME 3 中进行调整!无需重新启动 Nautilus!也许只需按 F5 即可。