LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: sw2wolf

关于openbox的窗口图标?

[复制链接]
 楼主| 发表于 2009-4-30 07:47:42 | 显示全部楼层
lxpanel的配置文件就一个: ~/.config/lxpanel/default/panels/panel
Plugin {
    type = launchbar
    Config {
        Button {
            id=firefox.desktop
        }
        Button {
            id=roxterm.desktop
        }
...
}

firefox.desktop:
...
Icon=/home/sw2wolf/.icons/firefox-document.png
...

roxterm.desktop:
Icon=/home/sw2wolf/.icons/roxterm_logo.png

图标在lxpanel中都显示正常, 但用ALT+TAB时firefox有自己的图标,而roxterm没有!
回复 支持 反对

使用道具 举报

发表于 2009-4-30 10:15:07 | 显示全部楼层
lxpanel 的 launchbar 实现与 fbpanel 不同。其 launchbar 的 Button 块里面支持四种属性:(看了最新的 0.4.0 代码)
  1. id、image、tooltip、action
复制代码
定义 id 后:
 image 定义可替换 id 里面的图标
 action 定义可替换 id 里面的命令
或不用 id,而用 image+action 定义 button 应该也可以

注意 lxpanel 可能从以下几个位置查找并读取 “*.desktop” 文件:(在 id 定义时指定绝对路径可避免查找多个位置)
  1. ~/.local/share/applications
  2. /usr/share/applications
  3. /usr/local/share/applications
复制代码

在 lxpanel 0.4.0 的代码没有看到 icons 插件
回复 支持 反对

使用道具 举报

发表于 2009-4-30 12:41:24 | 显示全部楼层
特意安装了 roxterm,问题大概知道了。

在 xterm 运行 roxterm:
  1. (roxterm:3126): Gtk-WARNING **: Error loading icon from file '/usr/share/icons/hicolor/scalable/apps/roxterm.svg':
  2.         Failed to open file '/usr/share/icons/hicolor/scalable/apps/roxterm.svg': 没有那个文件或目录
复制代码
但图标文件 “/usr/share/icons/hicolor/scalable/apps/roxterm.svg” 是存在的,并且可以用 gimp 打开。不知为何 roxterm 自己却无法打开?

解决的办法:(权宜之计)
  1. sudo rm /usr/share/icons/hicolor/scalable/apps/roxterm.svg
  2. sudo cp /usr/share/doc/roxterm/imgs/roxterm_logo.png /usr/share/icons/hicolor/scalable/apps/roxterm.svg
复制代码

顺便试用了一下 roxterm,确实不错
回复 支持 反对

使用道具 举报

发表于 2009-4-30 12:54:19 | 显示全部楼层
svg文件打不开,估计是没有装相关的支持。看看是不是安装了 librsvg,没有的话,试试装上这个。这个是我google fbpanel的作者在开发的时候,有人提交bug时说的,作者建议安装librsvg。
回复 支持 反对

使用道具 举报

发表于 2009-4-30 12:58:52 | 显示全部楼层
我这里安装了 librsvg
回复 支持 反对

使用道具 举报

发表于 2009-4-30 13:01:06 | 显示全部楼层
另外,我个人还是认为icon和image不是同一个概念。icon是一个图标的定义,它定义的图标可以用image来描述而已。我个人的理解是:icon有3个部分,名称:icon, 显示的图片:image,相关描述的程序:classname。 在icons定义好的icon,能被其他plugin引用。在其他plugin的相关描述,可以使用icon定义图标,也可以使用image描述图标。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-30 13:35:42 | 显示全部楼层
Post by nat;1981560
特意安装了 roxterm,问题大概知道了。

在 xterm 运行 roxterm:
  1. (roxterm:3126): Gtk-WARNING **: Error loading icon from file '/usr/share/icons/hicolor/scalable/apps/roxterm.svg':
  2.         Failed to open file '/usr/share/icons/hicolor/scalable/apps/roxterm.svg': 没有那个文件或目录
复制代码

但图标文件 “/usr/share/icons/hicolor/scalable/apps/roxterm.svg” 是存在的,并且可以用 gimp 打开。不知为何 roxterm 自己却无法打开?

解决的办法:(权宜之计)
  1. sudo rm /usr/share/icons/hicolor/scalable/apps/roxterm.svg
  2. sudo cp /usr/share/doc/roxterm/imgs/roxterm_logo.png /usr/share/icons/hicolor/scalable/apps/roxterm.svg
复制代码


顺便试用了一下 roxterm,确实不错

roxterm搞定, 原来是SVG的问题! 现在就差rdesktop了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表