Site perso : Emmanuel Branlard

Subsections

7. XFCE - xfce4


7.1 Important xfce folders

~/.config/xfce4/panel
~/.config/xfce4/xfconf/----/xfce4-panel.xml 
~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
~/.config/Thunar/uca.xml  %custom actions
~/.config/Thunar/accels.scm  %shortcuts
~/.cache/sessions
~/.config/user-dirs.conf

7.2 Remember where xfce4-panel layout is stored

% REMEBMBER: Always do change on the files when X is not running (xfce)

% Things have changed now, xfce-panel applets are more and more configures through the xlm file. In the folder panel, there is just stuff like quicklauncher. That's way better..

%
There is the directory 
~/.config/xfce4/panel
but there is also
~/.config/xfce4/xfconf/----/xfce4-panel.xml 
The latter defining the layout!!!!

7.3 Disable roll up of windows with mousewheel

xfconf-query -c xfwm4 -p /general/mousewheel_rollup -s false

7.4 Tiling with xfwm4

%%% With Pywo
Now the best for me is definitely pywo with xinerama: acts like winsplit revolution
For pure tiling, agencing all windows on screen automatically: use pytyle

pywo grid_width -g R  -w H -h F --xinerama
pywo grid_width -g TL -w H -h F --xinerama

pywo put -p L; 
pywo put -p R; 

%%% THUNAR TILING (when you go on an edge)
Download patch on this website (I stored it)
http://notanothersheep.com/XFCE4WindowTiling

cd built
apt-get source xfwm4
apt-get build-dep xfwm4
cp whatever-path/xfwm4tiling.patch ./
patch -p0 < xfwm4tiling.patch
cd xfwm4-4.8.3
./configure
make
sudo make install

If you have several workspace, it won't work well
xfce settings / Windows Manager / Advanced / Don't wrap workspaces

%%% With wmctrl (former stuff)
sudo aptitude install wmctrl
% example TopLeft: 
wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz;wmctrl -r :ACTIVE: -e 1,83,0,664,460

Modify directly the keyboard shortcuts .config/xfce4/xfconf .... shortcurts.xml

%%% With Compiz (old infos)
http://ubuntuforums.org/showthread.php?t=801170&highlight=winsplit
sudo apt-get install compiz-fusion-bcop compiz-dev compizconfig-settings-manager build-essential libtool libglu1-mesa-dev libxss-dev libcairo2-dev git-core

mkdir ~/compiz
cd ~/compiz
git clone git://anongit.compiz-fusion.org/users/stevek/grid

cd grid
make
make install

7.1 You may need to enable "Normal" or "Extra" under desktop effects in System->Preferences->Appearance first. (You may also need to chown -R user:user ~/compiz in order to get things to compile.)

ccsm

9. Check "grid" under "Window Management".

7.5 Accessing files on the desktop without having to go to the desktop

My solution:
install xfce4-xfapplet and file-browser-applet

7.6 Cleaning up Xfce menu - applications wine

These menu are in these folders
~/.local/share/applications/wine
~/.local/share/desktop-directories/wine-*
~/.config/menus/applications-merged/wine-*

.local/share/desktop-directories

If your wine applications go into Other menu instead of Wine you are missing a menu config file which is not re-created by simply re-installing wine package.
.config/menus

create a folder named applications-merged

and inside a text file with wine-Programs.menu

with the following text:

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
<Menu>
  <Name>Applications</Name>
  <Menu>
    <Name>wine-wine</Name>
    <Directory>wine-wine.directory</Directory>
  <Menu>
    <Name>wine-Programs</Name>
    <Directory>wine-Programs.directory</Directory>
    <Include>
      <Filename>wine-Programs-Wenlin.desktop</Filename>
    </Include>
  </Menu>
  </Menu>
</Menu>

7.7 Understanding Mimetypes

~/.local/share/
~/.local/mime

7.8 Command for Toggle Desktop

#!/bin/sh
if xprop -root  _NET_SHOWING_DESKTOP|egrep '= 1' ; then 
  wmctrl -k off ; 
else 
  wmctrl -k on ;
fi

7.9 Notifications

sudo aptitude install libnotify-bin
send notification to a notification daemon : xfce4-notifyd par exemple
notify-send jdghjdfh

du -chs %N |xargs -0 notify-send -t 2000 -i openofficeorg-20-database

ffmpeg -i %f 2>&1 |grep Stream | awk -F, '{print $1"\n    "$2 $3 $4"\n    "$5}' | xargs -0 notify-send -t 2000 -i gnome-volume-control

