在用 eOS 的时候,你可能会遇到系统托盘的问题,有些需要托盘的软件比如说 QQ,没办法在 eOS 的 Wingpanel 上显示,一最小化就不见了,或者出现一个 System tray 的窗口,很麻烦。这是由于 elementaryOS 是没有系统托盘的,只有 Wingpanel,如果软件没有 appindicator,就不会显示在 Wingpanel 上显示,这是官方解释。本文章提供一种不是很完美的解决方案,能暂时解决系统托盘问题。

我的博客原文:

http://elementarycomminity.ml/journal/elementaryos%E7%B3%BB%E7%BB%9F%E6%89%98%E7%9B%98%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88

python-appindicator

python-appindicator只对python写的程序有用,比如goagent、dropbox。打开终端并输入:

sudo apt-get install python-appindicator

安装完成之后,便可以显示python程序的托盘。

stalonetray

但是其它非python的程序也无法显示在Wingpad上,博主也找不到办法让它们显示在Wingpad上,但是有一种折中的解决方案。就是把系统托盘独立出来,需要用到stalonetray,安装可参考这里。默认是显示在左上方,需要修改一下配置文件~/.stalonetrayrc。

# background # 颜色可以是HTML十六进制形式,也可以是从rgb.txt中的颜色名称,注意颜色前必须加#
background "#777777" # decorations # 设置托盘显示形式
# 可选值: all, title, border, none
decorations none # display # as usual
# dockapp_mode # set dockapp mode, which can be either simple (for
# e.g. OpenBox, wmaker for WindowMaker, or none
# (default). NEW in 0.8.
dockapp_mode none
# fuzzy_edges [] # enable fuzzy edges and set fuzziness level. level
# can be from 0 (disabled) to 3; this setting works
# with tinting and/or transparent and/or pixmap
# backgrounds
fuzzy_edges 0 # geometry # 托盘的几何形状;
geometry 1x1+0+0 # grow_gravity # 可选值有:N, S, E, W, NW, NE, SW, SE; 托盘图标的增长方式。
grow_gravity NW # icon_gravity # 托盘图标的方向: NW, NE, SW, SE
icon_gravity NW # icon_size # spe
icon_size 24 # log_level # controls the amount of logging output, level can
# be err (default), info, or trace (enabled only
# when stalonetray configured with --enable-debug)
# NEW in 0.8.
log_level err # kludges kludge[,kludge] # enable specific kludges to work around
# non-conforming WMs and/or stalonetray bugs.
# NEW in 0.8. Argument is a
# comma-separated list of
# * fix_window_pos - fix tray window position on
# erroneous moves by WM
# * force_icon_size - ignore resize events on all
# icons; force their size to be equal to
# icon_size
# * use_icon_hints - use icon window hints to
# dtermine icon size # max_geometry # maximal tray dimensions; 0 in width/height means
# no limit
max_geometry 0x0 # no_shrink [] # disables shrink-back mode
no_shrink false # parent_bg [] # whether to use pseudo-transparency
# (looks better when reparented into smth like FvwmButtons)
parent_bg false # pixmap_bg <path_to_xpm> # use pixmap from specified xpm file for (tiled) background
# pixmap_bg /home/user/.stalonetraybg.xpm # scrollbars # enable/disable scrollbars; mode is either
# vertical, horizontal, all or none (default)
# NEW in 0.8.
scrollbars none # scrollbars-size # scrollbars step in pixels; default is slot_size / 4
# scrollbars-step 8 # scrollbars-step # scrollbars step in pixels; default is slot_size / 2
# scrollbars-step 32 # slot_size # specifies size of icon slot, defaults to
# icon_size NEW in 0.8. # skip_taskbar [] # hide tray`s window from the taskbar
skip_taskbar true # sticky [] # make a tray`s window sticky across the
# desktops/pages
sticky true # tint_color # set tinting color
tint_color white # tint_level # set tinting level; level ranges from 0 (disabled)
# to 255
tint_level 0 # transparent [] # whether to use root-transparency (background
# image must be set with Esetroot or compatible utility)
transparent false # vertical [] # whether to use vertical layout (horisontal layout
# is used by default)
vertical false # window_layer # set the EWMH-compatible window layer; one of:
# bootom, normal, top
window_layer normal # window_strut # enable/disable window struts for tray window (to
# avoid converting of tray window by maximized
# windows); mode defines to which screen border tray
# will be attached; it can be either top, bottom,
# left, right, none or auto (default)
window_strut auto # window_type # set the EWMH-compatible window type; one of:
# desktop, dock, normal, toolbar, utility
window_type dock # xsync [] # whether to operate on X server synchronously (SLOOOOW)
xsync false

这里介绍几个重点的,这是我自己的配置文件:

geometry 1x1+2+30      #这个是位置及初始化大小,我这里的大小是1x1,坐标为(+2,+30),其+表示左边与上边,-表示下边与右边
transparent true #是否透明
window_layer bottom #窗口的层次
slot_size 24 #托盘图标占用的大小
icon_size 16 #显示图标大小

