terminator


Install terminator in CentOS 7 (64bit)

We installed CentOS 7 (64bit) using this ISO, which we downloaded from http://vault.centos.org/7.1.1503/isos/x86_64/

Once we got the OS started, we executed yum update -y to update all installed packages that were older than the versions in the repositories.
After the update process was complete, we then tried to install terminator using yum.

The Problem

Executing yum install -y terminator resulted in an error:

Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirror.us.leaseweb.net
* extras: mirror.us.leaseweb.net
* updates: mirror.us.leaseweb.net
No package terminator available.
Error: Nothing to do

Solution

To solve the problem we needed to install the Extra Packages for Enterprise Linux (EPEL) repository using yum install -y epel-release.

After the installation was done, we executed yum install -y terminator once more and the installation of terminator succeeded.

Example Logs

Following is the full log from the terminal, showing the correct completion of the installation

[[email protected] bytefreaks]# yum install terminator
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.us.leaseweb.net
 * extras: mirror.us.leaseweb.net
 * updates: mirror.us.leaseweb.net
No package terminator available.
Error: Nothing to do
[[email protected] bytefreaks]# yum install -y epel-release
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.us.leaseweb.net
 * extras: mirror.us.leaseweb.net
 * updates: mirror.us.leaseweb.net
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================
 Package                        Arch                     Version                 Repository                Size
================================================================================================================
Installing:
 epel-release                   noarch                   7-6                     extras                    14 k

Transaction Summary
================================================================================================================
Install  1 Package

Total download size: 14 k
Installed size: 24 k
Downloading packages:
epel-release-7-6.noarch.rpm                                                              |  14 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-6.noarch                                                                      1/1 
  Verifying  : epel-release-7-6.noarch                                                                      1/1 

Installed:
  epel-release.noarch 0:7-6                                                                                     

Complete!
[[email protected] bytefreaks]# yum install terminator -y
Loaded plugins: fastestmirror, langpacks
epel/x86_64/metalink                                                                     |  23 kB  00:00:00     
epel                                                                                     | 4.3 kB  00:00:00     
(1/3): epel/x86_64/group_gz                                                              | 170 kB  00:00:01     
epel/x86_64/primary_db         FAILED                                          
https://ftp.fau.de/epel/7/x86_64/repodata/e11482622ec75721199897552409e0b0b1d6fd798be905c88014f539d027efec-primary.sqlite.xz: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article 

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/

(2/3): epel/x86_64/primary_db                                                            | 4.3 MB  00:00:12     
(3/3): epel/x86_64/updateinfo                                                            | 674 kB  00:00:18     
Loading mirror speeds from cached hostfile
 * base: mirror.us.leaseweb.net
 * epel: mirror.de.leaseweb.net
 * extras: mirror.us.leaseweb.net
 * updates: mirror.us.leaseweb.net
