How to find out who sniffs out about your Android mobile smart phone

November 16th, 2017


Maybe little know about this embedded Android mobile smart phone features but there is a few mobile code cheats that can help you find out a little bit about your phone security, that's pretty handy for anyone who really wants to know whether mobile phone is being sniffed / tapped on Android software level and can give you an idea on how much your smart phone data is protected or are you being a target of someone's secret surveillance, of course this info is just on Android firmware embedded features level and if your mobile is somehow hacked or trojanned the information that can show could be not adequate, but still it is a good info to know. I'm sure you'll be surprised how much embedded Android features are there for the controllers (Google staff) 🙂


1. Information about telephone, battery status and statistics about telephone use


To get information about battery, usage statistics and device.

2. Are Smart Phone Voice / SMS Transfers on?


This combination of numbers and symbols allows you to understand where your mobile is Transferring Calls, SMS-es or other messages. If you type this code and click call the phone screen should show any numbers to which any data is being transferred, if your phone is okay and not tapped you will get a message the phone call transfers and sms transfer is disabled. Always keep in mind that there is a danger for your info / data or even billings to be tapped already as Android is non-free software, so even if that code returns no transfers you're still insecure at the hands of Google's mercy.

3. Where are calls and SMS-es transffered in case if Voice / SMS Transfers are on?


This codes shows where are your input Calls and SMS-es are being transferred once someone is calling you and he is unable to reach you. At best case the inbound calls will be redirected as voice mail format to voice mail box of the number of your mobile operator.

4. Deactivate all kind of Phone Voice / SMS Transfers (Redirects) for security


By inputting above code you can deactivate all kind of redirects, which were prior configured at your mobile phone. The code is universal one and should work not only in Android but across all smart phones including IPhones. It is a recommended one especially if you're planning to travel in foreign country or region due to the roaming phone expenses.

5. Get IMEI (International Mobile Equipment Identifier) phone info


Above code provides information about the ID number of the mobile phone th so called IMEI (International Mobile Equipment Identifier). Using the email a mobile phone that has been recently stolen can be easily found, because the device is emitting its IMEI number to the mobile phone operator, nomatter what kind of SIM Card is inserted in the phone.


6. How to protect yourself from criminals and spies?

You can use alternative Messanger  Chat / Voice Clients such as: Telegram, Wickr, Signal or Alternatively run your own Jabber server and use it to securily communicate with your friends and relatives

Do not install an unknown source program to mobile phone, abstain from charging the phone on airports and suspicious free "charging" points, abtain from using any free wifi networks whose owner you don't know personally. Beware while browsing as there are websites that could infect you with javascript viruses and terrible phone malware stuff, to be safe make sure you have some kind of Antivirus software installed on the phone just in case.
Be vigilant!


7. Bigger list of Codes working across some of Android versions providing various phone stats and info (not working on all mobiles but might be working on yours)


Here is a list also with a useful codes for some of Android version releases (this will not work on IPhones)


*4636#*#*Information about statistics of phone, battery, usage

*#*#7780#*#*Nullify phone settings.. Delete only applications.

*2767*3855# – Nullify all settings, reinstall firmware.

*34971539#*#* – Full information about phone camera vendor etc.

*#*#273283*255*663282***Quickly archive media files

*#*#197328640#*#Test mobile service

232339#*#* / *#*#526#*#*Test Wireless (Wi-Fi) netework

*#*#232338#*#*Show Wi-Fi card physical MAC Address

*#*#1472365#*#*Quick GPS test

*#*#1575#*#* Various GPS Tests

*#*#0283#*#* Test mobile Loopback interface

*#*#0*#*#* – Test of liquid-crystals mobile display

*#*#0673#*#* / *#*#0289#*#*An Audio test

*#*#0842#*#* Test vibrations of the background phone lid (lightning)

*2663#*#* Get version of sensor screen

*2664#*#*Test of the sensor screen

* * * *0588#*#*Test distance sensor

* * *3264#*#*Get Installed RAM Version

*#*#232331#*#*Bluetooth Test

*#*#7262626#*#*Test GSM signal

*#*#232337#*#*Show bluetooth address

*#*#8255#*#* – Test Mobile Google Talk service

*#*#1234#*#*Information about firmware

*#*#1111#*#*Version of installed Open Trading software version


Share this on

Add gzip compression to optimize web server served files in Apache, Nginx and LiteSpeed

November 15th, 2017


What is GZIP Compression and why you need it?


  • What is gzip? – In Linux / Unix gzip of files is used to compress files so they can take less space when they're transferred from server to server via network in order to speed up file transfer.
  • Usually gzipped files are named as filename.gz
  • Why GZIp compression is important to be enabled on servers, well because that reduces the transferred (served) file by webserver to client browser
  • The effect of this is the faster file transfer of the file and increased overall web user performance


Most webservers / websites online currently use gzipping of a sort, those who still did not use it has websites which are up to 40% slower than those of competitor websites

How to enable GZIP Compression on Apache Webserver

The easiest way for most people out there who run there websites on a shared hosting is to add the following Apache directives to dynamic loadable .htaccess file:

<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*


You can put a number of other useful things in .htaccess the file should already be existing in most webhostings with Cpanel or Kloxo kind of administration management interface.

Once the code is included to .htaccess you can reflush site cache.
To test whether the just added HTTP gzip compression works for the Webserver you can use The Online HTTP Compression test

If for some reason after adding this code you don't rip the benefits of gzipped content served by webserver you can try to add altenatively to .htaccess


AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript


Howto Enable GZIP HTTP file compression on NGINX Webserver?

Open NGINX configuration file and add to it the following command parameters:


gzip on;
gzip_comp_level 2;
gzip_http_version 1.0;
gzip_proxied any;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;


# Disable for IE < 6 because there are some known problems
gzip_disable "MSIE [1-6].(?!.*SV1)";

# Add a vary header for downstream proxies to avoid sending cached gzipped files to IE6
gzip_vary on;

Enable HTTP file Compression on LiteSpeed webserver

In configuration under TUNING section check whether "enable compression" is enabled, if it is not choose "Edit"
and turn it on.


What is the speed benefits of using HTTP gzip compression?

By using HTTP gzip compression you can save your network and clients abot 50 to 70% (e.g. transferred data) of the original file size.
This would mean less time for loading pages and fetched files and decrease in used bandwidth.


A very handy tool to test whether HTTP Compression is enabled as well as how much is optimized for Speed your Website is Google PageSpeed Insights
as well as

Share this on

ArchAngels day 8 of November, the day of All Angels and Archangels – Who are the ArchAngels and why we should venerate them?

November 8th, 2017


Today on 8th of November, the Bulgarian Orthodox Church is celebrating the day of Arch Angels (Primary Angels) who stay always near God Almigthy the Creator of this world.

Accroding to Christianity, there are seven main angels called (Arch Angels),  each of the Archangels has its own specific ission, one is a messanger of secrets that has to be revealed to man, other is a healer of infirmities.

The names of the Seven main Arch Angels in Eastern Orthodox Christian faith are:



  •     Michael in the Hebrew language means "Who is like God?" or "Who is equal to God?" Michael has been depicted from earliest Christian times as a commander, who holds in his right hand a spear with which he attacks Lucifer/Satan, and in his left hand a green palm branch. At the top of the spear there is a linen ribbon with a red cross. The Archangel Michael is especially considered to be the Guardian of the Orthodox Faith and a fighter against heresies.




  •     Gabriel means "God is my strength" or "Might of God." He is the herald of the mysteries of God, especially the Incarnation of God and all other mysteries related to it. He is depicted as follows: In his right hand, he holds a lantern with a lighted taper inside, and in his left hand, a mirror of green jasper. The mirror signifies the wisdom of God as a hidden mystery.



  •     Raphael means "It is God who heals" or "God Heals" (Tobit 3:17, 12:15). Raphael is depicted leading Tobit (who is carrying a fish caught in the Tigris) with his right hand, and holding a physician's alabaster jar in his left hand.



  •     Uriel means "God is my light," or "Light of God" (II Esdras 4:1, 5:20). He is depicted holding a sword against the Persians in his right hand, and a flame in his left.



  •     Sealtiel means "Intercessor of God." He is depicted with his face and eyes lowered, holding his hands on his bosom in prayer.

  •     Jegudiel means "Glorifier of God." He is depicted bearing a golden wreath in his right hand and a triple-thonged whip in his left hand.
  •     Barachiel means "Blessed by God." He is depicted holding a white rose in his hand against his breast.



  •     Jerahmeel means "God's exaltation." He is venerated as an inspirer and awakener of exalted thoughts that raise a person toward God (II Esdras 4:36). As an eighth, he is sometimes included as archangel.


The accent of todays feast (Synaxis of the Holy Archangel Michael and the other Budiness Powers) is Archangel Michael, so I find it worthy to say few words more about Archangel Michael.

Archangel Michael is "the keeper of the souls and a fighter against evil in the world".

That is the reason why Archangel Michael is often depicted with a firy spear at hand piercing the devil.
In the Eastern Orthodox Christian faith there is no other God servent guardian angel with so many duties.

