Mar*_*cus 34 icons unity unity-dash
我在手动安装 Eclipse Juno 时遇到问题。将 tarball 解压缩到 后/opt
,添加一个符号链接/usr/local/bin
并将以下内容添加到新文件中/usr/share/applications/eclipse.desktop
:
[Desktop Entry]
Version=1.0
Name=Eclipse
GenericName=Integrated Development Application
Comment=Eclipse Juno
Exec=/usr/local/bin/eclipse
TryExec=/usr/local/bin/eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Development;IDE;
Run Code Online (Sandbox Code Playgroud)
我仍然从破折号中得到这种奇怪的行为:
Eclipse 运行得很好,图标是可点击的,但正如您所见,尺寸有点小。我怎样才能解决这个问题?Unity 不应该自动缩放图标吗?
Ant*_*ane 26
ln -s /opt/eclipse/icon.xpm ~/.local/share/icons/eclipse4.xpm
仅供您的用户使用或
须藤 ln -s /opt/eclipse/icon.xpm /usr/share/icons/eclipse4.xpm
对于所有用户
eclipse.desktop
文件(在~/.local/share/applications
或/usr/share/applications
)中,将Icon=/opt/eclipse/icon.xpm 替换为Icon=eclipse4。您不需要添加.xpm
后缀。如有必要,还可以Icon[en_US]
使用相同的值更新行。
该文件eclipse.desktop
可能具有不同的名称,具体取决于您用于创建它的工具。
编辑:感谢 Pius, QD 改进答案。和 iAm 评论
小智 11
@Tawane 我将符号链接添加到 ~/.local/share/icons/ 中,这可能使它更容易:
ln -s /opt/eclipse/icon.xpm ~/.local/share/icons/eclipse.xpm
Run Code Online (Sandbox Code Playgroud)
小智 10
this may help you...
you can save image and change icon to this.
I scaled image icon.xpm size to 48 x 48 pixel which is in eclipse application
It looks well:
48x48 may look a little blurry on higher (or even medium) resolution. You may use 512x512 (even though it's a little bit an overkill) to ensure your system resizes it to whatever is used. PNGs are resized properly, so you can always supply it with a bigger image than actually displayed.
512x512 icon version can be found here: Eclipse icon
The image is taken from Eclipse help page: Eclipse help page
Axe*_*xel -1
eclipse目录(eclipse.xpm)中的图标大小为256x256。将其替换为较小的(48x48 对我来说适用)。