Resolving Dependencies
--> Running transaction check
---> Package terminator.noarch 0:0.98-3.el7 will be installed
--> Processing Dependency: vte for package: terminator-0.98-3.el7.noarch
--> Processing Dependency: python-psutil for package: terminator-0.98-3.el7.noarch
--> Processing Dependency: python-keybinder for package: terminator-0.98-3.el7.noarch
--> Processing Dependency: gnome-python2-gconf for package: terminator-0.98-3.el7.noarch
--> Processing Dependency: gnome-python2-bonobo for package: terminator-0.98-3.el7.noarch
--> Running transaction check
---> Package gnome-python2-bonobo.x86_64 0:2.28.1-14.el7 will be installed
--> Processing Dependency: gnome-python2-canvas(x86-64) = 2.28.1-14.el7 for package: gnome-python2-bonobo-2.28.1-14.el7.x86_64
--> Processing Dependency: gnome-python2(x86-64) = 2.28.1-14.el7 for package: gnome-python2-bonobo-2.28.1-14.el7.x86_64
--> Processing Dependency: pyorbit(x86-64) >= 2.0.1 for package: gnome-python2-bonobo-2.28.1-14.el7.x86_64
--> Processing Dependency: libbonoboui(x86-64) >= 2.8.0 for package: gnome-python2-bonobo-2.28.1-14.el7.x86_64
--> Processing Dependency: libbonobo(x86-64) >= 2.8.0 for package: gnome-python2-bonobo-2.28.1-14.el7.x86_64
--> Processing Dependency: libgnomecanvas-2.so.0()(64bit) for package: gnome-python2-bonobo-2.28.1-14.el7.x86_64
--> Processing Dependency: libgnome-2.so.0()(64bit) for package: gnome-python2-bonobo-2.28.1-14.el7.x86_64
--> Processing Dependency: libbonoboui-2.so.0()(64bit) for package: gnome-python2-bonobo-2.28.1-14.el7.x86_64
--> Processing Dependency: libbonobo-activation.so.4()(64bit) for package: gnome-python2-bonobo-2.28.1-14.el7.x86_64
--> Processing Dependency: libbonobo-2.so.0()(64bit) for package: gnome-python2-bonobo-2.28.1-14.el7.x86_64
--> Processing Dependency: libart_lgpl_2.so.2()(64bit) for package: gnome-python2-bonobo-2.28.1-14.el7.x86_64
--> Processing Dependency: libORBit-2.so.0()(64bit) for package: gnome-python2-bonobo-2.28.1-14.el7.x86_64
---> Package gnome-python2-gconf.x86_64 0:2.28.1-14.el7 will be installed
---> Package python-keybinder.x86_64 0:0.3.1-1.el7 will be installed
--> Processing Dependency: keybinder = 0.3.1-1.el7 for package: python-keybinder-0.3.1-1.el7.x86_64
--> Processing Dependency: libkeybinder.so.0()(64bit) for package: python-keybinder-0.3.1-1.el7.x86_64
---> Package python-psutil.x86_64 0:2.2.1-1.el7 will be installed
---> Package vte.x86_64 0:0.28.2-10.el7 will be installed
--> Running transaction check
---> Package ORBit2.x86_64 0:2.14.19-13.el7 will be installed
--> Processing Dependency: libIDL-2.so.0()(64bit) for package: ORBit2-2.14.19-13.el7.x86_64
---> Package gnome-python2.x86_64 0:2.28.1-14.el7 will be installed
---> Package gnome-python2-canvas.x86_64 0:2.28.1-14.el7 will be installed
---> Package keybinder.x86_64 0:0.3.1-1.el7 will be installed
---> Package libart_lgpl.x86_64 0:2.3.21-10.el7 will be installed
---> Package libbonobo.x86_64 0:2.32.1-7.el7 will be installed
---> Package libbonoboui.x86_64 0:2.24.5-7.el7 will be installed
---> Package libgnome.x86_64 0:2.32.1-9.el7 will be installed
--> Processing Dependency: libgnomevfs-2.so.0()(64bit) for package: libgnome-2.32.1-9.el7.x86_64
---> Package libgnomecanvas.x86_64 0:2.30.3-8.el7 will be installed
---> Package pyorbit.x86_64 0:2.24.0-15.el7 will be installed
--> Running transaction check
---> Package gnome-vfs2.x86_64 0:2.24.4-14.el7 will be installed
--> Processing Dependency: libfam.so.0()(64bit) for package: gnome-vfs2-2.24.4-14.el7.x86_64
---> Package libIDL.x86_64 0:0.8.14-8.el7 will be installed
--> Running transaction check
---> Package gamin.x86_64 0:0.1.10-16.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================
 Package                            Arch                 Version                       Repository          Size
================================================================================================================
Installing:
 terminator                         noarch               0.98-3.el7                    epel               3.4 M
Installing for dependencies:
 ORBit2                             x86_64               2.14.19-13.el7                base               176 k
 gamin                              x86_64               0.1.10-16.el7                 base               128 k
 gnome-python2                      x86_64               2.28.1-14.el7                 base                47 k
 gnome-python2-bonobo               x86_64               2.28.1-14.el7                 base                87 k
 gnome-python2-canvas               x86_64               2.28.1-14.el7                 base                34 k
 gnome-python2-gconf                x86_64               2.28.1-14.el7                 base                46 k
 gnome-vfs2                         x86_64               2.24.4-14.el7                 base               839 k
 keybinder                          x86_64               0.3.1-1.el7                   epel                15 k
 libIDL                             x86_64               0.8.14-8.el7                  base                87 k
 libart_lgpl                        x86_64               2.3.21-10.el7                 base                67 k
 libbonobo                          x86_64               2.32.1-7.el7                  base               437 k
 libbonoboui                        x86_64               2.24.5-7.el7                  base               342 k
 libgnome                           x86_64               2.32.1-9.el7                  base               741 k
 libgnomecanvas                     x86_64               2.30.3-8.el7                  base               226 k
 pyorbit                            x86_64               2.24.0-15.el7                 base                51 k
 python-keybinder                   x86_64               0.3.1-1.el7                   epel                19 k
 python-psutil                      x86_64               2.2.1-1.el7                   epel               114 k
 vte                                x86_64               0.28.2-10.el7                 epel               361 k

Transaction Summary
================================================================================================================
Install  1 Package (+18 Dependent packages)

Total download size: 7.1 M
Installed size: 27 M
Downloading packages:
(1/19): gnome-python2-2.28.1-14.el7.x86_64.rpm                                           |  47 kB  00:00:02     
(2/19): gnome-python2-canvas-2.28.1-14.el7.x86_64.rpm                                    |  34 kB  00:00:02     
(3/19): ORBit2-2.14.19-13.el7.x86_64.rpm                                                 | 176 kB  00:00:02     
(4/19): gnome-python2-gconf-2.28.1-14.el7.x86_64.rpm                                     |  46 kB  00:00:01     
(5/19): libIDL-0.8.14-8.el7.x86_64.rpm                                                   |  87 kB  00:00:00     
warning: /var/cache/yum/x86_64/7/epel/packages/keybinder-0.3.1-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for keybinder-0.3.1-1.el7.x86_64.rpm is not installed
(6/19): keybinder-0.3.1-1.el7.x86_64.rpm                                                 |  15 kB  00:00:02     
(7/19): libart_lgpl-2.3.21-10.el7.x86_64.rpm                                             |  67 kB  00:00:01     
(8/19): gnome-vfs2-2.24.4-14.el7.x86_64.rpm                                              | 839 kB  00:00:03     
(9/19): gamin-0.1.10-16.el7.x86_64.rpm                                                   | 128 kB  00:00:07     
(10/19): libgnome-2.32.1-9.el7.x86_64.rpm                                                | 741 kB  00:00:01     
(11/19): libbonoboui-2.24.5-7.el7.x86_64.rpm                                             | 342 kB  00:00:02     
(12/19): pyorbit-2.24.0-15.el7.x86_64.rpm                                                |  51 kB  00:00:00     
(13/19): libbonobo-2.32.1-7.el7.x86_64.rpm                                               | 437 kB  00:00:02     
(14/19): python-keybinder-0.3.1-1.el7.x86_64.rpm                                         |  19 kB  00:00:00     
(15/19): gnome-python2-bonobo-2.28.1-14.el7.x86_64.rpm                                   |  87 kB  00:00:08     
(16/19): python-psutil-2.2.1-1.el7.x86_64.rpm                                            | 114 kB  00:00:00     
(17/19): vte-0.28.2-10.el7.x86_64.rpm                                                    | 361 kB  00:00:01     
(18/19): libgnomecanvas-2.30.3-8.el7.x86_64.rpm                                          | 226 kB  00:00:03     
(19/19): terminator-0.98-3.el7.noarch.rpm                                                | 3.4 MB  00:00:05     
----------------------------------------------------------------------------------------------------------------
Total                                                                           524 kB/s | 7.1 MB  00:00:13     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
 Userid     : "Fedora EPEL (7) <[email protected]>"
 Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
 Package    : epel-release-7-6.noarch (@extras)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libart_lgpl-2.3.21-10.el7.x86_64                                                            1/19 
  Installing : libgnomecanvas-2.30.3-8.el7.x86_64                                                          2/19 
  Installing : gnome-python2-2.28.1-14.el7.x86_64                                                          3/19 
  Installing : libIDL-0.8.14-8.el7.x86_64                                                                  4/19 
  Installing : ORBit2-2.14.19-13.el7.x86_64                                                                5/19 
  Installing : libbonobo-2.32.1-7.el7.x86_64                                                               6/19 
  Installing : pyorbit-2.24.0-15.el7.x86_64                                                                7/19 
  Installing : gnome-python2-gconf-2.28.1-14.el7.x86_64                                                    8/19 
  Installing : gnome-python2-canvas-2.28.1-14.el7.x86_64                                                   9/19 
  Installing : vte-0.28.2-10.el7.x86_64                                                                   10/19 
  Installing : keybinder-0.3.1-1.el7.x86_64                                                               11/19 
  Installing : python-keybinder-0.3.1-1.el7.x86_64                                                        12/19 
  Installing : python-psutil-2.2.1-1.el7.x86_64                                                           13/19 
  Installing : gamin-0.1.10-16.el7.x86_64                                                                 14/19 
  Installing : gnome-vfs2-2.24.4-14.el7.x86_64                                                            15/19 
  Installing : libgnome-2.32.1-9.el7.x86_64                                                               16/19 
  Installing : libbonoboui-2.24.5-7.el7.x86_64                                                            17/19 
  Installing : gnome-python2-bonobo-2.28.1-14.el7.x86_64                                                  18/19 
  Installing : terminator-0.98-3.el7.noarch                                                               19/19 
  Verifying  : libbonobo-2.32.1-7.el7.x86_64                                                               1/19 
  Verifying  : libgnome-2.32.1-9.el7.x86_64                                                                2/19 
  Verifying  : libgnomecanvas-2.30.3-8.el7.x86_64                                                          3/19 
  Verifying  : gamin-0.1.10-16.el7.x86_64                                                                  4/19 
  Verifying  : libIDL-0.8.14-8.el7.x86_64                                                                  5/19 
  Verifying  : gnome-python2-gconf-2.28.1-14.el7.x86_64                                                    6/19 
  Verifying  : gnome-python2-canvas-2.28.1-14.el7.x86_64                                                   7/19 
  Verifying  : python-psutil-2.2.1-1.el7.x86_64                                                            8/19 
  Verifying  : keybinder-0.3.1-1.el7.x86_64                                                                9/19 
  Verifying  : terminator-0.98-3.el7.noarch                                                               10/19 
  Verifying  : python-keybinder-0.3.1-1.el7.x86_64                                                        11/19 
  Verifying  : libbonoboui-2.24.5-7.el7.x86_64                                                            12/19 
  Verifying  : vte-0.28.2-10.el7.x86_64                                                                   13/19 
  Verifying  : gnome-vfs2-2.24.4-14.el7.x86_64                                                            14/19 
  Verifying  : ORBit2-2.14.19-13.el7.x86_64                                                               15/19 
  Verifying  : pyorbit-2.24.0-15.el7.x86_64                                                               16/19 
  Verifying  : gnome-python2-2.28.1-14.el7.x86_64                                                         17/19 
  Verifying  : gnome-python2-bonobo-2.28.1-14.el7.x86_64                                                  18/19 
  Verifying  : libart_lgpl-2.3.21-10.el7.x86_64                                                           19/19 

Installed:
  terminator.noarch 0:0.98-3.el7                                                                                

Dependency Installed:
  ORBit2.x86_64 0:2.14.19-13.el7                         gamin.x86_64 0:0.1.10-16.el7                          
  gnome-python2.x86_64 0:2.28.1-14.el7                   gnome-python2-bonobo.x86_64 0:2.28.1-14.el7           
  gnome-python2-canvas.x86_64 0:2.28.1-14.el7            gnome-python2-gconf.x86_64 0:2.28.1-14.el7            
  gnome-vfs2.x86_64 0:2.24.4-14.el7                      keybinder.x86_64 0:0.3.1-1.el7                        
  libIDL.x86_64 0:0.8.14-8.el7                           libart_lgpl.x86_64 0:2.3.21-10.el7                    
  libbonobo.x86_64 0:2.32.1-7.el7                        libbonoboui.x86_64 0:2.24.5-7.el7                     
  libgnome.x86_64 0:2.32.1-9.el7                         libgnomecanvas.x86_64 0:2.30.3-8.el7                  
  pyorbit.x86_64 0:2.24.0-15.el7                         python-keybinder.x86_64 0:0.3.1-1.el7                 
  python-psutil.x86_64 0:2.2.1-1.el7                     vte.x86_64 0:0.28.2-10.el7                            

Complete!


Install terminator in CentOS 6.5 (64bit)

We installed CentOS 6.5 (64bit) using this ISO, which we downloaded from http://vault.centos.org/6.5/isos/x86_64/

Once we got the OS started, we executed yum update -y to update all installed packages that were older than the versions in the repositories.
After the update process was complete, we then tried to install terminator using yum.

Executing yum install -y terminator resulted in an error:

Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirror.us.leaseweb.net
* extras: mirror.us.leaseweb.net
* updates: mirror.us.leaseweb.net
No package terminator available.
Error: Nothing to do

To solve the problem we needed to install the Extra Packages for Enterprise Linux (EPEL) repository using yum install -y epel-release.

After the installation was done, we executed yum install -y terminator once more and the installation of terminator succeeded.


HOWTO: Make Terminator Terminal Act Like Guake Terminal in Ubuntu 16.04 LTS (The easy ways) 1

First way to make terminator toggle its visibility using the F12 key (like guake)

  • Start terminator
  • Right click anywhere in the terminal area and click on the Preferences option

terminator-01

  • In the new window, click on the Keybindings tab and scroll down until you find the line that has the following information:
    Name : hide_window
    Action : Toggle window visibility

terminator-02

  • Click on the Keybinding column (3rd column), the value will change to New accelerator..., hit the key combination you want to be used to toggle the visibility of terminator. If you want the same behavior as guake, hit F12. You will see that the value in the Keybinding column will change to F12.
  • Hit the close button to close the settings window.
  • In the terminal try the key you just set (e.g F12) to see if it works. If it doesn’t work and in the case of F12 writes on the terminal a ~, close terminator and re-open it for the changes to get applied.

Second way to make terminator toggle its visibility using the F12 key (like guake)

  • Create the folder tree ~/.config/terminator (maybe it exists already). Please note that the . in front of config is purposely there, it is the way to hide a folder.
  • In the folder create a file named config (the full path would be ~/.config/terminator/config) and put the following as content:
[global_config]
[keybindings]
  hide_window = F12
[layouts]
  [[default]]
    [[[child1]]]
      parent = window0
      type = Terminal
    [[[window0]]]
      parent = ""
      type = Window
[plugins]
[profiles]
  [[default]]
  • Save the file and start terminator, pressing the F12 key should hide the terminal, pressing it once more should make it reappear.

HOWTO: Make Terminator Terminal Act Like Guake Terminal in Ubuntu 16.04 LTS (XenialXerus) Desktop edition x64 bit architecture 1

We propose an alternative solution to making terminator act like guake that requires two additional packages: xdotool and wmctrl.

Our proposal will launch terminator if there is not instance running.

In Ubuntu you can install the needed packages from the official repositories using sudo apt-get install xdotool wmctrl.

Using a text editor, create in you home folder a file named nano ~/toggle_visibility.sh and copy there the contents of the following chunk of code. You can also use nano, from a terminal issue nano ~/toggle_visibility.sh, then paste the code and hit CTRL+X to exit. When prompted if you want to save press ‘Y’ and hit enter.

#!/bin/bash

#The purpose of this script is to allow the user to toggle the visibility of (almost) any window.
#Please note it will work on the first match, so if there are multiple instances of an application it would be a random window of them the one to be affected.
#Usually it will control the window with the smallest PID.

#Checking that all dependencies are met, since we cannot proceed without them.
declare -a DEPENDENCIES=("xdotool" "wmctrl");
declare -a MANAGERS=("dnf" "apt-get");

for DEPENDENCY in ${DEPENDENCIES[@]}; do
    echo -n "Checking if $DEPENDENCY is available";
    if hash $DEPENDENCY 2>/dev/null; then
        echo "- OK, Found";
    else
        echo "- ERROR, Not Found in $PATH";
        for MANAGER in ${MANAGERS[@]}; do
            if hash $MANAGER 2>/dev/null; then
                echo -n "$DEPENDENCY is missing, would you like to try and install it via $MANAGER now? [Y/N] (default is Y): ";
                read ANSWER;
                if [[ "$ANSWER" == "Y" || "$ANSWER" == "y" || "$ANSWER" == "" ]]; then
                    sudo "$MANAGER" install "$DEPENDENCY";
                else
                    echo "Terminating";
                    exit -1;
                fi
            fi
        done
    fi
done

APPLICATION="$1";
FULL_COMMAND="$2";

#Checking if the application name provided by the user exists
if ! hash $APPLICATION 2>/dev/null; then
    echo -e "$APPLICATION does not seem to be a valid executable\nTerminating";
    exit -2;
fi

#Checking if the application is running.
PID=$(pgrep -u `whoami` -f "$FULL_COMMAND" | head -n 1);

#If the application is not running, we will try to launch it.
if [ -z $PID ]; then
  echo "$FULL_COMMAND not running, launching it..";
    $FULL_COMMAND;