Archangel Michael is:

1. Chiefman of the Heavenly (Bodiless) Powers

2. A fighter against the spirits of wickedness (spirits of evil)

3. A Protector of Christians from the devil

4. A Chief Leader of Christ's armies against the pagans and heresies

5. A Keeper of All Christian Souls

6. The Archangel that is present on mens deathbed and divides the soul from the body


The dividing of the soul on a men deadbed is perhaps one of the most important of Archangel Michael's missions it does stop our earthly way and collects the soul. Just before this according to our Orthodox Christian faith, each one of us Christians is given by God during Baptism with a personal guardian angel, who keeps him from perils, troubles and sorrows.


The Guardian Angel each Christian receives during baptism

But man has to be cautious, the guardian angel does cries watching at us when we live careless sinful life, he is not enforced to keep for us eternally if we wish to live a life without faith or God, then he leaves us crying for our fallen state.

The more sinful life a man leads in this life, the more clean his soul is being collected by Archangel Michael.
The food we put on table Archangels day is a feastful one, it is a tradition here in Bulgarian to eat Lamb meat the so called (Kurban) and a special breads are prepared, the so called Rangel's Bread, there are 2 types actually (Bogovica and Rangelovo bludo).
A boiled wheat is also a common meal on the table, beans and of course red wide.

The meaning of 8 of Novembers feast is to celebrate the Congregation Integrity of all Angel ranks (just like in Army we Christians believe that Angels and they all work together for the same goal the salvation of each man's soul)


Because of Archangel Michael being so famous to divide the soul from the body of the dying, perhaps it is not a coincidence why few days before 8th of November on the previous Saturday the Church calendar marks A Memorial day for all those who died (The so called Zadushnica feast), the meaning of which is that people give out food and goods for the remembrance of the souls of their departed beloveds, praying with hope for the deceased people begging God to have mercy over their souls. Because of this unwritten connection between the men deadbed and Archangel michael often in people's tradition ArchAngel Michael is seen to be an Angel of Death and historically has been highly venerated all across the Christiandome.

It used to be an old people believe that if one smiles on his death hour this means ArchAngel Michael has granted him to heaven and as a prize has given him a Golden Apple (in spiritual sense).


Let the Holy Archangels; Michael, Gabriel, Raphael, Uriel Selathiel, Jegudiel, Barachiel, Jarahmeel along with all angels and bodily powers pray for us so we find ways to become better people and clean up from our numerous sins by repentance.


Share this on

Play Colorful console Tetris for Linux Mac and BSD ( bastet )

November 7th, 2017


Do you remember the bsdgames package which had the good old tetris-bsd – an ASCII tetris for terminal / console along with nethack, hunt and number of other cool ascii games? If you don't you can give a try to install the package if you don't have it yet, install it on Debian Linux / Ubuntu with.

linux:~# apt-get install –yes tetris-bsd

Then launch tetris-bsd like so:

$ /usr/games/tetris-bsd


But wait there is more just recently I found out there is a modern colorful version remake of bsd-tetris called bastet

To give it a try install it with apt-get on Deb based Linuces

linux:~# apt-get install bastet
Четене на списъците с пакети… Готово
Изграждане на дървото със зависимости       
Четене на информацията за състоянието… Готово
Следните допълнителни пакети ще бъдат инсталирани:
Следните НОВИ пакети ще бъдат инсталирани:
  bastet libboost-program-options1.55.0
0 актуализирани, 2 нови инсталирани, 0 за премахване и 1 без промяна.
Необходимо е да се изтеглят 219 kB архиви.
След тази операция ще бъде използвано 858 kB допълнително дисково пространство.
Искате ли да продължите? [Y/n] Y
Изт:1 jessie/main libboost-program-options1.55.0 amd64 1.55.0+dfsg-3 [143 kB]
Изт:2 jessie/main bastet amd64 0.43-3+b1 [75,7 kB]
Изтеглени 219 kB за 0с (220 kB/сек)     
Предварително настройване на пакети …
Selecting previously unselected package libboost-program-options1.55.0:amd64.
(Reading database … 172280 files and directories currently installed.)
Preparing to unpack …/libboost-program-options1.55.0_1.55.0+dfsg-3_amd64.deb …
Unpacking libboost-program-options1.55.0:amd64 (1.55.0+dfsg-3) …
Selecting previously unselected package bastet.
Preparing to unpack …/bastet_0.43-3+b1_amd64.deb …
Unpacking bastet (0.43-3+b1) …
Processing triggers for hicolor-icon-theme (0.13-1) …
Processing triggers for man-db ( …
Processing triggers for desktop-file-utils (0.22-1) …
Processing triggers for mime-support (3.58) …
Setting up libboost-program-options1.55.0:amd64 (1.55.0+dfsg-3) …
Setting up bastet (0.43-3+b1) …
Processing triggers for libc-bin (2.19-18+deb8u10) …

linux:~$ /usr/games/bastet


FreeBSD users can also install it either via freebsd ports :

freebsd#  cd /usr/ports/games/bastet/ && make install clean

or through binary package with:

freebsd# pkg install bastet


Mac OS X users can also enjoy it but you need to install Mac OS X home brew package manager

Once having brew command install the tiny ASCII tetris game through Mac OS X terminal with:

$ brew install basket

Enjoy bastet 🙂

Share this on

Where are Apache log files on my server – Apache log file locations on Debian / Ubuntu / CentOS / Fedora and FreeBSD ?

November 7th, 2017


Where are Apache log files on my server?

1. Finding Linux / FreeBSD operating system distribtion and version

Before finding location of Apache log files it is useful to check what is the remote / local Linux operating system version, hence

First thing to do when you login to your remote Linux server is to check what kind of GNU / Linux you're dealing with:

cat /etc/issue
cat /etc/

In most GNU / Linux distributions should give you enough information about the exact Linux distribution and version remote server is running.

You will get outputs like

# cat /etc/issue
SUSE LINUX Enterprise Server 10.2 Kernel \r (\m), \l


# cat /etc/issue
Debian GNU/Linux 8 \n \l

If remote Linux is Fedora look for fedora-release file:

cat /etc/fedora-release Fedora release 7 (Moonshine)

The proposed standard with the introduction of systemd across all Linux distributions is



# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION="8 (jessie)"

Once we know what kind of Linux distribution we're dealing with, we can proceed with looking up for standard location of Apache config:

2. Apache config file location for Fedora / CentOS / RHEL and other RPM based distributions

RHEL / Red Hat / CentOS / Fedora Linux Apache access file location


3. Apache config file location for Debian / Ubuntu and other deb based Linux distributions

Debian / Ubuntu Linux Apache access log file location


4. Apache config file location for FreeBSD

FreeBSD Apache access log file location –


5. Finding custom Apache access log locations

If for some reason the system administrator on the remote server changed default path for each of distributions, you can find custom configured log files through:

a) On Debian / Ubuntu / deb distros:

debian:~# grep CustomLog /etc/apache2/apache2.conf

b) On CentOS / RHEL / Fedora Linux RPM based ones:

