Mastodon

Adding lamp to kde menu

If you have installed xampp / lampp in linux then you must have observed that there is no launcher shortcut created under kde menu.  You need to launch it manually from command line.  To create a launcher shortcut, here is the procedure.

  1. Right click on kde launcher icon and select “Edit Application”
  2. In the left pane, select one of the category under which you wish to add the shortcut.  for example: Development
  3. Create a new item by selecting “New Item”
  4. In the right page, enter following details:
    • Name: lamp
    • Description: Linux Apache MySQL Php framework
    • Command: /opt/lampp/manager-linux-x64.run
    • Under advanced tab:
      • Run as different user: root
  5. Press ‘Save’ and you are done.

Now you will find the lampp shortcut under kde menu -> Developmenet -> lampp.

Eclipse crash in KDE 4.11

For those who have experienced Eclipse crashing with error “C [libgobject-2.0.so.0+0x19528] g_object_get_qdata+0x18” in KDE specially with version 13, here is a quick solution.

1) Open System Settings
2) Select Application Appearance
3) Select GTK
4) Change the GTK2 theme to anything but oxygen-gtk
5) Start eclipse and perform the required operation which caused the crash
6) Close eclipse
7) Revert settings back to use oxygen-gtk for GTK2 apps

The crash was observed specially when trying to close the find/replace window in eclipse.

Happy coding!!!

Multi line pattern match with fail2ban

I run my own asterisk server where it is well protected against external attacks using iptables + fail2ban.  I thought it was secure enough until I came across attacks which my current fail2ban configuration failed to detect.  In investigation tells me that fail2ban cannot do multi line pattern match and because the attacker’s IP was not logged in the same line where the attack statement was mentioned, fail2ban did not work.

The only solution I could find / think of is to write my own script which will write these multiple lines into one single line.  Assuming you will hit this bottleneck of fail2ban sooner or later, I have uploaded the script which I wrote to github and available for free download.

Feel free to use the script.  I welcome your comments / suggestions.

Building own executable in Android

 

Required tools

 Download and install Sourcery G++ Lite Edition for ARM
 Pull the android libs for dynamic linking using the script [ PullAndroidSysLibs.bat ]
 Download the build script and copy in your working folder [build_nd_push.bat]
 Download the assembly [crt.S] file for startup code and copy in your working folder.  Article from [ 1 ]

Continue reading Building own executable in Android