configure xterm

install the package that contains xrdb binary

apt-get install x11-xserver-utils

show current configuration

xrdb -query -all

set a new configuration, put the lines in ~/.Xresources

vi ~/.Xresources

! set window size
xterm*geometry: 120x34

! set xterm colors
xterm*background:   yellow
xterm*foreground:   black

! set xterm keybindings
xterm.*.translations: #override \n \
        <Key>F1:     string("X") \n \
        <Key>F2:     string("Y") \n \
        <Key>F3:     string(0x1b)    string("[11~") \n \
        <Key>F4:     string(0x1b)    string("[12~")

reload configuration

xrdb ~/.Xresources

remove all configuration

xrdb -remove -all

more about xterm: http://invisible-island.net/xterm/xterm.faq.html

Advertisements

encrypt shell scripts

1 – Install shc package

apt-get install shc

2 – Create the shell script file

vi file.sh

#!/bin/bash
for i in {1..3}; do echo $i: $RANDOM; done

3 – Encrypt shell script file using shc

shc -f file.sh

Output generated files: file.sh.x  file.sh.x.c

4 – Execute the encrypted shell script

./file.sh.x

5 – Specifying expiration date for your shell script ( dd/mm/yyyy format )

shc -e 30/07/2017 -f file.sh

6 – Add custom expiration message for your shell script

shc -e 30/07/2017 -m contact 'my@mail.com' -f file.sh

tint2 panel openbox

1 – Install packages

apt-get install tint2 gsimplecal

2 – Add lines bellow in tint2 configuration file

vi .config/tint2/tint2rc

# Panel Icons
panel_items = LTSBC
launcher_padding = 0 3 5
launcher_icon_size = 21
launcher_item_app = /usr/share/applications/chromium.desktop
launcher_item_app = /usr/share/applications/firefox-esr.desktop

3 – Execute tint2

tint2

To reload tint2rc configuration file, kill and start tint2

pkill tint2 && tint2