Terminal PNG not found in gnuplot

In some linux destributions, the default version of gnuplot does not always include PNG support.

Here it the easiest way to fix this:

  1. Download gnuplot from https://sourceforge.net/projects/gnuplot/
  2. Untar to a directory of your choice
  3. Open terminal at that directory
  4. Run the following commands:
    1. sudo apt-get install libgd2-dev
    2. ./configure
    3. make
    4. make check
    5. sudo make install

That’s it.

You can find code examples for PNG terminal here:


You can read more gnuplot terminals here:


Configure Netbeans IDE for C/C++ (Windows)

Linux can compile C/C++ with Netbeans out of the box, as long as you have the compiler installed (like gcc and g++).

Usually the following commands are enough:

sudo apt-get install build-essential
sudo apt-get install valgrind

In Windows you have to do this manually:

  1. From https://sourceforge.net/projects/mingw/:
    1. Download mingw
    2. Install it to the suggested (default) directory. If you want to use a custom directory, make sure the selected path does not contain spaces or other special characters (like greek letters etc)
    3. From the Mingw Installation manager, click and install at least the following packages:
      1. mingw-developer-toolkit
      2. mingw32-base
      3. msys-base
      4. mingw32-gcc-g++
  2. Press winkey+pause to load Windows Settings Manager. At Advanced system settings →Advanced→environment variables:
    1. Add the following text at the end of the PATH environment variable (not user variable):
  1. At Netbeans→Tools→Plugins:
    1. check C/C++ feature and activate it
  2. Create a new C++ project and run it:
    1. From the “Resolve Missing native tools” just click “Restore defaults”. It should autodetect the settings. If it fails there is a sample configuration at the end of the post.
  3. Restart Netbeans
  4. Preferably, logout and login too.

If you have problem configuring Mingw, here is a sample of a handy configuration (mingw at default directory):


Install & Uninstall Java

Install Java

NOTE: if you want to develop to Android then:

  1. install an 64bit version
  2. install Oracle Java as shown below

You can use 32bit but it does not worth it.


If you want the default (OpenJava) then:

  1. sudo apt-get update
  2. sudo apt-get install default-jre
  3. sudo apt-get install default-jdk

Oracle Java

But preferably if you are going to develop in Java, install Sun version instead:

  1. sudo apt-get install python-software-properties
  2. sudo add-apt-repository ppa:webupd8team/java
  3. sudo apt-get update
  4. sudo apt-get install oracle-java7-installer            (or 8 etc)
  5. sudo update-alternatives –config java (to select default Java)

If you want to setup JAVA_HOME:

  1. sudo update-alternatives –config java
  2. From the menu above, write down the path of the version you want (eg /usr/lib/jvm/java-7-oracle)
  3. edit /etc/environment (vim, nano etc)
  4. add or update the line: JAVA_HOME=”YOUR_PATH”
  5. reload environment: source environment

Uninstall Java

If you want to completely uninstall java then:

  1. Remove packages:
dpkg-query -W -f='${binary:Package}\n' | grep -E -e '^(ia32-)?(sun|oracle)-java' -e '^openjdk-' -e '^icedtea' -e '^(default|gcj)-j(re|dk)' -e '^gcj-(.*)-j(re|dk)' -e '^java-common' | xargs sudo apt-get -y remove
sudo apt-get -y autoremove
  1. Purge config files:
dpkg -l | grep ^rc | awk '{print($2)}' | xargs sudo apt-get -y purge
  1. Remove Java config and cache directory:
sudo bash -c 'ls -d /home/*/.java' | xargs sudo rm -rf
  1. Remove manually installed JVMs:
sudo rm -rf /usr/lib/jvm/*
  1. Remove Java entries, if there is still any, from the alternatives:
for g in ControlPanel java java_vm javaws jcontrol jexec keytool mozilla-javaplugin.so orbd pack200 policytool rmid rmiregistry servertool tnameserv unpack200 appletviewer apt extcheck HtmlConverter idlj jar jarsigner javac javadoc javah javap jconsole jdb jhat jinfo jmap jps jrunscript jsadebugd jstack jstat jstatd native2ascii rmic schemagen serialver wsgen wsimport xjc xulrunner-1.9-javaplugin.so; do sudo update-alternatives --remove-all $g;
  1. Search for possible remaining Java directories:
sudo updatedb
sudo locate -b '\pack200'

And look for entries with jre or jdk and delete them

At the sidebar menu you can find links to scripts that do all those steps at once.






Can’t delete this file

If you can’t delete that file in windows, then:

  1. First, make sure you don’t have an app running right now that uses it (doh). Check network access too if you share it.
  2. Make sure you do have proper privileges to delete it
  3. Try unlocker to unlock and delete it
  4. Install cygwin and delete it with cygwin (really)
  5. Reboot to safe mode and delete it from there

The 4th option is the most rare and catchy, but it works very efficiently. You do have to use it if, for some reason, the filename of the file becomes corrupted.

Foobar vs Windows Media Player

When the context menu (right click) does not contain options of foobar (like “enqueue in foobar” or “play in foobar”):


In summary:

  1. Enable Foobar context menu via:
    1. Preferences → shell integration → enable “Folder context menus”:


  1. Prevent Windows player from suppressing other player’s options
    1. Control panel→default programs→Set program access and computer defaults → disable the “Enable access to this program”:


Personal portal to the Internet