CrunchbangPlusPlus Add launcher to tint2 panel

After installation of #!++ are some launcher defined in the tint2 configuration, but not shown.
Open the file tint2rc from the menu by selecting

Settings -> tint2 -> Edit config file

menu

Add a L to the panel_items entry in front of TSC. L is for launchers.

panel

Go to the Launcher section.
There are four launcher_icon_app entries. The both in the middle do not work.
Change them to Thunar.desktop and geany.desktop. Gedit is not installed by default in #!++.
Creating launchers is very easy.

launcher

Restart tint2.

menu1

The result should be like the picture below.

tint2

How to define the viewport for different devices in WordPress

First download Mobile_Detect from here:

http://mobiledetect.net/

Extract the zip-file and upload only the file Mobile_Detect.php to
your theme folder where the function.php is located.

The following code detects if the site is viewed by a desktop, a mobile or a tablet.
Add this code to the end of your functions.php

function detect_mobile()
{
    if(  !class_exists(„Mobile_Detect“) ) {
        require_once „Mobile_Detect.php“;
    }
    $detect = new Mobile_Detect;

    $dev = „desktop“;
    if( $detect->isMobile() ){
        $dev = „phone“;
    }
    if( $detect->isTablet() ){
        $dev = „tablet“;
    }
    return $dev;
}

Add the following code to your header.php and change the viewport parameters for your needs.

<?php if (detect_mobile() == „phone“):?>
    <meta name=“viewport“ content=“width=1200, initial-scale=0.25″ />
<?php endif ?>
<?php if (detect_mobile() == „tablet“):?>
    <meta name=“viewport“ content=“width=1200, initial-scale=0.5″ />
<?php endif ?>

This is a save way to find out if you are on a tablet or a mobile, because the @viewport  css paragraph does not work everywhere.

How to create a menu entry to start a windows program with wine on linux

When I installed windows programs in wine the programs work fine, but the generated menu entry doesn’t work.

The easiest way is to create an start script.

Open a terminal, create an empty file in your home folder and make ist executable.
program is the name of your windows program.

touch program.sh
chmod +x program.sh

Open program.sh with your favorite editor
First change to the folder of the windows program.

Note: This is the linux path. Not this „c:\\windows“-thing.
The double quotes are important.

Some windows programs try to read files in their own folder. On windows the folder including a program is in the path of the program by default. On linux it is not. So the program would fail with a „file not found“ error.
Than start the program with the wine command.

Insert the following line in the start script and change the path and the program name to your needs:

#!/bin/bash
cd „path/to/the/program/folder/wich/includes/the/exe-file“
wine Program.exe

Save the file.

Now you can add this script to your menu using the menu editor of your distribution (i.e menu-libre, lxmenu, alacarte …).

(Tested on Linux Mint mate 17.1 Rebecca)