在用 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. 如何用 ANTLR 4 实现自己的脚本语言?

    ANTLR 是一个 Java 实现的词法/语法分析生成程序,目前最新版本为 4.5.2,支持 Java,C#,JavaScript 等语言,这里我们用 ANTLR 4.5.2 来实现一个自己的脚本语言 ...

  2. mac os 下如何清除/切换svn eclipse插件的用户

    以mac os x为例(Unix/Linux类似), 1.打开命令行窗口,即用户的根目录(用户的home目录) $ ls -al ... drwxr-xr-x   6 linxyz  staff   ...

  3. mac上eclipse上配置hadoop

    在mac上安装了eclipse之后,配置hadoop其实跟在linux上配置差不多,只是mac上得eclipse和界面和linux上得有点不同. 一:安装eclipse eclipse得安装比较简单, ...

  4. 深入浅出ES6(二):迭代器和for-of循环

    作者 Jason Orendorff  github主页  https://github.com/jorendorff 我们如何遍历数组中的元素?20年前JavaScript刚萌生时,你可能这样实现数 ...

  5. java基础知识回顾之java集合类-Properties集合

    /** java.lang.Object   |--java.util.Dictionary<K,V>      |--java.util.Hashtable<Object,Obje ...

  6. POJ1008Maya Calendar

    http://poj.org/problem?id=1008&lang=default&change=true 这个题倒是不难,就是麻烦一点,但是还WA了几次都是因为处理天数的时候没处 ...

  7. 将DJANGO管理界面的filter_horizontal移到前面来复用

    参考URL: http://www.hoboes.com/Mimsy/hacks/replicating-djangos-admin/reusing-djangos-filter_horizontal ...

  8. Test Markdown Editor

    Last night, I just saw a cute blogger's homepage. Then I want to write something. But anyway, I use ...

  9. hdu 1753 大明A+B

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=1753 容易出错的事例: 0.1 0.2 1.88 22.22 1 0.01 大概出错的几个点,做久了思维根 ...

  10. jackson基于注解的简单使用

    Jackson提供了一系列注解,方便对JSON序列化和反序列化进行控制,下面介绍一些常用的注解. 1.@JsonIgnore 此注解用于属性上,作用是进行JSON操作时忽略该属性. 2.@JsonFo ...