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 08:54] – [How to use the alternative GNOME-menu] haobug | zh-cn:tips [2015/03/10 04:29] – [解决方案 2] yjwork | ||
---|---|---|---|
Line 42: | Line 42: | ||
- | ===== 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 75: | 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 95: | 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 125: | 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 158: | 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 175: | 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 206: | Line 204: | ||
action=/ | action=/ | ||
</ | </ | ||
- | ===== Use mnemonics to create | + | ===== 使用助记符创建 |
- | When you create a [[http:// | + | 当你创建一个 |
+ | =====通过 xfrun4 打开用户手册页===== | ||
- | ===== Accessing man pages through xfrun4 ===== | + | 使用 |
- | Use '#' | + |