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/27 16:52] – [How to add or remove applications in the system menu] haobug | zh-cn:tips [2015/03/10 04:29] – [解决方案 2] yjwork | ||
---|---|---|---|
Line 107: | Line 107: | ||
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 126: | 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 %e. It will pass | + | |
- | # through the whole kernel event message to the program you' | + | |
- | # specified. | + | |
- | # We need to react on " | + | # 你也可以用 %e 这个占位符来把整个内核事件消息传给你指定的程序。 |
- | # of kernel changes. | + | |
+ | # 我们需要对 | ||
+ | # 因为内核做了改动。 | ||
event=button[ /]power | event=button[ /]power | ||
Line 159: | 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 176: | 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 207: | Line 204: | ||
action=/ | action=/ | ||
</ | </ | ||
- | ===== Use mnemonics to create | + | ===== 使用助记符创建 |
- | When you create a [[http:// | + | 当你创建一个 |
+ | =====通过 xfrun4 打开用户手册页===== | ||
- | ===== Accessing man pages through xfrun4 ===== | + | 使用 |
- | Use '#' | + |