Aero style Window Snapping in Peppermint Three LXDE

Should also work (with a little adjustment) in Lubuntu 11.10 and 12.04 … or any distro based on Ubuntu 11.10 and 12.04 that uses the LXDE desktop environment.

I was asked on the Peppermint forum if it was possible to get the “Aero” style window snapping function in the LXDE desktop environment … well it turns out you can …
(without the weight of Compiz)

You’ll have to switch to the xfwm4 (Xfce) window manager, get a patched version from a PPA, and install stiler (from the same PPA)

[EDIT]

I’ve ONLY tested this in Peppermint Three 32bit … so there are no guarantees with Peppermint Three 64bit until someone confirms it … that said, it shouldn’t (if done correctly) break 64bit but snapping may not work, I’ll change this edit if/when someone confirms it works in 64bit … DO NOT attempt to do this in Peppermint One/Ice/Two, it won’t work … the PPA that you will be adding ONLY contains patched versions of xfwm4 for 11.10 and 12.04, so it will ONLY work in Peppermint THREE

[END EDIT]

OK, first a video show the snapping in action, and to check this is what you want:-

http://www.youtube.com/watch?v=19X0gng_-qk

If that IS what you want … follow these instructions:

First, add the PPA:

sudo add-apt-repository ppa:fossfreedom/xfwm4

Now update your package cache:

sudo apt-get update

Now install xfwm4, xfwm4-themes, and stiler:

sudo apt-get install xfwm4 xfwm4-themes stiler

Now we need to edit a couple of files so they show in the menus … so run:

sudo gedit /usr/share/applications/xfce-wm-settings.desktop

When a file opens with a ton of stuff in it, make it read:-

[Desktop Entry]
Version=1.0
Type=Application
Name=xfwm4 Window Manager
Comment=Configure window behavior and shortcuts
Icon=xfwm4
Exec=xfwm4-settings %f
Categories=Settings;DesktopSettings;GTK;
StartupNotify=true
Terminal=false

SAVE the file, and exit gedit.

Now back in the terminal run:

sudo gedit /usr/share/applications/xfce-wmtweaks-settings.desktop

When a file opens with a ton of stuff in it, make it read:-

[Desktop Entry]
Version=1.0
Type=Application
Name=xfwm4 Window Manager Tweaks
Comment=Fine-tune window behaviour and effects
Icon=wmtweaks
Exec=xfwm4-tweaks-settings %f
Categories=Settings;DesktopSettings;GTK;
StartupNotify=true
Terminal=false

SAVE the file, and exit gedit.

OK, now go to:-
menu > Preferences > Desktop Session Settings
click the “Advanced Settings” tab
and change:-

Window Manager: openbox-peppermint
to
Window Manager: xfwm4

Click the “OK” button.

Log off, and on again (or reboot), to pick up the change.

You should now be using the xfwm4 window manager.

Go to:
menu > Preferences > xfwm4 Window Manager
then click the “Advanced” tab.

Tick both boxes under “Windows Snapping

You’re done :slight_smile:


xfwm4 Windows Manager Tweaks also contains a “Compositor” tab … compositing is disabled by default, but you can enable it if you wish … then you get to plaay with things like drop shadows, and opacity :slight_smile:

Hi, I followed your instructions on Peppermint 3 and I have successful results in regards to windows snapping, great, Thanks!

However, I’ve lost system keyboard shortcuts for terminal, file explorer, run dialog, and others. Do you know how I can get them back, or configure them now?

Thanks in advance.

I noticed that too, and have been meaning to work out a fix … the reason is the xfwm4 window manager uses a different config file for the keyboard shortcuts to openbox (as used in Peppermint).

openbox (in Peppermint) use - ~/.config/openbox/peppermint-rc.xml

xfwm4 appears to use - ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml

Which appears to be kinda empty(ish) … I’m not used to the xfce config syntax, so I need to bung something like Xubuntu in a VM and check the contents of its xfce4-keyboard-shortcuts.xml file for comparison.

Gimme a day or two and I’ll see if I can come up with a fix.

[EDIT]

Install xbindkeys-config:

sudo apt-get install xbindkeys-config

then start it from the terminal:

xbindkeys-config

You can then configure your keyboard shortcuts in there.

Now open /etc/xdg/lxsession/Peppermint/autostart for editing:

sudo gedit /etc/xdg/lxsession/Peppermint/autostart

and add a single NEW line at the bottom that reads:-

@xbindkeys

SAVE the file, and exit gedit … that will ensure the keybaord shortcuts work at bootup :slight_smile: