Showing posts with label technology. Show all posts
Showing posts with label technology. Show all posts

Wednesday, January 18, 2017

Wireshark - The capture could not be initiated (You don't have permissiont o capture on that device).


It seems Wireshark installer fails to set up permissions.

To fix it, run this manually:-

chgrp access_bpf /dev/bpf*
chmod g+rw /dev/bpf*

Make sure the user is in the "access_bpf" group.

Refs
https://josephhall.org/nqb2/index.php/wrshrkinstll
http://apple.stackexchange.com/questions/138694/what-is-access-bpf-group

Monday, February 1, 2016

Have fun with cross platform mobile development

A short presentation about a sample cross platform mobile project called TumChatter for both Android and iOS.





You can find the project on github at the link below:-
https://github.com/have-fun/TumChatter

Programming Language: Kotlin
Frameworks: Java, RoboVM
Dependency Injection: Dagger 2
Json: Gson
REST Client: Retrofit
Reactive Libraries: RxKotlin, RxJava
Unit Testing: Spek (Specification Framework), AssertJ, Mockito
Embedded Server: TumWeb, Nanohttpd
Android UI Binding: KotterKnife, ButterKnife


Monday, November 25, 2013

Start/Stop PostgreSQL on Mac

Start PostgreSQL:-
sudo -u postgres /Library/PostgreSQL/9.3/bin/pg_ctl -D /Library/PostgreSQL/9.3/data start
Stop PostgreSQL:-
sudo -u postgres /Library/PostgreSQL/9.3/bin/pg_ctl -D /Library/PostgreSQL/9.3/data stop
Stop PostgreSQL from auto-starting on reboot:-
sudo launchctl unload -w /Library/LaunchDaemons/com.edb.launchd.postgresql-9.3.plist 
Make PostgreSQL auto-start on reboot:-
sudo launchctl load -w /Library/LaunchDaemons/com.edb.launchd.postgresql-9.3.plist 
Refs
http://www.xtuple.org/faq/xtuple-faq/postgresql/how-do-i-stop-postgresql-service-mac 
https://gist.github.com/abhishekdev/1960888

Friday, June 15, 2012

Running Tomboy Note-Taking App on Mac


When running Tomboy 1.10.2 on Mac OS X Lion with Mono 2.10.9 installed, I got this error:-
Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for IgeMacIntegration.IgeMacDock ---> System.EntryPointNotFoundException: ige_mac_dock_get_type
I found that the ige-mac-integration-sharp.dll library used by Tomboy is not compatible with libigemacintegration.dylib in Mono 2.10.9 (some external functions don't exist any more). I'm new to Mono and this library and I just wanted to get Tomboy to run on Mac and also wanted to keep the latest version of Mono so I did a dirty fix by doing the following:-

  • Build Tomboy.
git clone git://git.gnome.org/tomboy
xbuild Tomboy-mac.sln
./bundle-mac-app.sh
  • Copy libigemacintegration.0.0.0.dylib from Mono 2.6.x to Tomboy.app/Contents/MacOS and rename it to libigemacintegration.dylib

  • Transfer all notes from my Ubuntu machine to Mac.
cp /Volumes/tom-ubuntu/.local/share/tomboy/*.note /Users/tomtanti/Library/Application Support/Tomboy/
  • Run Tomboy for testing.
open Tomboy.app
  • Move Tomboy.app to Applications so that I can simply run it from there in the future.
Refs

Monday, February 6, 2012

Firefox 10 keeps crashing

After upgrading to Firefox 10, the new version kept crashing every time I opened it. Running it in safe mode (firefox -safe-mode) didn't help.



I ended up creating a new profile to fix this problem using the following command and switch:-
firefox -P
All plugins were gone and needed reinstalling. I could get some data back though from the old profile folder in
/home/tom/.mozilla/firefox/xxxx.default
Refs
http://ubuntuforums.org/showthread.php?p=11595179


Friday, January 13, 2012

Make Eclipse look better on Ubuntu

  • Compact the look and fix unreadable selected entry in content assist in some themes (e.g. Ambience) by creating a new text file called "gtkrc" (a stylesheet file for GTK apps) with the following content:- 
gtk-color-scheme = "selected_text_color:#000000"
style "compact"
{
  GtkButton::default_border={0,0,0,0}
  GtkButton::default_outside_border={0,0,0,0}
  GtkButtonBox::child_min_width=0
  GtkButtonBox::child_min_heigth=0
  GtkButtonBox::child_internal_pad_x=0
  GtkButtonBox::child_internal_pad_y=0
  GtkMenu::vertical-padding=1
  GtkMenuBar::internal_padding=1
  GtkMenuItem::horizontal_padding=4
  GtkToolbar::internal-padding=1
  GtkToolbar::space-size=1
  GtkOptionMenu::indicator_size=0
  GtkOptionMenu::indicator_spacing=0
  GtkPaned::handle_size=4
  GtkRange::trough_border=0
  GtkRange::stepper_spacing=0
  GtkScale::value_spacing=0
  GtkScrolledWindow::scrollbar_spacing=0
  GtkExpander::expander_size=10
  GtkExpander::expander_spacing=0
  GtkTreeView::vertical-separator=0
  GtkTreeView::horizontal-separator=0
  GtkTreeView::expander-size=12
  GtkTreeView::fixed-height-mode=TRUE
  GtkWidget::focus_padding=0

  font_name="Liberation Sans,Sans Regular 8"
  text[SELECTED] = @selected_text_color
}
class "GtkWidget" style "compact"
style "compact2"
{
  xthickness=1
  ythickness=1
}
class "GtkButton" style "compact2"
class "GtkToolbar" style "compact2"
class "GtkPaned" style "compact2" 
  • To use the above stylesheet with Eclipse (my version is Indigo - 3.7.1), run Eclipse like this:-
GTK2_RC_FILES=$GTK2_RC_FILES:/somewhere_1/gtkrc /somewhere_2/eclipse
  • Make tooltip readable by using #000000 as its foreground colour (tooltip_fg_color) and #f5f5b5 as background (tooltip_bg_color) in the following files:- 
/usr/share/themes/<your-current-theme>/gtk-3.0/settings.ini
/usr/share/themes/<your-current-theme>/gtk-3.0/gtk.css
/usr/share/themes/<your-current-theme>/gtk-2.0/gtkrc
  • Install Eclipse theme colour plugin and may want to try my TumCode theme which keeps the number of colours to the minimum.
     
  • Replace the default "Monospace" font with "Liberation Mono" and optionally reduce the font size to 8 or 9.
Windows -> Preferences -> General -> Appearance -> Colors and Fonts
(for Java Editor Text Font, Javadoc display font, Properties File Editor Text Font, etc.)

Here is how it looks after the above changes:-

Refs
http://blog.xam.dk/?p=70 
http://askubuntu.com/questions/70599/how-to-change-tooltip-background-color-in-unity
http://blog.valotas.com/2010/02/eclipse-on-linux-make-it-look-good.html

Friday, December 16, 2011

An error occurred while dispatching a duplicated socket: this handle is now leaked in the process

The error kept coming up in the System event logs on Microsoft Windows Small Business Server (SBS) 2011.

To fix this, change maxPendingAccepts from 2 to 10 in SMSvcHost.exe.config

<net.tcp maxPendingAccepts="10" ... >

Refs
http://blogs.msdn.com/b/andreal/archive/2009/04/05/net-tcp-ip-port-sharing.aspx

Monday, December 12, 2011

VirtualBox: Failed to access the USB subsystem

To fix this error, just add the user name to the "vboxusers" group but the User Accounts manager in Ubuntu 11.10 is quite terrible, too simple to be useful so use a command line to do this instead:-
sudo usermod -a -G vboxusers <user-name>
The other option is to install and run the old Accounts manager.
sudo apt-get install gnome-system-tools
users-admin
Refs
http://www.liberiangeek.net/2011/10/add-users-to-existing-groups-in-ubuntu-11-10-oneiric-ocelot-2/
http://linux-software-news-tutorials.blogspot.com/2011/11/restore-old-account-manager-in-ubuntu.html

Friday, December 9, 2011

Unable to locate theme engine in module_path: "pixmap"

I got the following warning when running the update-java tool.
(gksudo:5045): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap"
To fix it, run
sudo apt-get install gtk2-engines-pixbuf
Refs
https://bugs.launchpad.net/ubuntu/+source/quickly/+bug/853232

Wednesday, November 30, 2011

No sound after upgrading to 64-bit Ubuntu 11.10

After upgrading from 32-bit Ubuntu 11.10 to the 64-bit version, the sound system stopped working.

To fix this issue, I ran
rm -rvf ~/.pulse/ 
Interestingly, it worked straight away without re-login.

Refs
http://ubuntuforums.org/showthread.php?t=1845555

Thursday, November 10, 2011

Evoluation failed to append to mbox

After upgrading Evolution to version 3.2.0, I kept getting this message after sending an email from any of my mail accounts:-
The reported error was "Failed to append to mbox:///home/tom/.local/share/evolution/mail/local#Sent: Invalid folder URI 'mbox:///home/tom/.local/share/evolution/mail/local#Sent' Appending to local 'Sent' folder instead.". 
I fixed it by going to
Edit menu -> Preferences -> Mail Accounts 
-> Select a mail account -> Edit -> Defaults -> Revert
Refs
http://ubuntuforums.org/showthread.php?t=1839990

Monday, October 24, 2011

nautilus-gksu: "Open as administrator" not showing in Ubuntu 11.10

To get nautilus-gksu to work again, run

sudo cp /usr/lib/nautilus/extensions-2.0/libnautilus-gksu.so /usr/lib/nautilus/extensions-3.0/

Refs
https://bugs.launchpad.net/ubuntu/+source/gksu/+bug/817383

Friday, October 21, 2011

Disable overlay scrollbars in Ubuntu Unity

Finally I gave up on using the overlay scrollbars in Unity. It gave a bit of more screen real-estate but it was less practical (almost a pain) to use on my desktop computer compared with the classic scrollbars. The overlay scrollbars may still be good for devices with smaller screen sizes.

To disable this feature, run
sudo su
echo "export LIBOVERLAY_SCROLLBAR=0" > /etc/X11/Xsession.d/80overlayscrollbars
Then restart the machine. Don't know whether just re-login will also work or not.

Update: Just re-login is enough. I tried that on Ubuntu 11.10.

Refs
http://www.flynsarmy.com/2011/04/why-i-hate-unity/

Saturday, October 15, 2011

Get TimeCult running on Linux

TimeCult is a simple but powerful task management and time tracking application. A hierarchy of projects, activities and tasks can be created and displayed in a tree view.



To get it running on Linux,

java -jar timecult.jar
Refs
http://sourceforge.net/projects/timecult/reviews

Monday, October 10, 2011

Add taskbar in Ubuntu (Unity)

Panel tint2 is an awesome customisable taskbar that has excellent dual monitor support. It also has system tray (notification area).

To install,run
sudo apt-get install tint2 


To customise tint2, run
tint2conf

Refs
http://www.liberiangeek.net/2011/10/add-taskbar-in-ubuntu-11-0411-10-with-panel-tint2/

Saturday, October 8, 2011

Unity Launcher and QuickList Editor

Install Bazaar Version Control System.
sudo apt-get install bzr
Download the Unity Launcher Editor code from Launchpad.
bzr branch lp:unity-launcher-editor
Run the editor.
./unity-launcher-editor/ule




Refs
http://www.ultimateeditionoz.com/forum/viewtopic.php?f=23&t=2671
https://launchpad.net/unity-launcher-editor

Saturday, September 24, 2011

Synchronising Folder Problem in Evolution Mail

My Evolution Mail kept synchronising one of the existing folders whenever I clicked on it or read any of the emails inside the folder.


Forcing Evolution to re-index its mailbox file by deleting the associated files with the extensions ".index", and "cmeta" in "~/.local/share/evolution/mail/local/Inbox.sbd" didn't help. The size of the mailfox file for that folder was surprisingly 4GB. Not sure this is the cause of the problem though.

To fix this, I

  • Created a new folder in Evolution.

  • Moved all emails from the folder that had the problem to the new folder. Be patient as this took ages. Evolution was synchronising the folder repeatedly for hours while moving the emails. After it finished, the mailbox file size of the new folder was just a bit over 200 MB.

  • Closed Evolution and deleted the bad folder by removing all of its associated files (mailbox, cmeta, index, and data files) in "~/.local/share/evolution/mail/local/Inbox.sbd" because trying to delete it in Evolution gave this error:-




Refs
http://ubuntuforums.org/showthread.php?t=974536

Sunday, September 4, 2011

Search for File Contents in Nautilus

Create a script file (text file) called "Find" in "~/.gnome2/nautilus-scripts" and allow it to be executable. Add the commands below in the script file:- 

#!/bin/bash
gnome-search-tool --hidden --path="$*" --contains= 

From its command help:-
--hidden               Select the "Show hidden and backup files" search option
--path=PATH            Set the text of "Look in folder" search option
--contains=STRING      Select and set the "Contains the text" search option

To search for files using this script in Nautilus,
Right click a folder -> Scripts -> Find

Refs
http://forums.linuxmint.com/viewtopic.php?f=42&t=25114

Friday, August 5, 2011

Allow apps to display tray icons in Unity

Only whitelisted apps are allowed to show tray icons in Unity. By default, the apps in the whitelist on my PC are JavaEmbeddedFrame, Mumble, Wine, Skype, hp-systray, and scp-dbus-service.

To show the current whitelisted programs, run
gsettings get com.canonical.Unity.Panel systray-whitelist
To add a new program; for example, Tasque, to the current whitelist, run
gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Mumble', 'Wine', 'Skype', 'hp-systray', 'scp-dbus-service', 'Tasque']"
Alternatively, we can do this through a GUI using a tool called "dconf-editor". It's part of the "dconf-tools" package. In dconf-editor, go to
desktop -> unity -> panel
and select "systray-whitelist" on the right panel.


After change, strangely doing a relogin didn't seem to take this into effect for me. I had to reboot the PC. I didn't try just killing X Window though.

Refs
http://www.omgubuntu.co.uk/2011/03/how-to-hide-or-show-app-tray-applets-in-ubuntu-11-04/
http://ubuntu.sun.ac.za/wiki/index.php/Show_tray_icons_in_unity

Thursday, August 4, 2011

vReplicator fails with the message: - " 'Consolidate Helper' snapshot found"

VMWare ESX/ESXi creates a temporary snapshot called "Consolidated Helper" during the snapshot deletion/consolidation. It should be deleted automatically but if it's left behind (possibly due to performance issue or insufficient disk space), vReplicator will fail. To fix this, make sure there's enough free space and then just remove this snapshot manually through Snapshot Manager. After it reaches 95%, be patient as it may take a very long time depending on the virtual disk size to commit the snapshot. If it still fails, try creating a new snapshot and then select "Delete All".

Refs:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003302
http://communities.vmware.com/thread/274077
http://communities.vmware.com/thread/121642