这是效果图:

elementaryOS系统托盘解决方案的更多相关文章

  1. Atitit 软件项目系统托盘图标解决方案

    Atitit 软件项目系统托盘图标解决方案 1.1. Nodejs   node-webkit还实现了本地化的API,例如菜单栏,系统的托盘图标支持1 1.2. Java c# qt c++1 1.3 ...

  2. 小菜学习Winform(七)系统托盘

    前言 有些程序在关闭或最小化的时候会隐藏在系统托盘中,双击或右击会重新显示,winform实现其功能很简单,这边就简单的介绍下. 实现 在winform实现托盘使用notifyIcon控件,如果加菜单 ...

  3. 将 VMware 最小化到系统托盘

    1, 下载 Trayconizer官网地址: http://www.whitsoftdev.com/trayconizer/下载地址: http://www.whitsoftdev.com/files ...

  4. C#编写WIN32系统托盘程序

    基本功能概述: 程序运行后驻留系统托盘,左键呼出,右键退出.后续可加右键菜单. 注册系统案件WIN+F10,呼出程序. 重写系统消息,最小化和关闭按钮隐藏程序 using System; using ...

  5. WP7系统托盘和应用程序栏

    (一)系统托盘和应用程序栏系统托盘(1)显示系统级别的状态信息(2)Apps能隐藏和显示系统托盘Micosoft.Phone.Shell.SystemTray.IsVisible=true;应用程序栏 ...

  6. 用Qt写软件系列四:定制个性化系统托盘菜单

    导读 一款流行的软件,往往会在功能渐趋完善的时候,通过改善交互界面来提高用户体验.毕竟,就算再牛逼的产品,躲藏在糟糕的用户界面之后总会让用户心生不满.界面设计需综合考虑审美学.心理学.设计学等多因素, ...

  7. Qt系统托盘

    Qt的系统托盘的使用,可比mfc中好多了!他封装了一个专门的QSystemTrayIcon类,建立系统托盘图标.其实在Qt提供的示例程序已经很不错了,$QTDIR\examples\desktop\s ...

  8. C# WinForm窗口最小化到系统托盘

    * C# WinForm窗口最小化到系统托盘http://hi.baidu.com/kfxtgtqyapouyze/item/8ccfdcd5a174a7312a35c7c3 主要功能:(1).程序启 ...

  9. WPF 系统托盘 图标闪烁

    WPF消息通知 系统托盘,图标闪烁 using System.Windows.Forms; using System.Windows.Threading; public partial class W ...

随机推荐

  1. 如何深入理解 StatsD 与 Graphite ?

    众所周知,StatsD 负责收集并聚合测量值.之后,它会将数据传给 Graphite,后者以时间序列为依据存储数据,并绘制图表.但是,我们不知道,基于 http 访问的图表在展示时,是基于每秒钟的请求 ...

  2. structs spring hibernate 三者之间有什么关系?

    现在开发流行MVC模式,structs在C(控制器)中使用:hibernate在M(模型)中被使用:至于 spring ,最大的作用在于,structs.hibernate的对象,由于在各个层之间相互 ...

  3. POJ 2528 Mayor's posters (线段树,染色问题,离散化要注意)

    做这题建议看一下该题的discuss. #include <iostream> #include <stdio.h> #include <string.h> #in ...

  4. SDUT2482二叉排序树

    http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=2482&cid=1184 题目描述 二叉排序树的定义是:或者是一棵空树,或者是具有下列性质 ...

  5. 简单易懂的现代魔法——Play Framework攻略1

    哇哈哈,寒假结束啦,于是我又开新坑了....这次的主角可是大名鼎鼎的Play Framework!!那么闲话少说,开始攻略吧! 1.什么是Play Framework? 大名鼎鼎的play frame ...

  6. 小米2000万买域名mi.com

    来源:互联网的一些事   移动互联网之下,域名对于企业的吸引力将会越来越低,因为网站的入口多元化,不再仅凭域名.小米用超2000万人民币的代价购买mi.com域名,仅仅是为了所谓的国际化吗?小米此举, ...

  7. QQ拼音还是不行哇

    QQ拼音还是不行啊,虽说没广告,但是很多词条没有,例如知乎.蒋京虎. 泰囧……

  8. lintcode 中等题:minimum window substring 最小子串覆盖

    题目 最小子串覆盖 给定一个字符串source和一个目标字符串target,在字符串source中找到包括所有目标字符串字母的子串. 样例 给出source = "ADOBECODEBANC ...

  9. jquery通过ajax-json访问java后台传递参数,通过request.getParameter获取不到参数的说明

    http://m.blog.csdn.net/blog/eyebrother/36007145 所以当后台通过request.getParameter("name");对参数值的作 ...

  10. C#语句及案例

    今天学习了,C#语句部分的分支语句,差点转不过弯来. 语句分类: 1.顺序语句 2.选择语句(分支语句) 3.循环语句 分支语句 (一)if(){} ; 按照顺序哪个if条件适合,执行哪个. 不合适就 ...