[root@centos:  ~]# grep CustomLog /etc/httpd/conf/httpd.conf

c) On FreeBSD OS


freebsd# grep CustomLog /etc/httpd/conf/httpd.conf
 # a CustomLog directive (see below).
    #CustomLog "/var/log/httpd-access.log" common
    CustomLog "/var/log/httpd-access.log" combined

Share this on

How to use zip command to archive directory and files in GNU / Linux

November 6th, 2017


How to zip directory or files with ZIP command in LInux or any other Unix like OS?

Why would you want to ZIP files in Linux if you have already gzip and bzip archive algorithms? Well for historical reasons .ZIP is much supported across virtually all major operating systems like Unix, Linux, VMS, MSDOS, OS/2, Windows NT, Minix, Atari and Macintosh, FreeBSD, OpenBSD, NetBSD, Amiga and Acorn RISC and many other operating systems.

Assuming that zip command line tool is available across most GNU / Linux and WinZIP is available across almost all Windowses, the reason you might need to create .zip archive might be to just transfer the files from your Linux / FreeBSD desktop system or a friend with M$ Windows.

So below is how to archive recursively files inside a directory using zip command:

 $ zip -r /home/your-directory/your-files-pictures-text/


or you can write it shorter with omitting .zip as by default zip command would create .zip files


$ zip -r whatever-zip-file-name /home/your-directory/your-files-pictures-text/


The -r tells zip to recurse into directories (e.g. archive all files and directories inside your-files-pictures-text/)

If you need to archive just a files recursively with a file extension such as .txt inside current directory


$ zip -R '*.txt'

Above command would archive any .txt found inside your current directory if the zip command is for example issued from /home/hipo all found files such as /home/hipo/directory1, /home/hipo/directory2, /home/hipo/directory2/directory3/directory4 and all the contained subdirs that contain any .txt extension files will be added to the archive.

For the Linux desktop users that are lazy and want to zip files without much typing take a look at PeaZip for Linux 7Z / ZIP GUI interface tool


Share this on

Email Linux alternative text console clients to Thunderbird, fetchmail, Mutt, fetchmail + Alpine how to

November 4th, 2017


As a GNU / Linux user you might end up searching for the best email client to satisfy your needs, for those who used so far Outlook Express on M$ Windows first switch to GNU / Linux the most likely one to choose is either Mozilla Thunderbird or GNOME's Evolution default Mail Clientbut what more text / console programs are there that will allow you to easily check email via POP3 and IMAP on Linux?


1. Install Fetchmail and use to collect and copy your emails from remote server to your local machine

 SSL enabled POP3, APOP, IMAP mail gatherer/forwarder
 fetchmail is a free, full-featured, robust, and well-documented remote mail
 retrieval and forwarding utility intended to be used over on-demand TCP/IP
 links (such as SLIP or PPP connections).  It retrieves mail from remote mail
 servers and forwards it to your local (client) machine's delivery system, so
 it can then be read by normal mail user agents such as mutt, elm, pine,
 (x)emacs/gnus, or mailx.  The fetchmailconf package includes an interactive
 GUI configurator suitable for end-users.

To install it, issue:

apt-get install –yes fetchmail procmail

To configure fetchmail to gather your mail from your POP3 / IMAP mailbox, create below
.fetchmailrc configuratoin and modify according to your account


# vim .fetchmailrc


#### .fetchmailrc
 set daemon 600
 set logfile fetchmail.log

 poll the_mail_server_hostname proto POP3

  user "Remote_Username" pass "PASSWORD=" is "local_username" preconnect "date >> fetchmail.log"
  #no keep
  no rewrite
  mda "/usr/bin/procmail -f %F -d %T";

Here is also few words on each of the .fetchmailrc config options

set daemon 600 The fetchmail binary with run in the background in daemon mod and fetch mail from the server every 600 seconds or 10 minutes.

set logfile fetchmail.log This will set the directory and file name of the fetchmail user log file. Eveytime fetchmail recieves an email, checks the pop3 server or errors out you will find an entry here.

poll the_isp_mail_server proto POP3 This line tells fetchmail what mail server to contact, in theis case "the_isp_mail_server" and to use the "POP3" protocol.

user "remote_user_name" pass "PASSWORD" is "local_username" preconnect "date >> fetchmail.log The user directive tells fetchmail what the name of the user on the remote mail server is for example "remote_user_name". The pass directive is simply the password you will use for the remote user on the mail server. The "is" directive is optional. It tells fetchmail to deliver mail to a diferent user name if the user on the remote mail server and the local machine are different. For example, I may be using the name "joe.doe" on the mail server, but my local user name is "jdoe". I would use a line like user "joe.doe" pass "PASSWORD" is "jdoe". The preconnect command simply adds the current time and date to the fetchmail log file every time fetchmail checks for new mail.

ssl The "ssl" directive tells fetchmail to use encryption when connecting to the pop3 mail server. Fetchmail will use port 995 instead of port 110 for un-encypted mail communication. In order to use ssl the remote mail server must be able to use ssl. Comment out this directive if you do _not_ use pop3s.

fetchall Fetchall just means to fetch all of the mail on the mail server no matter what the "read" flag is. It is possibly to read mail through many different processes. If you use another mail client from another location, for example you could have read you mail and kept it ont he server, but marked it with the "read" flag. At this point if you did _not_ use the "fetchall" flag then only mail marked as new would be downloaded.

no keep Once the mail is downloded from the mail server fetchmail is to tell the server to remove it from the server. You may choose to comment this option out if you want to leave all mail on the server.

no rewrite Do not rewrite headers. When fetchmail recieves the mail you do not want any of the headers mangled in any way. This directive tells fetchmail to leave the headers alone.

mda "/usr/bin/procmail -f %F -d %T"; The mda is your "mail delivery agent. Procmail is the program that fetchmail will hand the mail off to once it is downloaded. The argument "-f %F" logs who the mail if from and "-d %T" turns on explicit delivery mode, delivery will be to the local user recipient.

For configuring multiple mailboxes email to be gathered to local machine through fetchmail add to above configuration, some more config similar to this:

 poll protocol pop3:
       username "admin" password "your-plain-text-password" is "username" here;
       username "what-ever-user-name" password "Just-another-pass#" is "foreman" here;

  poll protocol pop3 with option sslproto '':
       user "whatever-user1" password "its-my-pass" mda "/usr/bin/procmail -d %T":   user "whatever-user1" password "its-my-pass" mda "/usr/bin/procmail -d %T


Because as you can see fetchmail keeps password in plaintext it is a best security practice to set some good file permissions on .fetchmailrc just to make sure some other local user on the same Linux / Unix machine will not be able to read your plaintext password, to do so issue below command.