awk -F, '{print $1"\n    "$2 $3 $4"\n    "$5}' Test

7.10 Thunar - Configure shortcuts

Go to Xfce preferences / Appearence / Settings and enable editable shortcuts
Then in thunar, pop-up one menu from the menu bar, when you hover an action you can edit the shortcut by simply pressing the keybinding you want. ressing backspace erase it.

 Some shortcuts are stored in: 
 /home/manu/.config/Thunar/accels.scm

7.11 xfce shortcuts are stored in

~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
and therer are plenty of other cool files there

7.12 Thunar - User customed actions

Stored in ~/.config/Thunar/uca.xml
mine : latexclean, To mp3, Zip it!, New folder, Install package, Eps2pdf, terminal Fichier

(How Big the selection)
http://forums.debian.net/viewtopic.php?f=20&t=49558

7.13 XFCE Default User directories - Thunar Templates

%%% Easiest
edit ~.config/user-dirs.conf
This is important for templates!!! I don't like them in my home, I like them betetr in my .config/Templates
Requires relogging

%Otherwise Default template directory is ~/Templates

%%% System wide
See :
/etc/xdg/user-dirs.conf

And mainly, edit :
${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs

This can be useful for Desktop, Templates , Images, Download etc...

7.14 Astuce XFCE : transparent background for panel

patch :
http://forum.xfce.org/index.php?topic=4721.0;prev_next=prev#new

sudo aptitude install libexo-0.3-dev libxfcegui4-dev xorg-dev libgtk2.0-dev libxfce4util-dev libwnck-dev

7.15 Astuce XFCE : 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:

    *   sudo vim /etc/acpi/events/powerbtn

# /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

    *   sudo vim /usr/local/sbin/xfce4-shutdown-as-user.sh

#!/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.

LOGGED_IN_USER=`ls -trl /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

    * sudo vim /usr/local/sbin/xfce4-user-session-shutdown.sh

#!/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`
SESSION_ID=`ls -t /tmp/.ICE-unix/ | head -n1`
# 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

7.16 Xubuntu xfce saved session

malgré la case décochée dans "sessions et démarrage" du gestionnaire de paramètres de xfce, tous les programmes revenaient à l'ouverture de session.
j'ai effectué les opérations suivantes et tout est rentré dans l'ordre :
dans mon répertoire perso :
1) j'ai supprimé le contenu du répertoire .cache/sessions
2) j'ai édité le fichier .config/xfce4-session/xfce4-session.rc pour remplacer :
SaveOnExit=true
par
SaveOnExit=false

7.17 Sound mixing - xfce4-volumed - amixer - pulseaudio

%%% Now
My curent option: xfce-volumed for + and -, and a personnal script for mute/unmute
I had to compile my own xfce4-volumed to desactivate the grab on mute key

% xfce-volumed
Mute/unmute not compatible with pulseaudio. See option compile above.

%%% Former option
% with alsamixer (avec pulseaudio!!! l'option -c 0 est requise (default device))
amixer -c 0 sset Master toggle
amixer -c 0 sset Master 1- unmute
amixer -c 0 sset Master 1+ unmute

%%% Avec aumix (mieux avec pulseaudio???)
aumix -v+1
aumix -v-1

%%% Avec alsamixer
%toggle Mute 
amixer sset Master toggle
%decrease
amixer sset Master 1- unmute
%increase
amixer sset Master 1+ unmute

%%% Way before - I used keytouch

7.18 Applications pour environnement xfce sans dependances gnome ou kde

MP3 player : xmms listen banshee quod-libet rhytmbox sonata  amarok

xfce4
xfce4-extras/thunar-volman
xfce4-extras/xfce4-screenshooter
xfburn : gravure
xarchiver squeeze  : archive management
xfmedia : multimedia player -> nul

Image viewer
gpicview > OK (mon prefere)
mirage-> bof
ristretto -> nul

Liferea : Flux RSS

web browser:
midori  -> ok, but bof
khazeakaze

xfbib :edit BibTeX files (for use with LyX), 
lyx : between word and latex?????

emelfm2 enca : alternative to thunar, like total commander

catfish : file searching tool
HardInfo (sys-apps/hardinfo) -- System Profiler and Benchmark 
qalculate-gtk qalculate-bases qalculate-currency qalculate-units
EasyTAG (media-sound/easytag) -- Utility for editing MP2, MP3, MP4, FLAC, Ogg and other media tags 

xfmedia or :
 haaw! Media Player (media-video/whaawmp) -- A lightweight audio/video player using Gstreamer







Emmanuel Branlard