在用 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. What are Scopes?

    scope is an object that refers to the application model. It is an execution context for expressions. ...

  2. 【hadoop2.6.0】一句话形容mapreduce

    网上看到的: We want to count all the books in the library. You count up shelf #1, I count up shelf #2. Th ...

  3. ubuntu安装hadoop2.6

    一:单机版 1.sudo gedit ~/.bashrc 加入JDK路径 #HADOOP VARIABLES START export JAVA_HOME=/usr/lib/jvm/java-1.7. ...

  4. IOS 视图控制对象生命周期-init、viewDidLoad、viewWillAppear、viewDidAppear、viewWillDisappear等的区别及用途

    iOS视图控制对象生命周期-init.viewDidLoad.viewWillAppear.viewDidAppear.viewWillDisappear.viewDidDisappear的区别及用途 ...

  5. mysql 多表 update sql语句总结

    mysql 多表 update 有几种不同的写法. 假定我们有两张表,一张表为Product表存放产品信息,其中有产品价格列Price:另外一张表是ProductPrice表,我们要将ProductP ...

  6. Project Euler 90:Cube digit pairs 立方体数字对

    Cube digit pairs Each of the six faces on a cube has a different digit (0 to 9) written on it; the s ...

  7. lintcode 中等题:Letter Combinations of a Phone Number 电话号码的字母组合

    题目 电话号码的字母组合 给一个数字字符串,每个数字代表一个字母,请返回其所有可能的字母组合. 下图的手机按键图,就表示了每个数字可以代表的字母. 样例 给定 "23" 返回 [& ...

  8. [Unity菜鸟] Time

    1. Time.deltaTime 增量时间 以秒计算,完成最后一帧的时间(秒)(只读) 帧数所用的时间不是你能控制的.每一帧都不一样,游戏一般都是每秒60帧,也就是updata方法调用60次(假如你 ...

  9. Python数字加千分符

    1.最简单的内置format函数: >>> format(1234567890,',') '1,234,567,890' 2.正则表达式: import re def formatN ...

  10. swfupdate flash上传工具

    引用:http://baike.baidu.com/view/1332553.htm 下载地址:http://code.google.com/p/swfupload/ 什么是SWFUpload? SW ...