chmod 600 ~/.fetchmailrc


For the purpose of logging as we have it into the config you will also need to create new blank file fetchmail.log

touch fetchmail.log

Once fetchmail all your emails you can use mail command to view your messages or further configure alpine or mutt to read the downloaded messages.


2. Use Alpine text based email client to check your downloaded email with fetchmail

Alpine is Text-based email client, friendly for novices but powerful
 Alpine is an upgrade of the well-known PINE email client.  Its name derives
 from the use of the Apache License and its ties to PINE.

In other words what Alpine is it is a rewritten and improved version of the good old PINE Unix email client (for those who remember it).

To give alpine a try on Debian / Ubuntu install it with:


apt-get install –yes alpine pilot




3. Use MuTT advanced and much more colorful text email client to view your emailbox


 Mutt is a sophisticated text-based Mail User Agent. Some highlights:
  * MIME support (including RFC1522 encoding/decoding of 8-bit message
    headers and UTF-8 support).
  * PGP/MIME support (RFC 2015).
  * Advanced IMAP client supporting SSL encryption and SASL authentication.
  * POP3 support.
  * ESMTP support.
  * Message threading (both strict and non-strict).
  * Keybindings are configurable, default keybindings are much like ELM;
    Mush and PINE-like ones are provided as examples.
  * Handles MMDF, MH and Maildir in addition to regular mbox format.
  * Messages may be (indefinitely) postponed.
  * Colour support.
  * Highly configurable through easy but powerful rc file.


To install MuTT:


linux:~# apt-get install –yes mutt

Configuring mutt if you don't have priorly set-up with fetchmail to collect your remote e-mails, you might want to try out .mutt's email fetch features to do so you will need a .muttrc configuration like that:

# Automatically log in to this mailbox at startup
set spoolfile="imaps://"
# Define the = shortcut, and the entry point for the folder browser (c?)
set folder="imaps://"
set record="=Sent"
set postponed="=Drafts"

You might also omit placing the password inside .muttrc configuration as storing the password in plaintext might be a big security hole if someone is able to read it at certain point, but the downside of that is you'll be asked by mutt to fill in your email password on every login which at a point becomes pretty annoying.

If you face problems with inability of mutt to connect to remote mail server due to TLS problems, you can also try to play with below configurations:

# activate TLS if available on the server
 set ssl_starttls=yes
 # always use SSL when connecting to a server
 set ssl_force_tls=yes
 # Don't wait to enter mailbox manually
 unset imap_passive        
 # Automatically poll subscribed mailboxes for new mail (new in 1.5.11)
 set imap_check_subscribed
 # Reduce polling frequency to a sane level
 set mail_check=60
 # And poll the current mailbox more often (not needed with IDLE in post 1.5.11)
 set timeout=10
 # keep a cache of headers for faster loading (1.5.9+?)
 set header_cache=~/.hcache
 # Display download progress every 5K
 set net_inc=5


Once you have the emails downloaded with fetchmail for your mailbox mutt should be showing your email stuff like in below screenshot

linux:~$ mutt




Of course a very handy thing to have is w3m-img text browser that displays images as it might be able to open your pictures attached to email if you're on a physical console tty.

I'll be curious to hear, if you know of better and easier solutions to check mail in console, so if you know such please drop a comment explaining how you check your mail text.


Share this on

How to make for loop (cycles) in KSH useful for FreeBSD / UNIX system administrators

November 3rd, 2017


Sometimes we have to administrate this operating systems such as FreeBSD / AIX / HP UX or even Mac OS server where by default due to historical reasons or for security bash shell is not avialable. That's not a common scenario but it happens so if as sysadmin we need to create for loops on ksh it is useful to know how to do that, as for loop cycles are one of the most important command line tools the sysadmin swiss army knife kind of.

So how to create a for loop (cycle) in ksh (Korn Shell)?

The most basic example for a KSH loop shell is below:

for i in 1 2 3 4 5
  echo "Welcome $i times"


Add the content to any file lets say ksh_loop.ksh then make it executable as you do in bash shells



$ chmod +x ksh_loop.ksh
$ ksh ksh_loop.ksh


The overall syntax of the for loop ksh command is as follows:



for {Variable} in {lists}
    echo ${Variable}


Hence to list lets say 20 iterations in a loop in ksh you can use something like:

for i in {1..20}
  echo "Just a simple echo Command $i times";
# add whatever system commands you like here


Example for some useful example with KSH loop is to list a directory content so you can execute whatever command you need on each of the files or directories inside


for f in $(ls /tmp/*)
        print "Iterating whatever command you like on /tmp dir : $f"

Other useful for loop iteration would be to print a file content line by line just like it is done in bash shell, you can do that with a small loop like belows:


for iteration_variable in $(cat  file_with-your-loved-content-to-iterate.txt)
        print "Current iteration like is : $iteration_variable"


Share this on

How to configure Joystick ( Gamepad ) on Debian, Ubuntu, Mint GNU / Linux easily

November 2nd, 2017


"All work and no fun makes Jack a dull boy …."

If you own a PC joystick and you're a gamer who just migrated to GNU / Linux and you enter the wonderful world of Linux gaming (haha what wonderful world its nightmare :), perhaps you will want an easy way to make your Joystick work on GNU / Linux.

In this article I'll try my best to explain how you can relavitely easy make your Linux joystick (joy stick 🙂 ), bring you the happiness of playing old arcades in an old school joystick way.

1. Install necessery packages for joystick under Linux

gamelinux:~# apt-get install –yes joystick jstest-gtk joy2key gjoypad xserver-xorg-input-joystick \
xserver-xorg-input-joystick-dev kodi-peripherals

2. Test wherher joystick is properly detected by kernel


gamelinux:~# cat /dev/input/js0





If above cat command returns a bunch of weird signs in your terminal, that means the joystick was successfully detected and should be working.

3. Load Joystick necessery Linux modules if your Gamepad is not properly detected

Note that I assume you're super user most of below commands are preferrably to be run as root:

If you're Gamepad is not detected, you'll have to manually create /dev/input/js0

gamelinux:~# cd /dev/input
gamelinux;~# MAKEDEV js0

Further on you'll need to perhaps load at least the following 3 modules which gives support for a number of JoySticks / Gamepad devices

gamelinux:~# modprobe joydev
gamelinux:~# modprobe ns558
gamelinux:~# modprobe sidewinder
gamelinux:~# modprobe gameport

Just in case if you're planning to play old Arcade games I recommend you load also following bunch of modules:

gamelinux:~# modprobe snd-seq
gamelinux:~# modprobe 3c59x
gamelinux:~# modprobe snd-emu10k1
gamelinux:~# modprobe snd-pcm-oss
gamelinux:~# modprobe snd-mixer-oss
gamelinux:~# modprobe snd-seq-oss

If you get an error message and don't suceed to calibrate your gamepad, you need to look under to know the modules that fit your Joystick model.


For a MS Sidewinder gamepad

gamelinux:~# modprobe joydev
gamelinux:~# modprobe ns558
gamelinux:~# modprobe sidewinder
gamelinux:~# modprobe analog
## This one work only for analog pad, like joysticks

For a Logitech WingMan digital gamepad

gamelinux:~# modprobe joydev
gamelinux:~# modprobe ns558
gamelinux:~# modprobe adi
## Specific driver for Logitech gamepads

For a Logitech WingMan gamepad (analog)

gamelinux:~# modprobe joydev
gamelinux:~# modprobe ns558
gamelinux:~# modprobe analog
## Module for analog gamepads
gamelinux:~# modprobe pcigame
## Module for PCI card (??)
gamelinux:~# modprobe adi
## Module for Logitech pads

For a MS SideWinder ForceFeedBack Pro

gamelinux:~# modprobe joydev
gamelinux:~# modprobe ns558
gamelinux:~# modprobe analog
gamelinux:~# modprobe sidewinder
gamelinux:~# modprobe iforce
## Force Feedback driver
gamelinux:~# modprobe evdev


For a Guillemot dual analog gamepad (gameport, non-USB)

gamelinux:~# modprobe joydev
gamelinux:~# modprobe ns558
gamelinux:~# modprobe guillemot
gamelinux:~# modprobe analog
## to check
gamelinux:~# modprobe iforce
## to check

If auto-detect of joystick doesn't work (hopefully not your case)


gamelinux:~# modprobe usbhid
gamelinux:~# modprobe joydev


– Enable Joystick for KDE Users

Luckily though historically the kcontrol package was required but nowadays, KDE users could usually calibrate joystick via KDE K Control Centrer

To make joystick configuration permanent on Linux you need to add the modules that worked with your Joystick device to /etc/modules,

for eample I own


And my

/etc/modules file

looks like so:


gamelinux:~# cat /etc/modules

# /etc/modules: kernel modules to load at boot time.
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

In case of some problems with SoundCard conflicting joystick or the other way around you might also want to add into /etc/modprobe.d/options something similar to


gamelinux:~# vim /etc/modprobe.d/options

gamelinux:~# options snd_ens1371 joystick_port=1


4. Calibrate your joystick either using jstest / jscal commands or GNOME's jstest-gtk

To calibrate joystick in text mode use below commands


jscal /dev/input/js0
jstest /dev/input/js0

For the lazy ones you can calibrate your joystick via GNOME's graphical tool jstest-gtk



This article is just a basic explanation on how to make your joystick work, for thoroughful advanced explanation on JoySticks and Gamepads I recommend ArchLinux Wiki explanation on how to configure Gamepads

5. Create missing Symlinks from /dev/input/js0 to /dev/js0

I've personally experienced a problem with Xmame / Xmess (Multimedia Arcade Emulator) and other old arcade Virtual Machine Emulators that are supposed to recognize the joystick, but because it is common that the joystick is trying to be invoked via /dev/js0 /dev/js1 (depending on its model), but somehow this links are missing, thus I had to manually create the links with ln command, like so:

– For /dev/input/js0 to link /dev/js0


cd /dev; ln -sf /dev/input/js0;

– For /dev/input/js1 to link /dev/js1


cd /dev; ln -sf /dev/input/js1;


Share this on

How to enable Gravis UltraSound in DOSBox for enhanced music experience in DOS programs and Games

October 31st, 2017


Gravis UltraSound Classic


Gravis UltraSound

Gravis UltraSound or GUS is a sound card for the IBM PC compatible systems.
It was lunched in 1992 and is notable for it's ability to use real-world sound recordings (wavetable) of a musical instruments rather than artificial computer-generated waveforms.
As one of my friends used to say back then: "it sounds like a CD".

To enable GUS in DOSBox all you need to do is:

1. Download the archive with the GUS files from Extract the archive (there is already a directory in it so you don't have to create one) preferably where you keep your DOSBox stuff (like Games).

2. Find your DOSBox config file. Depending on the version or host OS, the dosbox conf file is located either inside the user profile folder or inside the same folder as dosbox.exe. In Windows 7 the config file is located at

"C:\Users\Fred\AppData\Local\VirtualStore\Program Files (x86)\dosbox.conf"

where "Fred" is your username.

In GNU/Linux it's in "/home/Fred/.dosbox/dosbox.conf" where "Fred" is your username.

The name of the conf file may also have dosbox version (for example –


Open it with a text editor like notepad (Windows) or equvalent for GNU/Linux (vi, Kate, gedit…). Locate "[gus]" section (without the quotes) and edit it so it looks like this:

#      gus: Enable the Gravis Ultrasound emulation.
#  gusrate: Sample rate of Ultrasound emulation.
#           Possible values: 44100, 48000, 32000, 22050, 16000, 11025, 8000, 49716.
#  gusbase: The IO base address of the Gravis Ultrasound.
#           Possible values: 240, 220, 260, 280, 2a0, 2c0, 2e0, 300.
#   gusirq: The IRQ number of the Gravis Ultrasound.
#           Possible values: 5, 3, 7, 9, 10, 11, 12.
#   gusdma: The DMA channel of the Gravis Ultrasound.
#           Possible values: 3, 0, 1, 5, 6, 7.
# ultradir: Path to Ultrasound directory. In this directory
#           there should be a MIDI directory that contains
#           the patch files for GUS playback. Patch sets used
#           with Timidity should work fine.


Then save the dosbox conf file.

3. Start DOSBox and mount "ULTRASND" directory to "C:".

You can do that with

mount c (directory to ULTRASND)

For example if you have extracted the archive in "C:\Games" it has created "C:\Games\ULTRASND" and the command you will have to write in DOSBox is

mount c c:\Games

(example: if your game is in "C:\Games\Heroes2" and your GUS directory is "C:\Games\ULTRSND" (if you have extracted the archive "C:\Games\") then you "mount c c:\Games" and you are set)

or for GNU/Linux if you have extracted the archive in "/home/Fred/Games" it has created "/home/Fred/Games/ULTRASND" and the command you will have to write in DOSBox is

mount c /home/Fred/Games (where "Fred" is your user name).

(example: if your game is in "/home/Fred/Games/Heroes2" and your GUS directory is "/home/Fred/Games/ULTRSND" (if you have extracted the archive" /home/Fred/Games/") in  then you "mount c /home/Fred/Games" and you are set)

You can make this automatic so you don't have to write it everytime by adding this command in the end (bottom) part of your dosbox conf file and save it.

You're practicly ready. All you need to do now is set Gravis UltraSound in your game or application setup (for example with the file "setup.exe") with IO: 240, IRQ 5 and DMA 3. If you prefer you previous sound card you can do that by selecting it again from the setup without disabling GUS from the dosbox conf file.

Happy listening!

Gravis Ultrasound


Article written by Alex

Share this on