Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tips [2013/08/05 22:41] – [Add newlines to a panel] mike | tips [2026/09/20 17:59] (current) – Uniform source code formatting epetriglia | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ~~NOTOC~~ | ||
| + | |||
| ====== Tips & Tricks ====== | ====== Tips & Tricks ====== | ||
| - | This page contains various tips for the Xfce desktop environment. | ||
| + | * **[[# | ||
| + | * [[# | ||
| + | * [[# | ||
| + | * **[[#Gtkrc files|Gtkrc files]]** | ||
| + | * **[[#How to add or remove applications in the system menu|How to add or remove applications in the system menu]]** | ||
| + | * [[#Add an application|Add an application]] | ||
| + | * [[#Remove an application from the menu|Remove an application from the menu]] | ||
| + | * **[[#How to customize starting Xfce|How to customize starting Xfce]]** | ||
| + | * [[#Starting with showing the Root Window|Starting with showing the Root Window]] | ||
| + | * **[[#Use the desktop margin|Use the desktop margin]]** | ||
| + | * **[[#Handle ACPI event for power button, show Xfce logout options|Handle ACPI event for power button, show Xfce logout options]]** | ||
| + | * [[#Solution 1|Solution 1]] | ||
| + | * [[#Solution 2|Solution 2]] | ||
| + | * **[[# | ||
| + | * **[[#Do maths with xfce4-appfinder|Do maths with xfce4-appfinder]]** | ||
| + | * **[[# | ||
| + | * [[#Toggle panel autohide|Toggle panel autohide]] | ||
| + | * [[#Control per-window transparency|Control per-window transparency]] | ||
| - | ===== Customize | + | This page contains various tips for the Xfce desktop environment. |
| - | You can use [[http:// | + | ---- |
| - | + | ||
| - | For example: | + | |
| - | * ''< | + | |
| - | * ''< | + | |
| ===== Performance Tips ===== | ===== 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 | + | One of the benefits of Xfce is performance. It is lighter and more responsive than other desktop environments such as GNOME on almost all hardware, especially on machines with less memory and processing |
| ==== Fonts ==== | ==== Fonts ==== | ||
| Line 24: | Line 40: | ||
| ==== Background Color ==== | ==== Background Color ==== | ||
| - | I regularly connect | + | When connecting |
| - | Right-click on the desktop and choose | + | To apply this change, right-click on the desktop and select |
| - | Another option, that may work for some, is to check the options | + | Another option that may work in some cases is to check the settings |
| - | ===== How to use the alternative GNOME-menu | + | ===== Gtkrc files ===== |
| - | If you want to use the new menu from GNOME, with quick starters for favorites applications | + | <note warning> |
| + | This section may be outdated | ||
| + | </note> | ||
| - | Add a new xfapplet item inside your panel, and open its properties dialog to add the GNOME menu applet. | + | * A tutorial about the Gtkrc format can be found [[http:// |
| - | If you don't like GNOME main menu, try Ubuntu System Panel, available in several distributions. | + | |
| - | + | ||
| - | See also: [[/ | + | |
| - | + | ||
| - | ===== Gtkrc files ===== | + | |
| - | * A tutorial about the Gtkrc format can be found [[http:// | + | |
| - | + | ||
| - | | + | |
| * You can not define a custom background for Thunar icon/ list views due to a [[http:// | * You can not define a custom background for Thunar icon/ list views due to a [[http:// | ||
| Line 74: | Line 85: | ||
| * See also those threads in the forum : http:// | * See also those threads in the forum : http:// | ||
| + | |||
| + | [[|Back to Top]] | ||
| + | |||
| + | ---- | ||
| ===== How to add or remove applications in the system menu ===== | ===== How to add or remove applications in the system menu ===== | ||
| === Add an application === | === Add an application === | ||
| + | |||
| You have to create a .desktop file (usually in ''/ | You have to create a .desktop file (usually in ''/ | ||
| Line 95: | Line 111: | ||
| You can read more about .desktop files [[http:// | You can read more about .desktop files [[http:// | ||
| - | The libexo provides several utils amongst one to handle desktop entry files in a GUI fashion: **exo-desktop-item-edit**. | + | The libexo provides several utils amongst one to handle desktop entry files in a GUI fashion: **exo-desktop-item-edit**. |
| === Remove an application from the menu === | === Remove an application from the menu === | ||
| + | |||
| You can do this in two ways: | You can do this in two ways: | ||
| * First way, and the easier one is to simply remove the .desktop file in the ''/ | * First way, and the easier one is to simply remove the .desktop file in the ''/ | ||
| Line 103: | Line 120: | ||
| NoDisplay=true | NoDisplay=true | ||
| + | | ||
| + | [[|Back to Top]] | ||
| - | =====How to customize starting Xfce===== | + | ---- |
| + | |||
| + | ===== How to customize starting Xfce ===== | ||
| Like most UNIX terminal sessions, Xfce runs through user-customizable startup file when it starts up. You can edit this init file to run your own scripts, send environment variables to the GUI, etc. | Like most UNIX terminal sessions, Xfce runs through user-customizable startup file when it starts up. You can edit this init file to run your own scripts, send environment variables to the GUI, etc. | ||
| Line 119: | Line 140: | ||
| ==== Starting with showing the Root Window ==== | ==== Starting with showing the Root Window ==== | ||
| + | |||
| - xfdesktop --quit | - xfdesktop --quit | ||
| - save your session | - save your session | ||
| + | [[|Back to Top]] | ||
| + | |||
| + | ---- | ||
| ===== Use the desktop margin ===== | ===== Use the desktop margin ===== | ||
| Line 133: | Line 158: | ||
| 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 ' | 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 ' | ||
| - | ===== Handle acpi event for power button, show Xfce logout options ===== | + | [[|Back to Top]] |
| - | 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: | + | ---- |
| + | |||
| + | ===== Handle ACPI event for power button, show Xfce logout options ===== | ||
| + | |||
| + | 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 1 ==== | ==== Solution 1 ==== | ||
| + | |||
| * ''/ | * ''/ | ||
| - | < | ||
| - | # / | ||
| - | # 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've | ||
| - | # specified. | ||
| - | |||
| - | # We need to react on " | ||
| - | # of kernel changes. | ||
| - | event=button[ /]power | + | # / |
| - | action=/ | + | # 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 " | ||
| + | # of kernel changes. | ||
| + | |||
| + | | ||
| + | action=/ | ||
| * ''/ | * ''/ | ||
| - | < | ||
| - | # | ||
| - | # 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 /tmp/.ICE-unix/ | tail -n -1 | cut -d' ' -f3` | + | #!/bin/sh |
| - | NUM_X_USERS=`echo $LOGGED_IN_USER | wc -l` | + | # 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. | ||
| | | ||
| - | if [ $NUM_X_USERS -eq 1 ]; then | + | LOGGED_IN_USER=`ls -trl / |
| - | sudo -H -u $LOGGED_IN_USER / | + | NUM_X_USERS=`echo $LOGGED_IN_USER | wc -l` |
| - | fi | + | |
| - | </ | + | |
| + | sudo -H -u $LOGGED_IN_USER / | ||
| + | fi | ||
| * ''/ | * ''/ | ||
| - | < | ||
| - | #!/bin/sh | ||
| - | # xfce4-user-session-shutdown.sh | ||
| - | # | ||
| - | # Set up the environment so that DISPLAY and | ||
| - | # SESSION_MANAGER are valid, and xfce4-session-logout can run | ||
| - | HOST=`hostname` | + | #!/bin/sh |
| - | SESSION_ID=`ls -t / | + | # xfce4-user-session-shutdown.sh |
| - | # Note that distros use different syntax for the SESSION_MANAGER variable (this script has Debian' | + | # |
| - | # If this does not work, then try something like SESSION_MANAGER=" | + | # Set up the environment so that DISPLAY and |
| - | # instead. You can always find the correct format for your distribution by looking at the | + | # SESSION_MANAGER are valid, and xfce4-session-logout can run |
| - | # value of SESSION_MANAGER in a X session. | + | |
| - | DISPLAY=:0 SESSION_MANAGER=" | + | |
| - | </ | + | SESSION_ID=`ls -t / |
| + | # Note that distros use different syntax for the SESSION_MANAGER variable (this script has Debian' | ||
| + | # 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 | ||
| + | # value of SESSION_MANAGER in a X session. | ||
| + | DISPLAY=:0 SESSION_MANAGER=" | ||
| * Make those scripts executable : | * Make those scripts executable : | ||
| - | < | + | |
| - | chmod +x / | + | chmod +x / |
| - | </ | + | |
| ==== Solution 2 ==== | ==== Solution 2 ==== | ||
| + | |||
| * Open Settings Manager (or by command : xfce4-settings-manager ) | * Open Settings Manager (or by command : xfce4-settings-manager ) | ||
| * Open Power Manager settings | * Open Power Manager settings | ||
| Line 199: | Line 227: | ||
| * Close Power Manager settings | * Close Power Manager settings | ||
| * If you have ACPI scripts installed, deactivate or update the **power-button** script from **/ | * If you have ACPI scripts installed, deactivate or update the **power-button** script from **/ | ||
| - | < | ||
| - | # EXAMPLE | ||
| - | event=button/ | ||
| - | # | ||
| - | action=/ | ||
| - | </ | ||
| - | ===== Use mnemonics to create Thunar Custom Actions ===== | ||
| - | When you create a [[http://thunar.xfce.org/pwiki/documentation/custom_actions|Thunar Custom Action]] you can set the name with an underscore " | + | # EXAMPLE |
| + | event=button/power.* | ||
| + | #action=/usr/lib/acpid/ | ||
| + | action=/ | ||
| + | |||
| + | [[|Back to Top]] | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== Accessing man pages through xfce4-appfinder ===== | ||
| + | |||
| + | Use '#' | ||
| + | |||
| + | [[|Back to Top]] | ||
| + | |||
| + | ---- | ||
| - | ===== Accessing man pages through xfrun4 | + | ===== Do maths with xfce4-appfinder |
| - | Use '#' | + | |
| - | ===== Do maths with xfrun4/ | + | |
| - | | + | |
| * Requirement: | * Requirement: | ||
| * Save this script as bcme.sh, in your home directory: | * Save this script as bcme.sh, in your home directory: | ||
| Line 225: | Line 259: | ||
| notify-send -t $notify_time " | notify-send -t $notify_time " | ||
| - | *Add custom action to Application finder : | + | * Add custom action to Application finder: |
| - | * Type : Regular Expression | + | * Type: Regular Expression |
| - | * Pattern : ^([0-9]|\(|\.).* | + | * Pattern: |
| - | * Command : /bin/sh ~/bcme.sh \0 | + | * Command: |
| * (check) Save match in command history | * (check) Save match in command history | ||
| - | ====== Other Unique Xfce Features ===== | + | [[|Back to Top]] |
| + | ---- | ||
| ====== Xfconf ===== | ====== Xfconf ===== | ||
| Line 253: | Line 288: | ||
| xfconf-query -c $CHANNEL -T -p $PROP | xfconf-query -c $CHANNEL -T -p $PROP | ||
| else | else | ||
| - | xfconf-query -c $CHANNEL -n -p $PROP -t bool -s true | + | xfconf-query -c $CHANNEL -n -p $PROP -t bool -s false |
| fi | fi | ||
| </ | </ | ||
| + | |||
| + | ===== Control per-window transparency ===== | ||
| + | |||
| + | Xfce lets you control the transparency of any window by horizontal scrolling on the titlebar. Starting with 4.12 though, it has been disabled by default. To enable this, open **Settings Editor > xfwm4** and change '' | ||
| + | |||
| + | [[|Back to Top]] | ||
| + | |||
| + | ---- | ||
| + | |||
| + | [[: | ||