Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
zh-cn:tips [2012/04/21 06:14] – [Customize the font in clock panel plugin] haobug | zh-cn:tips [2012/04/28 17:28] – [解决方案 1] haobug | ||
---|---|---|---|
Line 11: | Line 11: | ||
* ''< | * ''< | ||
- | ===== Performance Tips ===== | + | ===== 性能提示 |
- | Lets face it: one of the reasons for using Xfce is performance. It is lighter and more responsive than Gnome on almost all hardware, especially on machines with less memory and processor power. | + | 让我们面对它吧:使用 |
- | ==== Fonts ==== | + | ==== 字体 |
- | Fonts play a **huge** part in GUI performance. With all of the font smoothing, hinting and rendering turned on, you may notice significant latency when menus or dialog boxes appear. When you turn all of these off, menus and dialog boxes will appear | + | 字体对 GUI 性能有**极大**影响。全部打开字体平滑,微调和渲染,你会注意菜单对话框出现时有明显的延迟。当你把这些全部关闭,出现要快(实际上是敏捷)**很多**。 |
- | The only problem with turning off hinting/ | ||
- | Using the Fixed font (12+) looks nice on a crt monitor works nicely for me. it is easy to read and i don't need to use anti-aliasing. it looks good and runs fast! | + | 关掉这这些微调/ |
+ | 看起来非常光滑,只是可能看起了有点粗。也欢迎推荐其他字体。 | ||
- | ==== Background Color ==== | + | 我在 CRT 显示器上使用 Fixed 字体(12号+),感觉效果很好。很容易看清不用开抗锯齿。看起为不错并且跑得快。 |
+ | ==== 背景颜色 | ||
- | I regularly connect remotely using vncserver, and I always noticed very slow and sluggish response, especially whenever I closed an application window. For example, when closing | + | 我经常使用 |
+ | 我修改了我的背景为纯白色,现在的所有程序(包括 | ||
- | Right-click on the desktop and choose Settings then Desktop Settings. Make sure Show Image is UNchecked, and set the Color Style to Solid Color, and then set First Color to white (#FFFFFF). | + | 右击桌面,选择”设置“,然后”桌面设置“。请确保”显示图像“是未选中的。并设置”颜色风格“为”纯色”,然后设置第一个颜色为白色(#FFFFFF)。 |
- | Another option, that may work for some, is to check the options of the program that you are using to connect remotely, and if it has a " | + | 另外一个选择,对一些软件可能有用,那就是查看你用来远程连接的程序的设置选项,如果有”去掉墙纸“或者”不显示墙纸“的选项,那就打开这个选项。我用的是 |
+ | ===== 如何使用 GNOME 菜单 ===== | ||
- | ===== How to use the alternative | + | 如果你想使用 |
- | If you want to use the new menu from GNOME, with quick starters for favorites applications and such, you can use the [[http:// | + | 在您的面板上添加一个新 |
- | Add a new xfapplet item inside your panel, and open its properties dialog to add the GNOME menu applet. | + | 如果你不喜欢GNOME主菜单,可以试一下Ubuntu系统面板,在几种发行上找得到。 |
- | If you don't like GNOME main menu, try Ubuntu System Panel, available in several distributions. | + | 另见:[[/ |
- | See also: [[/ | ||
- | ===== Gtkrc files ===== | + | ===== gtkrc 文件 |
- | * A tutorial about the Gtkrc format can be found [[http:// | + | |
- | * Xfce has also a couple of custom gtkrc settings for some of the applications: | + | * 在[[http://live.gnome.org/GnomeArt/Tutorials/GtkThemes|这里]]有一个 gtkrc 文件格式的教程。 |
- | * You can not define a custom background for Thunar icon/ list views due to a [[http://bugzilla.gnome.org/show_bug.cgi? | + | * Xfce也有一些应用有自定义的 gtkrc 设置:[[http: |
- | * You can define a custom panel background with something like this: | + | * 你不能定义 Thunar 图标/ |
+ | |||
+ | * 你可以像这样定义自定义的面板背景: | ||
# ~/ | # ~/ | ||
Line 73: | Line 76: | ||
class " | class " | ||
- | | + | |
+ | ===== 如何删除和添加系统菜单中应用程序 ===== | ||
- | ===== How to add or remove applications in the system menu ===== | + | === 添加应用程序 |
- | === Add an application === | + | 你必须为你想要添加的应用程序创建一个 |
- | You have to create a .desktop | + | |
- | + | 在下面的例子中,我们在 “多媒体” 菜单中创建了一个名为 “foo” 的子菜单: | |
- | In the following example, we create an entry in the menu with the name "foo" in the submenu " | + | |
[Desktop Entry] | [Desktop Entry] | ||
Line 93: | Line 96: | ||
Categories=Multimedia; | Categories=Multimedia; | ||
- | You can read more about .desktop files [[http:// | + | 你可以在 |
- | The libexo | + | libexo |
- | === Remove an application from the menu === | + | === 删除应用程序 |
- | You can do this in two ways: | + | 你有两种方法: |
- | * First way, and the easier one is to simply remove the .desktop file in the ''/ | + | * 第一种,并且也是更简单的一种就是直接删除 |
- | * The second way is to add this line to the .desktop | + | * 第二种,添加这一行到 |
NoDisplay=true | NoDisplay=true | ||
- | =====How to customize starting | + | =====怎样自定义 |
- | Like most UNIX terminal sessions, | + | 像大多数 |
- | To add your own startup code, edit the xinitrc | + | 请像这样编辑 |
- | * Copy the file / | + | * 复制 |
- | * Add your own code to the file. For example, you could start the rxvt-unicode | + | * 添加你自己的代码到这个文件。例如,你可以启动 |
* source $HOME/ | * source $HOME/ | ||
* # start rxvt-unicode server | * # start rxvt-unicode server | ||
* urxvtd -q -o -f | * urxvtd -q -o -f | ||
- | You can read more about xinitrc | + | 你可以从这了解更多关于 |
==== Starting with showing the Root Window ==== | ==== Starting with showing the Root Window ==== | ||
Line 123: | Line 126: | ||
- | ===== Use the desktop margin | + | ===== 使用桌面空白边 |
- | To set the desktop margins, use the Settings Manager (**Settings Manager | + | 用“设置管理器”(**设置管理器 |
- | The desktop margins are used to limit the size of maximized windows. This may be useful to avoid switching workspaces by accidentally mousing off the side of the screen. | + | 桌面空白边用来限制最大化的窗口的大小。这有助于避免鼠标移动到屏幕边上时意外地切换工作区。 |
- | The margins are also useful if you have only one Xfce panel: the margin area leaves a clear space to pull up application or workspace menus. By default, right click on the desktop (the margin) to show the Xfce menu, or middle (left+right) click to show the workspace menu. | + | 如果你只有一个 |
- | The size of the margins is in pixels, so, with a reasonably modern monitor, at a resolution of, say 1680 x 1050, a setting of '10' will give a margin of about 1/8 of an inch. Note that nothing will change on any open window until you minimize and re-maximize it again. Also note that these margins only apply to maximized windows -- you can manually resize any window right to the edge of the screen if you want to. | + | 空白边的大小以像素为单位,所以在比较新近的显示器上,以分辨率1680 x 1050为例, ‘10’ 会留出大约 |
+ | ===== 处理 ACPI 电源按钮事件,显示 Xfce 注销选项 ===== | ||
- | ===== Handle acpi event for power button, show Xfce logout options | + | 如果你想在你按下电源按钮时显示注销菜单,并且你的机器支持 ACPI,那就按下面的步骤做吧: |
- | + | ======================================================================== | |
- | If you would like the xfce logout menu to show up when you press your power button, and your machine has acpi support, then do the following: | + | ==== 解决方案 |
- | + | ||
- | ==== Solution | + | |
* ''/ | * ''/ | ||
- | < | + | < |
# / | # / | ||
- | # This is called when the user presses the power button and calls | + | # 当用户按下电源按钮时这文件会被调用并且调用 |
- | # / | + | # / |
- | # Optionally you can specify the placeholder | + | # 你也可以用 |
- | # through the whole kernel event message to the program you've | + | |
- | # specified. | + | # 我们需要对 |
- | + | # 因为内核做了改动。 | |
- | # We need to react on " | + | |
- | # of kernel changes. | + | |
event=button[ /]power | event=button[ /]power | ||
Line 156: | Line 156: | ||
* ''/ | * ''/ | ||
- | < | + | < |
# | # | ||
# xfce4-shutdown-as-user.sh | # xfce4-shutdown-as-user.sh | ||
# | # | ||
- | # Check how many users are currently logged into X. | + | # 检查当前有多少用户登录了 |
- | # If only one user is logged in, run a script which sets | + | # 就执行脚本设置环境来调用 |
- | # up the environment to call xfce4-session-logout. | + | |
LOGGED_IN_USER=`ls -trl / | LOGGED_IN_USER=`ls -trl / | ||
Line 173: | Line 172: | ||
* ''/ | * ''/ | ||
- | < | + | < |
#!/bin/sh | #!/bin/sh | ||
# xfce4-user-session-shutdown.sh | # xfce4-user-session-shutdown.sh | ||
# | # | ||
- | # Set up the environment so that DISPLAY | + | # 设置环境变量,使 |
- | # SESSION_MANAGER are valid, and xfce4-session-logout | + | # 并且可以执行 |
HOST=`hostname` | HOST=`hostname` | ||
SESSION_ID=`ls -t / | SESSION_ID=`ls -t / | ||
- | # Note that distros use different syntax for the SESSION_MANAGER | + | # 注意,发行版们的 |
- | # If this does not work, then try something like SESSION_MANAGER=" | + | # 如果这个不能用,请试着修改为类似于 |
- | # instead. You can always find the correct format for your distribution by looking at the | + | # SESSION_MANAGER=" |
- | # value of SESSION_MANAGER in a X session. | + | # 通过在 X 会话中查看 SESSION_MANAGER 的值,你总可以找到你的发行版的正确的格式 |
DISPLAY=:0 SESSION_MANAGER=" | DISPLAY=:0 SESSION_MANAGER=" | ||
</ | </ | ||
- | | + | |
- | < | + | < |
chmod +x / | chmod +x / | ||
</ | </ | ||
- | ==== Solution | + | ==== 解决方案 |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
< | < | ||
event=button/ | event=button/ | ||
Line 204: | Line 204: | ||
action=/ | action=/ | ||
</ | </ | ||
- | ===== Use mnemonics to create | + | ===== 使用助记符创建 |
- | When you create a [[http:// | + | 当你创建一个 |
+ | =====通过 xfrun4 打开用户手册页===== | ||
- | ===== Accessing man pages through xfrun4 ===== | + | 使用 |
- | Use '#' | + |