Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
de:tips [2008/08/12 20:20] – Typo :( kalikianade:tips [2008/09/11 00:06] – use change from EN w3lly
Line 55: Line 55:
  
  
-===== How to add or remove applications from the system menu =====+===== Einträge im Programmmenü hinzufügen und entfernen =====
  
-=== Add an application === +=== Programm hinzufügen === 
-You have to create a .desktop file (usually in ''/usr/share/applications'' for system wide or ''~/.local/share/applications'' for your user) for the application you want to add.+Einen neuen Eintrag für das Programmmenü kann erstellt werden, entweder Systemweit mit einer neuen ''.desktop'' Datei unter ''/usr/share/applications'' oder für einen Benutzer unter ''~/.local/share/applications''.
  
-In the following example, we create an entry in the menu with the name "foo" in the submenu "Multimedia":+Ein Eintrag mit den Namen "foo" in dem Submenü "Multimedia" könnte so aussehen:
  
   [Desktop Entry]   [Desktop Entry]
Line 66: Line 66:
   Name=foo   Name=foo
   GenericName=bar   GenericName=bar
-  Comment=Senseless program ever+  Comment=Ein sinnloses Programm
   Exec=foobar   Exec=foobar
   Icon=/usr/share/pixmaps/foobar.xpm   Icon=/usr/share/pixmaps/foobar.xpm
Line 73: Line 73:
   Categories=Multimedia;   Categories=Multimedia;
  
-You can read more about .desktop files [[http://standards.freedesktop.org/desktop-entry-spec/latest/|here]].+Mehr über ''.desktop'' Dateien ist auf der Internetseite von [[http://standards.freedesktop.org/desktop-entry-spec/latest/|freedesktop.org]] zu finden.
  
- +Das ''libexo'' bietet ein Programm mit dem es möglich ist solche ''.desktop'' Dateien anzulegen. Dieses Programm heißt **exo-desktop-item-edit** und über die Kommandozeile kann man mit ''<nowiki>exo-desktop-item-edit --create-new</nowiki>'' einen solchen Eintrag erstellen. Weitere Informationen ist unter ''<nowiki>exo-desktop-item-edit --help</nowiki>'' zu finden.
- +
-The libexo provides several utils amongst one to handle desktop entry files in a GUI fashion: **exo-desktop-item-edit**.  With it you can create a new .desktop file, by running the command ''<nowiki>exo-desktop-item-edit --create-new</nowiki>'' ;-)+
  
 === Ein Programm aus dem Menü entfernen === === Ein Programm aus dem Menü entfernen ===
Line 98: Line 96:
     * urxvtd -q -o -f     * urxvtd -q -o -f
  
-===== Make use of the desktop margins =====+===== Seitenränder von Arbeitsflächen richtig nutzen ===== 
 + 
 +Die Seitenränder können den verfügbaren Platz vergrößerter Fenster eingrenzen. Wenn man nur eine einzelne Leiste hat lässt sich das trickreich ausnutzen. 
 + 
 +Öffne **Einstellungen > Arbeitsflächen und Seitenränder > Seitenränder**. Wenn Du z.B. eine Leiste an der Oberkante des Bildes hast kannst Du Rand an der unteren Seite einstellen. Das gewährt Dir ab jetzt immer Zugriff auf den Hintergrund, z.B. um das Programmmenü zu öffnen oder die Arbeitsflächen anzuzeigen. 
 +Der gleiche Trick klappt mit Leisten an allen Rändern. 
 + 
 + 
 +===== 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: 
 + 
 +  * ''/etc/acpi/events/powerbtn'' 
 +<file> 
 +# /etc/acpi/events/powerbtn 
 +# This is called when the user presses the power button and calls 
 +# /etc/acpi/powerbtn.sh for further processing. 
 +  
 +# 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 "button power.*" and "button/power.*" because 
 +# of kernel changes. 
 + 
 +event=button[ /]power 
 +action=/usr/local/sbin/xfce4-shutdown-as-user.sh 
 +</file> 
 + 
 +  * ''/usr/local/sbin/xfce4-shutdown-as-user.sh'' 
 +<file> 
 +#!/bin/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.
  
-The desktop margins can be used to set the bounds of the maximized windows.  They can be used in a nifty way when you have only one panel.+LOGGED_IN_USER=`ls -l /tmp/.ICE-unix/ | tail -n -1 | cut -d' ' -f3` 
 +NUM_X_USERS=`echo $LOGGED_IN_USER | wc -l` 
 +   
 +if [ $NUM_X_USERS -eq 1 ]; then 
 +    sudo -H -u $LOGGED_IN_USER /usr/local/sbin/xfce4-user-session-shutdown.sh 
 +fi 
 +</file>
  
-Go to **Settings Workspaces & Margins > Margins** If you have a panel at the topset a little margin at the bottom.  Now you can access the desktop at any time at the bottom part of your display.  Right click it to open the Xfce Menu.+  ''/usr/local/sbin/xfce4-user-session-shutdown.sh'' 
 +  <file> 
 +#!/bin/sh 
 +# xfce4-user-session-shutdown.sh 
 +
 +# Set up the environment so that DISPLAY and 
 +# SESSION_MANAGER are validand xfce4-session-logout can run
  
 +HOST=`hostname`
 +SESSION_ID=`ls /tmp/.ICE-unix/`
 +# Note that distros use different syntax for the SESSION_MANAGER variable (this script has Debian's format).
 +# If this does not work, then try something like SESSION_MANAGER="local/$HOST:@/tmp/.ICE-unix/$SESSION_ID"
 +# 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="local/$HOST:/tmp/.ICE-unix/$SESSION_ID" /usr/bin/xfce4-session-logout
 +  </file>