Skip to main content

Posts

Showing posts from 2009

Installing wine on Ubuntu 9.10 from source

I just upgraded my ubuntu 9.04 to ubuntu 9.10. Before recompiling wine, we needed to install all the dependencies. I grabbed the newest dependencies installation script from http://winezeug.googlecode.com/svn/trunk/install-wine-deps.sh However, when I ran it, it stopped with an error: Reading package lists... Done Building dependency tree Reading state information... Done Package libcupsys2-dev is a virtual package provided by: libcups2-dev 1.4.1-5ubuntu2.1 You should explicitly select one to install. E: Package libcupsys2-dev has no installation candidate From the error message, the solution is clear, edit the script and replace libcupsys2-dev with libcups2-dev ... and we can enjoy the wine again now

Ubuntu 9.10 hamachi problem

I just installed Ubuntu 9.10 on a fresh new computer for a client. For this particular computer I install hamachi. Unfortunately, when run it only displayed 'Killed' in console and then a crash report notification appeared on the notification panel. After some googling, it turned that this new ubuntu doesn't like UPX packed application and unfortunately hamachi for linux (version hamachi-lnx-0.9.9.9-20) is one of it. The solution is: Install upx uncompressor: $sudo apt-get install upx-ucl Unpack hamachi (assuming hamachi is installed in /usr/bin): $ sudo upx -d hamachi After that, hamachi ran fine. This solution is also applied for other UPX packed applications. Hopefully, Ubuntu fixes this upx packed application problem which will be the best solution.

Cara mendownload video youtube yang tidak dapat didownload....

Video-video di youtube.com tidak dapat didownload secara langsung, tetapi ada beberapa situs-situs dan program-program utility termasuk addon Mozila firefox dan Widget dari Opera yang memungkinkan kita mendownload video dari youtube. Namun beberapa video tidak dapat didownload dengan program-program khusus di atas. Kelihatannya youtube melakukan proteksi sehingga beberapa video hanya dapat dimainkan tetapi tidak dapat didownload. Sebagai contoh: http://www.youtube.com/watch?v=_fgURJZebqc Lalu bagaimana cara kita mendownload video-video yang tidak dapat didownload tersebut? Apapun proteksi yang dilakukan youtube, sebenarnya komputer kita telah mendownload file video tersebut. Kalau tidak, bagaimana browser kita bisa memainkan video tsb? Jadi kuncinya adalah bagaimana menemukan file yang telah didownload oleh browser kita tsb. Ikuti langkah-langkah ini. File-file video dari youtube adalah dalam format file .flv, maka pertama-tama kita harus mempunyai player dari file flv. Silahkan search

Problem installing MySQL 5.1.37 on Windows

Last night, I decided to upgrade my MySQL from version 4.1 to version 5 on my Windows XP box. I went to mysql's download area and downloaded the latest windows MSI installer version 5.1.37. After finished downloading the huge 91MB file, I backed up my MySQL database with mysqldump, uninstalled the old version 4.1 and began installed the new version, unfortunately the installation always failed with this message: MySQL Server 5.1 Setup Wizard ended prematurely The wizard was interrupted before MySQL Server 5.1. could be completely installed. Your system has not been modified. To complete installation at another time, please run setup again. Again, the old uncle google came to help. This is MySQL's bug, didn't they test it before releasing the new version? Google pointed me to a solution : you need to download and install orca, a tool for editing MSI files, which can be downloaded from here . Open the MySQL msi installation file, find and delete the action row SetDateTime an

Gnome Network Manager dispatcher.d scripts doesn't run

I just set up a new linux box of Ubuntu 9.04. This computer will connect to netware servers, so I installed ipx. However, with this particular version of Ubuntu, the ipx won't start at boot time eventhough it has starting script in the /etc/init.d which is correctly linked to startup directories (/etc/rc2.d, /etc/rc3.d, etc). I guessed the reason is Gnome Network Manager, somehow it prevented ipx to be started. I then wrote a script in /etc/NetworkManager/dispatcher.d, I gave it a name: 02ipx.sh, so it will executed after the built in /etc/NetworkManager/01ifupdown, the content is very simple #!/bin/bash if [ "$1" == "eth0" ] && [ $2 == "up" ] then /etc/init.d/ipx restart fi I assign root as the owner of script and set the permission to 775. Unfortunately, this script was never called!! After spent 5 hours pulling my hairs, uncle Google came to help with this page It turns that Network Manager is very picky with the script permission and owner

Ubuntu shutdown problem, acpid: exiting...

Some times ago, I uninstalled gnome network-manager on my Ubuntu 9.04 dan replaced it with WICD because it won't bring up ipx protocol on boot time. Unfortunately, WICD also has its own problem, it can't bring up your wired and wireless interface simultaneously. Tonight, I decided to replace WICD with gnome network-manager and I planned to fix the ipx problem through its dispatcher scripts feature. Surprisingly, right after the network manager installed there is no problem with the ipx protocol, apparently the package network-manager in ubuntu repository has been updated recently. However, when I shutdown or restarted my computer, it always hang with a blank screen displaying the message: acpid:exiting , the only way to completely shut down my laptop is only by pressing the power button for about 3 seconds. After some googling, it turns that the problem was the network interfaces should be brought down before taking down the computer. Here is the solution: Edit as root the file

Yahoo messenger problem on Linux

Recently, I can't connect to yahoo messenger through Pidgin on my Ubuntu 9.04 box. After some googling I found this page: http://news.softpedia.com/news/How-to-Fix-Yahoo-problem-in-Pidgin-114754.shtml Unfortunately, after following the steps I still can't connect to yahoo with error message: unknown "error 1013. Logging into the Yahoo! website may fix this". Logging to yahoo website as suggested doesn't cure the problem :( After some more googling, I found this page: http://developer.pidgin.im/ticket/9467. Removing the @yahoo.com part of your pidgen account solves the problem.

Menjalankan e-spt di linux.

Dirjen pajak belakangan ini mensosialisasikan e-spt yaitu program aplikasi komputer yang dipergunakan untuk pelaporan pajak (spt). Namun salah satu kendala besar bagi perusahaan-perusahaan menggunakan linux adalah bahwa program-program e-spt ini didesign hanya untuk komputer-komputer dengan O/S windows. Apakah kita harus mengorbankan sebuah komputer khusus plus o/s Windows hanya khusus untuk aplikasi e-spt ini? Untungnya, jawabannya adalah tidak, Wine (http://www.winehq.org) adalah sahabat anda. Bagaimana langkah-langkahnya? Install wine. Install komponen-komponen windows dengan bantuan winetricks Download dan install program e-spt Set format tanggal Wine sesuai dengan format tanggal Indonesia Detail langkah-langkah di atas adalah sbb: Install wine. Secara garis besar ada 2 cara untuk menginstall Wine: Install package binary Install dari source Cara paling mudah dan cepat adalah dengan menginstall package binary. Namun, metode ini mempunyai beberapa kelemahan: Package yang terinstall s

download ibpp and its documentation

Okay, I think it's time to try make a real database application using C++ and WxWidget. The tools needed which I already have so far: C++: it is a native language with linux. Almost every linux distribution have it, and if you don't have it and you're using ubuntu, just install package base-essential with synaptic or apt-get. WxWidgets: the main library which supposed to make our life easier. Code::Blocks: the IDE Firebird database server. We still need client library for accessing the database server. WxWidgets has database access functions using ODBC. But, I don't like ODBC, I prefer to have client library which access the database natively. After some google research, ibpp seems the best c++ firebird client library. I downloaded the library from http://www.ibpp.org/. But, a library is no use at all without documentation and it's very unfortunate ibpp only provides online documentation. As we live in Indonesia we certainly need an offline documentation so we can w

Program timbangan elektronik, sebuah program Windows yang dijalankan di Linux.

Kemarin, mumpung hari libur aku setup program timbangan digital baru di kantor. Program yang lama merupakan program DOS yang aku tulis dengan menggunakan Clipper, program ini berjalan dengan baik di linux dengan bantuan dosemu. Program baru merupakan program Windows. Salah satu improvement dalam program ini adalah support untuk beberapa jenis indikator. Program diinstall di linux dengan wine versi 1.1.20. Beberapa catatan dalam instalasi program ini di wine: Pencetakan slip bukti timbangan dan laporan-2 menggunakan printer Dot Matrix. Apabila pencetakan dilakukan lewat printer driver, pencetakan dengan printer dot matrix akan menjadi sangat lambat plus hasil buruk plus boros pita... :) Oleh karena itu, program ini melakukan pencetakan langsung melalui printer port lpt1. Di windows, hal ini tidak menjadi suatu permasalahan, di linux dengan wine, maka lpt1 akan dimap ke /dev/lp0. Masalahnya, owner dari device ini adalah root dan group lp. Secara default user-user di Ubuntu (..nggak tahu

Installing code::block

Now, I begin to understand the mechanism of wxWidget. Time to look for a good IDE. After some googling session, I decide to install code::block. At first, I downloaded the source code. However, I failed to build it myself and found it is too complicated to rectify the problem. So, I downloaded the *.deb package and installed it: $wget -c http://transact.dl.sourceforge.net/sourceforge/codeblocks/codeblocks_8.02-0ubuntu1.deb.tar.gz $tar -xf codeblocks_8.02-0ubuntu1.deb.tar.gz #sudo dpkg -i *.deb Surprisingly, right after the package installed synaptic update manager shouted that an upgraded package is available from repository .... :) If only I knew from the beginning I will install from the repository instead...:)

wxWidgets: Adding menu and status bar

Steps to add menu: Define IDs for our menu items enum { ID_QUIT, ID_ABOUT, ID_POPUP }; Create instances of wxMenu inside the constructor of the main windows wxMenu *MenuFile = new wxMenu; MenuFile->Append( ID_ABOUT , _T("&About")); MenuFile->Append( ID_QUIT , _T("&Quit")); wxMenu *MenuData = new wxMenu; MenuData->Append( ID_POPUP , _T( "Another &Form")); Create an instance of wxMenuBar wxMenuBar *MenuBar = new wxMenuBar; Add our instances of wxMenus to the menubar MenuBar->Append( MenuFile , _T("&File") ); MenuBar->Append( MenuData , _T("&Data") ); Assign the menubar to the main windows this->SetMenuBar( MenuBar); Declare event function in our main windows class declaration class MainWindow: public wxFrame { public: MainWindow(const wxString& title , const wxPoint& pos , const wxSize& size ); void MenuClickQuit( wxCommandEvent&

wxWidgets:Hello empty world!

Basic skeleton learnt: Have to declare an application class derived from wxApp Have to override virtual function OnInit of this class Have to declare a main window class derived from wxFrame (windows is called frame in wxWidgets) in OnInit of our application class, we should create (define) an instance of the main window class defined in step 3. Set this frame (window) as the top window with method SetTopWindow Don't forget to set its visibility to True with show method To make the main() entry point, use macro: IMPLEMENT_APP( OurAppClass) which translated to complicated statement but then last with: int main( int argc , char ** argv ) { return ( wxEntry( argc , argv) ) }; Bulletes which bit me: The method name should be OnInit() but I wrote onInit() and nothing comes up to the screen. It took 1 hour to figure out what's going wrong. At least I now know wxWidget naming convention is EveryFirstWordShouldBeCapitalized() Compiling: g++ hello.cpp `wx-config --libs` `wx-config --cx

Installing on Ubuntu 8.10

WxWidgets is available from ubuntu standard repository, but it often lacks several version. Fortunately, the developer of wxwidget provides ubuntu repository: Add this lines to /etc/var/sources.list: deb http://apt.wxwidgets.org/ intrepid-wx main deb-src http://apt.wxwidgets.org/ intrepid-wx main (note replace intrepid with your ubuntu distribution) and then import security key: #curl http://apt.wxwidgets.org/key.asc #curl http://apt.wxwidgets.org/key.asc | sudo apt-key add - if you don't have curl, you can install it first: #apt-get install curl After that, update the repository: #sudo apt-get update And then install wxwidgets from synaptic. Here are the packages I installed: wx2.8-il18n wx2.8-doc wx2.8-headers wx2.8-examples libwxgtk2.8-0 wx-common libwxgtk2.8-dev wxformbuilder libwxbase2.8-0 libwxbase2.8-dev After installing the packages, the documentation is the most important. The html reference is located in: /usr/share/doc/wx2.8-doc/wx-manual.html/index.html I opened the fil

Preface

Welcome to my personal blog! Hi, this is my personal blogs for various topics: programming, daily things, thoughts, etc. Comments are appreciated here and be prepared to see mixed languages here.