else
    #Since the application has a live instance, we can proceed with the rest of the code.
    #We will get the PID of the application that is currently focused, if it is not the application we passed as parameter we will change the focus to that. In the other case, we will minimize the application.
  echo -n "$FULL_COMMAND instance found - ";
    FOCUSED=$(xdotool getactivewindow getwindowpid);
    if [[ $PID == $FOCUSED ]]; then
    echo "It was focused so we are minimizing it";
        #We minimize the active window which we know in this case that it is the application we passed as parameter.
        xdotool getactivewindow windowminimize;
    else
    echo "We are setting the focus on it";
        #We set the focus to the application we passed as parameter. If it is minimized it will be raised as well.
        wmctrl -x -R $APPLICATION;
    fi
fi

exit 0

Afterwards, you need to make the script an executable so you should issue chmod +x ~/toggle_visibility.sh to do that.

Then, execute ~/toggle_visibility.sh in your terminal once. We need to do that in order to install any missing dependencies for the tool.

Finally, you need to create a custom shortcut that will call the script using the key combination you like at any point.

To complete the procedure:

  1. Go to ‘System Settings’ either by clicking on the menu on the top right corner that looks like a light bulb or by issuing the following in a terminal unity-control-center to start the unity control center.
  2. In the newly appeared window, click on the ‘keyboard’ icon that is in the category ‘Hardware’.
  3. After that, click on the tab ‘Shortcuts’
  4. and on the left list, click on custom shortcuts.
  5. You will see a button with the + sign right next to the list, click that.
  6. In the dialog box that will appear enter the following:
    – In the name field enter anything you like. e.g ‘Toggle Terminator Visibility’
    – In the command field enter /home/<USER>/toggle_visibility.sh terminator "^/usr/bin/python /usr/bin/terminator$" where <USER> enter your own username.
    – Click apply.
  7. You will see a new row with two columns with the name you just set in the first column. Click on the second column, where it should say ‘Disabled’ and the press the key combination you want for toggling terminator e.g F12

You are ready to go 🙂

Just try the key combination you just provided and terminator will appear in front of you. Pressing it once more it will hide it.

NOTE: Please keep in mind that the above script can be used for other applications as well. In step 7, we gave as parameter the name of the application to be used, if you change that you could use it with other applications like Firefox.


HOWTO: Make Terminator Terminal Act Like Guake Terminal in Fedora 23 1

We tried to toggle the visibility of the terminator window using the default keybinding which is (Shift+Ctrl+Alt+A) and failed. Changing the configuration in the ‘Terminator Preferences’ under Keybindings to a new key-bind also did not do any good. We could not get the hide_window keybinding to work and so we could not toggle the window visibility with the keyboard.

We propose this alternative solution that requires two additional packages: xdotool and wmctrl.

In Fedora you can install them using sudo dnf install xdotool wmctrl and in Ubuntu using sudo apt-get install xdotool wmctrl

After the installation is complete, you need to paste the following code in a file and make it an executable.

e.g From a terminal issue nano ~/toggle_visibility.sh, then paste the code and hit CTRL+X to exit. When prompted if you want to save press ‘Y’ and enter.

#!/bin/bash

#The purpose of this script is to allow the user to toggle the visibility of (almost) any window.
#Please note it will work on the first match, so if there are multiple instances of an application it would be a random window of them the one to be affected.
#Usually it will control the window with the smallest PID.

#Checking that all dependencies are met, since we cannot proceed without them.
declare -a DEPENDENCIES=("xdotool" "wmctrl");
declare -a MANAGERS=("dnf" "apt-get");

for DEPENDENCY in ${DEPENDENCIES[@]}; do
    echo -n "Checking if $DEPENDENCY is available";
    if hash $DEPENDENCY 2>/dev/null; then
        echo "- OK, Found";
    else
        echo "- ERROR, Not Found in $PATH";
        for MANAGER in ${MANAGERS[@]}; do
            if hash $MANAGER 2>/dev/null; then
                echo -n "$DEPENDENCY is missing, would you like to try and install it via $MANAGER now? [Y/N] (default is Y): ";
                read ANSWER;
                if [[ "$ANSWER" == "Y" || "$ANSWER" == "y" || "$ANSWER" == "" ]]; then
                    sudo "$MANAGER" install "$DEPENDENCY";
                else
                    echo "Terminating";
                    exit -1;
                fi
            fi
        done
    fi
done

APPLICATION="$1";

#Checking if the application name provided by the user exists
if ! hash $APPLICATION 2>/dev/null; then
    echo -e "$APPLICATION does not seem to be a valid executable\nTerminating";
    exit -2;
fi

#Checking if the application is running. We are using pgrep as various application are python scripts and we will not be able to find them using pidof. pgrep will look through the currently running processes and list the process IDs of all the processes that are called $APPLICATION.
PID=$(pgrep --exact $APPLICATION | head -n 1);

#If the application is not running, we will try to launch it.
if [ -z $PID ]; then
  echo "$APPLICATION not running, launching it..";
    $APPLICATION;
else
    #Since the application has a live instance, we can proceed with the rest of the code.
    #We will get the PID of the application that is currently focused, if it is not the application we passed as parameter we will change the focus to that. In the other case, we will minimize the application.
  echo -n "$APPLICATION instance found - ";
    FOCUSED=$(xdotool getactivewindow getwindowpid);
    if [[ $PID == $FOCUSED ]]; then
    echo "It was focused so we are minimizing it";
        #We minimize the active window which we know in this case that it is the application we passed as parameter.
        xdotool getactivewindow windowminimize;
    else
    echo "We are setting the focus on it";
        #We set the focus to the application we passed as parameter. If it is minimized it will be raised as well.
        wmctrl -x -R $APPLICATION;
    fi
fi

exit 0

Afterwards, you need to make the script an executable so you should issue chmod +x ~/toggle_visibility.sh to do that.

Then, execute ~/toggle_visibility.sh in your terminal once. We need to do that in order to install any missing dependencies for the tool.

Finally, you need to create a custom shortcut that will call the script using the key combination you like at any point.

For Fedora,

  1. Issue the following in a terminal gnome-control-panel to start the gnome control panel.
  2. In the newly appeared window, click on the ‘keyboard’ icon that is in the category ‘Hardware’.
  3. After that, click on the tab ‘Shortcuts’
  4. and on the left list, click on custom shortcuts.
  5. You will see a button with the + sign, click that.
  6. In the dialog box that will appear enter the following:
    – In the name field enter anything you like. e.g ‘Toggle Terminator Visibility’
    – In the command field enter ‘/home/<USER>/toggle_visibility.sh terminator’ where user enter your own username.
    – Click apply.
  7. You will see a new row with two columns with the name you just set in the first column. Click on the second column, where it should say ‘Disabled’ and the press the key combination you want for toggling terminator e.g F12

For Ubuntu, go to System Settings and follow the same procedure after step 2.

You are ready to go 🙂

Just try the key combination you just provided and terminator will appear in front of you. Pressing it once more it will hide it.


HOWTO: Make Terminator Terminal Act Like Guake Terminal in Fedora 20/Ubuntu 14.10 7

We tried to toggle the visibility of the terminator window using the configuration in the ‘Terminator Preferences’ under Keybindings.

But, we could not get the hide_window keybinding to work and so we could not toggle the window visibility with a single key.

After trying other versions of the terminator source which also failed we switched to an alternative solution.

This solution requires two additional packages: xdotool and wmctrl.

In Fedora you can install them using sudo yum install xdotool wmctrl and in Ubuntu using sudo apt-get install xdotool wmctrl

After the installation is complete,  you need to paste the following code in a file and make it an executable.

e.g From a terminal issue nano ~/toggle_visibility.sh, then paste the code and hit CTRL+X to exit. When prompted if you want to save press ‘Y’ and enter.

#!/bin/bash

#The purpose of this script is to allow the user to toggle the visibility of (almost) any window.
#Please note it will work on the first match, so if there are multiple instances of an application it would be a random window of them the one to be affected.

#Checking that all dependencies are met, since we cannot proceed without them.
declare -a DEPENDENCIES=("xdotool" "wmctrl");
declare -a MANAGERS=("yum" "apt-get");

for DEPENDENCY in ${DEPENDENCIES[@]};
do
    echo -n "Checking if $DEPENDENCY is available";
    if hash $DEPENDENCY 2>/dev/null;
    then
        echo "- OK, Found";
    else
        echo "- ERROR, Not Found in $PATH";
        for MANAGER in ${MANAGERS[@]};
        do
            if hash $MANAGER 2>/dev/null;
            then
                echo -n "$DEPENDENCY is missing, would you like to try and install it via $MANAGER now? [Y/N] (default is Y): ";
                read ANSWER;
                if [[ "$ANSWER" == "Y" || "$ANSWER" == "y" || "$ANSWER" == "" ]];
                then
                    sudo "$MANAGER" install "$DEPENDENCY";
                else
                    echo "Terminating";
                    exit -1;
                fi
            fi
        done
    fi
done

APPLICATION="$1";

#Checking if the application name provided by the user exists
if ! hash $APPLICATION 2>/dev/null;
then
    echo -e "$APPLICATION does not seem to be a valid executable\nTerminating";
    exit -2;
fi

#Checking if the application is running. We are using pgrep as various application are python scripts and we will not be able to find them using pidof. pgrep will look through the currently running processes and list the process IDs of all the processes that are called $APPLICATION.
PID=$(pgrep $APPLICATION | head -n 1);

#If the application is not running, we will try to launch it.
if [ -z $PID ];
then
  echo "$APPLICATION not running, launching it..";
    $APPLICATION;
else
    #Since the application has a live instance, we can proceed with the rest of the code.
    #We will get the PID of the application that is currently focused, if it is not the application we passed as parameter we will change the focus to that. In the other case, we will minimize the application.
  echo -n "$APPLICATION instance found - ";
    FOCUSED=$(xdotool getactivewindow getwindowpid);
    if [[ $PID == $FOCUSED ]];
    then
    echo "It was focused so we are minimizing it";
        #We minimize the active window which we know in this case that it is the application we passed as parameter.
        xdotool getactivewindow windowminimize;
    else
    echo "We are setting the focus on it";
        #We set the focus to the application we passed as parameter. If it is minimized it will be raised as well.
        wmctrl -x -R $APPLICATION;
    fi
fi

exit 0

Afterwards, you need to make the script an executable so you should issue chmod +x ~/toggle_visibility.sh to do that.

Then, execute ~/toggle_visibility.sh in your terminal once. We need to do that in order to install any missing dependencies for the tool.

Finally, you need to create a custom shortcut that will call the script using the key combination you like at any point.

For Fedora,

  1. Issue the following in a terminal gnome-control-panel to start the gnome control panel.
  2. In the newly appeared window, click on the ‘keyboard’ icon that is in the category ‘Hardware’.
  3. After that, click on the tab ‘Shortcuts’
  4. and on the left list, click on custom shortcuts.
  5. You will see a button with the + sign, click that.
  6. In the dialog box that will appear enter the following:
    – In the name field enter anything you like. e.g ‘Toggle Terminator Visibility’
    – In the command field enter ‘/home/<USER>/toggle_visibility.sh terminator’ where user enter your own username.
    – Click apply.
  7. You will see a new row with two columns with the name you just set in the first column. Click on the second column, where it should say ‘Disabled’ and the press the key combination you want for toggling terminator e.g F12

For Ubuntu, go to System Settings and follow the same procedure after step 2.

You are ready to go 🙂

Just try the key combination you just provided and terminator will appear in front of you. Pressing it once more it will hide it.


HOWTO: Make Terminator Terminal Act Like Guake Terminal in Ubuntu 11.10 8

Updated instructions for Fedora 23 can be found here http://bytefreaks.net/gnulinux/bash/howto-make-terminator-terminal-act-like-guake-terminal-in-fedora-23

For Ubuntu 16.04LTS here http://bytefreaks.net/gnulinux/howto-make-terminator-terminal-act-like-guake-terminal-in-ubuntu-16-04-lts-the-easy-ways

Installation:

We had to install the beta version so that it supports a new feature that is not currently available in the Ubuntu repositories:

sudo add-apt-repository ppa:gnome-terminator/ppa
sudo apt-get update
sudo apt-get install terminator

After that, create the following file: ~/.config/terminator/config  and add the following text in it:

[global_config]
  enabled_plugins = LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
  always_on_top = True
  tab_position = bottom
  sticky = True
[keybindings]
  hide_window = F12
[profiles]
  [[default]]
    background_darkness = 0.75
    background_type = transparent
    foreground_color = "#ffffff"
[layouts]
  [[default]]
    [[[child0]]]
      position = 0:24
      type = Window
      order = 0
      parent = ""
      size = 1679, 298
    [[[child1]]]
      position = 839
      type = HPaned
      order = 0
      parent = child0
    [[[terminal3]]]
      profile = default
      type = Terminal
      order = 1
      parent = child1
    [[[terminal2]]]
      profile = default
      type = Terminal
      order = 0
      parent = child1
  [[original]]
    [[[child1]]]
      type = Terminal
      parent = window0
      profile = default
    [[[window0]]]
      type = Window
      order = 0
      parent = ""
[plugins]

This will configure terminator to accept the F12 button as a hide/show command wherever you are and will initially create a session with two terminals when you start terminator, as in the screenshot below: