Category Archives

356 Articles
Mengompilasi Sendiri MPlayer

Mengompilasi Sendiri MPlayer

Dari  perjalanan di Gentoo dan pengembangan sebuah aplikasi in-house, saya menemukan bahwa MPlayer lebih bagus kalau dikompilasi sendiri.

Saya asumsikan bahwa Anda telah memasang MPlayer. Kita tinggal menimpa yang lama dengan yang baru. Memang, cara ini tidak disarankan dan lebih baik apa bila dibuatkan paketnya dengan menggunakan checkinstall. Apabila Anda seorang purist, silakan pasang: (bagi yang malas, silakan lewati)

$ sudo apt-get install checkinstall

Setelah itu, pasang saja semua kebutuhan MPlayer: (Peringatan: banyak paket terpasang!)

$ sudo apt-get build-dep mplayer

Setelah itu, unduh dari http://mplayerhq.hu kode sumber terbaru. Saya mengunduh snapshot hari ini dan mengekstrasinya:

$ tar xvfj ~/Unduhan/Mplayer/mplayer-checkout-snapshot.tar.bz2

$ cd mplayer-checkout-2010-07-20

MPlayer secara unik mendeteksi prosesor yang kita pakai. Kita harus memastikan variabel CFLAGS dan sejenisnya tidak termuat agar skrip konfigurasi dapat menentukan dengan benar konfigurasi untuk kompilasi MPlayer. Cukup jalankan:

$ ./configure --prefix=/usr

Saya sedikit curang dan mengganti konfigurasi pada berkas config.mak pada baris yang mengandung CFLAGS, CXXFLAGS, dan DEPFLAGS (sekitar baris 30 s.d. 32). Saya mengganti setiap yang mengandung 

"-mcpu=native -mtune=native"
menjadi "
-mcpu=core2 -mtune=native -msse4.1
". Maklum, saya takut nanti MPlayer tidak teroptimasi untuk SSE 4.1.

Pasang ke sistem:

$ sudo make install

atau 

$ sudo checkinstall

Nikmati berkurangnya pemakaian CPU! Untuk pengguna laptop yang memiliki

vdpau
sangat diuntungkan dengan kompilasi sendiri.

Perjalanan Saujana dalam Gentoo

Perjalanan Saujana dalam Gentoo

Setelah ditinggal pergi Sabtu-Minggu, akhirnya Gentoo 64bit telah selesai memasang KDE4.4. Perjalanan terganggu ketika saya gagal masuk ke dalam sistem. Setelah berguru kepada Mbah Gugel dan bersemedi berjam-jam, akhirnya saya putuskan bahwa masalahnya ada pada perangkat keras, Acer Aspire. Sebelum Anda menuduh Acer jelek, saya perlu kemukakan bahwa komputer yang saya gunakan adalah sebuah PC bermerek yang sudah dimodifikasi. Saya hapus instalasi Windows Vista Premium (asli, karena bermerk). Omong-omong, bisakah di Indonesia kita minta refund untuk sistem operasi mahal itu?

Saya memasang sendiri 2 GB memori (bakunya 1 GB). Lalu, saya memasang kartu pengendali SCSI. Nah, ternyata, kartu pengendali inilah yang menyebabkan komputer ini gagal memuat Gentoo yang terpasang pada SATA. Anehnya, BIOS hanya mengenali SCSI saja. Akhirnya demi Gentoo, saya mencopot SCSI saya. Sebuah keputusan berat, namun cukup berarti. Akhirnya saya bisa memuat Gentoo. Mungkin saya perlu menambal BIOS dengan firmware yang baru. Beberapa modifikasi saya buat pada berkas

/etc/make.conf
untuk dapat mengompilasi secara optimal.

# Konfigurasi kompilasi

Saya mengubah kompilasi saya dengan menambahkan perintah sebagai berikut:

CFLAGS="-O2 -pipe -march=core2 -mtune=native -msse4.1"

Sebenarnya bisa saja ditambahkan "

-fomit-frame-pointer
" untuk membuang simbol-simbol debug. Tapi, saya rasa ini cukup aman untuk konfigurasi saya (CPU Core2 Duo E7400)

# Pemasangan Sun JDK

Pemasangan SUN Oracle JDK cukup rumit. Ternyata, kita harus menambah variabel berikut pada berkas

/etc/make.conf
atau pada berkas
/etc/portage/package.license
, yaitu:

 

ACCEPT_LICENSE="dlj-1.1"

Jika ada lisensi lain yang diperlukan dapat ditambahkan dengan pemisahan menggunakan spasi. Setelah ada dibuat seperti demikian, kita baru bisa memasang dengan normal paket
sun-jdk
.
 
Saya mengunduh driver NVIDIA Beta dari situs NVIDIA. Lalu, saya mengunduh driver Omnikey 5321 dari situsnya (wow, mereka menatar driver Linux). KDE 4 berjalan stabil, bagus, dan responsif. Masih banyak kilikan lainnya yang saya belum paparkan, tetapi rasanya itu perlu di episode selanjutnya. 😀
OSS4 Moving To Sourceforge

OSS4 Moving To Sourceforge

OSS4 is moving its code to Sourceforge. They still use mercurial. To obtain the code in new place:

$ hg clone http://opensound.hg.sourceforge.net/hgweb/opensound

Further reading:

Building OSSv4 from source – Open Sound System

Basic use of the build system is close to autoconf-based build system (“configure && make && make install”), with one very important difference: The OSS build system must use separate build and source directories (unlike GNU autoconf where both are mixed), so a command like “./configure” will NOT work.

Creating Your Own Booth in GNU/Linux Ubuntu Lucid (nodm)

Creating Your Own Booth in GNU/Linux Ubuntu Lucid (nodm)

It’s been a while since I blogged since its a busy day nowadays. Anyway, here it goes.With the usage of

upstart

, many SYS V style ways becoming obsolete. One of the prominent thing is the lost of

/etc/inittab.

Usually, when we created a standalone booth, we would embedded our setup using that; we put our script into it. If we are using X, one of the alternative is to use GDM. For the low cost solution often this solution is cumbersome. After some digging, I’ve found another neat solution: using nodm.

To install nodm:

$ sudo apt-get install nodm

To enable nodm:

$ sudo $EDITOR /etc/default/nodm

[Note: Change $EDITOR to whatever your text editor]

Change

NODM_ENABLED

value into true:

NODM_ENABLED=true

Usually, standalone booth run as root user because of the nature of its purpose: single user experience. However, you can make a user and set the user to be able to access the X.  We can set a non-root user by editing

NODM_USER

value  into:

NODM_USER=$USER

[NOTE: Change $[crayon inline=”true” ]USER[/crayon] with whatever user you have setup before]

By default nodm uses XSession, so here some tips regarding XSession:

  1. To run scripts/applications that need to be executed with root privilege, put the script into
    /etc/X11/Xsession.d
    directory.
  2. To run scripts/applications that runs with normal user, put the script into
    ~$USER/.xsession

[NOTE: ~$USER means the home directory of the chosen user.]

Please bear in mind, both are incompatible. If you put .xsession, XSession will use it instead scripts in Xsession.d directory. With some scripts, we can achieve both; the script left as an excercise to the reader. 😛 (Or may be later, remind me to do so)

Bye for now.

Nigerian Scam versi Indonesia

Nigerian Scam versi Indonesia

Nigerian Scam adalah sebuah penipuan di Internet dengan modus operandi sebagai berikut: Seorang kaya mau mentransfer dana dari bank antah berantah karena dia baru saja mewarisi harta dan kesulitan mendapatkannya. Contoh Nigerian Scam versi Indonesia:

Saya Citra Ria dari Indonesia . Saya telah

menikah dengan Bapak Edmond Wilson, seorang

Insinyur dari Inggris. Kami resmi menikah

pada tanggal 10 Oktober 2001. Pada saat itu

dia sedang bekerja sebagai karyawan kontrak

di SUBSEA,sebuah perusahaan yang bergerak di

bidang pengeboran dan saluran pipa minyak,

gas dan bahan bakar, berbasis di Singapura.

Kontrak kerjanya berakhir pada tahun 2004.

Kami lalu pindah di negara asalnya Inggris

bersama dengan anak perempuan kami.Pada tanggal 26 April 2008, kami sekeluarga

sedang dalam perjalanan pulang dari pantai.

Mobil kami mengalami ban pecah lalu menabrak

sebuah tiang listrik. Setir mobil masuk

menembus dan melukai dada suami saya. Dia

meninggal dunia dalam perjalanan ke Rumah

Sakit. Tuhan masih melindungi saya & anak

perempuan saya.

Setelah suami saya dimakamkan pada tanggal 10

Juli 2008, keluarganya datang menuntut

properti suami saya. Mereka semua mengklaim

bahwa saya tidak menikah dengan Bapak Edwond

Wilson secara resmi. Saya harus menyerahkan

semua rumah dan properti kepada mereka

termasuk akses ke semua rekening bank kami

dan beliau. Sejak bulan Agustus 2008, kami

mengadu ke pengadilan untuk menyelesaikan

masalah ini bersama pengacara suami saya.

Tapi sejak itu pula tidak ada satu pun yang

didapat.

Suami saya memiliki sejumlah uang sebesar  US

$6,000,000,00. yang disimpan untuk investasi

dalam sebuah rekening di  Portman Securities

beralamatkan di 46 Yeading Fork Hayes,

Middlesex , UB4 9DQ , UK . Sampai saat ini

tidak ada satu pun anggota keluarganya yang

mengetahui keberadaan rekening ini. Hanya

saya & pangacara kami yang mengetahui tentang

sejumlah uang pada rekening almarhum suami

saya ini.

Saya memutuskan untuk menyerahkan semua rumah

dan  property kepada keluarga suami saya dan

mengambil uang di rekening ini untuk  kembali

ke Negara saya Indonesia bersama anak

perempuan saya untuk memulai hidup baru. Dari

hasil penelitian saya terhadap uang pada

rekening suami saya, ternyata BELUM

ditunjukkan ahli waris. Inilah yang menjadi

alasan saya untuk mencari orang yang dapat

dipercaya agar membantu kami sebagai ahli

waris almarhum suami saya Bapak Edmond

Wilson. Anda akan mendapatkan uang tersebut

untuk ditransfer ke rekening bank anda.

Transaksi ini 100% LEGAL & TIDAK BERESIKO.

Saya  akan memberikan Anda semua informasi

penting yang diperlukan untuk mengklaim uang

ini. Saya yakin kalau Anda tidak akan

mengecewakan saya sekarang ataupun di masa

yang akan datang.

SAYA MENGHUBUNGI ANDA  KARENA YAKIN ANDA

TIDAK AKAN SEKALIPUN MENGECEWAKAN SAYA DENGAN

MENGAMBIL SEMUA UANG TERSEBUT UNTUK REKENING

ANDA SAJA. SAYA AKAN MEMBERIKAN SEMUA

INFORMASI YANG DIPERLUKAN UNTUK MENGKLAIM

UANG INI. TOLONG JAGA INI SEBAGAI KEPERCAYAAN

YANG SAYA BERIKAN KEPADA ANDA.

Saya menunggu respon POSITIF anda SECEPATNYA

ke email PRIBADI saya berikut:

citraira@windowslive.com. Ataupun silahkan

Anda menghubungi saya di cellphone saya:

+447045725313. Saya hanya dapat menjawab

telepon pribadi di atas jam 6 sore waktu

London disebabkan karena kesibukan saya di

kantor saya bekerja.

Salam Hangat,

Citra Ria.
Deleting A Resource From JENA

Deleting A Resource From JENA

According to [JENA], JENA is a Java framework for building Semantic Web Applications. It’s a wonderful thing to build ontology. I’ll blog about it later. 😀

The problem with JENA is, there is no obvious way to delete a Resource from a Model. Fortunately, I’ve found the way from [LB] that we must:

  1. Deleting ALL properties in that particular Resource.
  2. Deleting ALL statements that contains this Resource.

Let the code speaks for itself:

public static void removeResource (

String Uri, Model model) {

        Resource r = model.getResource(Uri);

        if (p != null) {

                p.removeProperties();

                dataModel.removeAll(null, null, p);

        }

}

Referensi:

[JENA] http://jena.sourceforge.net/ [LB] Lost Boy. http://www.ldodds.com/blog/2003/01/rdf-graphs-xpath-and-the-jena-api/

Kebebasan dalam Berekspresi (Dengan FOSS)

Kebebasan dalam Berekspresi (Dengan FOSS)

Kebetulan ada sebuah permintaan dari rekan saya untuk mengganti salah satu tema di Blog Staff. Menurut dia, itu merupakan permintaan dari salah satu penulis blog favorit saya. Saya pun mencoba mencarinya tema baru di Internet dan menemukan tema-tema untuk majalah. Salah satu fitur dari situs majalah (yang benar dan umumnya bukan di Indonesia) adalah menampilkan berita-berita unggulan di laman depan.

Nah, biasanya mereka menggunakan teknik slide show dan disertai oleh ilustrasi. Saya butuh menggambar ilustrasi. Pertama-tama saya mengambil inkscape:

$ sudo apt-get install inkscape

Tetapi, saya menemukan bahwa saya tidak bisa memakai inkscape seperti niwat0ri. Akhirnya saya memutuskan untuk mencari perkakas yang cocok untuk menggambar:

$ apt-cache search draw

Ada banyak perkakas dengan ideologinya sendiri tentang cara menggambar, misalnya tkpaint yang menggambar vektor dengan pengrupan. Selain itu, ada tuxpaint dan gpaint yang seperti mspaint. Tapi, saya membutuhkan sebuah penggambar raster. Sampai akhirnya saya menemukan mypaint. Menurut [APT], mypaint adalah:

Paint program to be used with Wacom tablets This is a pressure sensitive Wacom tablet paint program. It comes with a large brush collection including charcoal and ink to emulate real media, but the highly configurable brush engine allows you to experiment with your own brushes and with not-quite-natural painting.

Menurut [REMPT], mypaint dapat dipakai bersama-sama dengan Krita, sebuah aplikasi penggambar vektor di KDE SC, karena menggunakan format OpenRaster. Wow, vektor + gambar bebas = KEREN! Omong-omong, berikut fasilitas dari MyPaint:

  • Mesin kuas yang bebas dan memiliki algoritma prediksi. Hal ini mengakibatkan dinamika penggambaran seperti aslinya.
  • Penggambaran berlapis memudahkan kita untuk menggambar sketsa pada lapis dasar dan memisahkan antara garis dan tombol.
  • Integrasi dengan kanvas elektronik (tablet paint), membuat kita bisa berekspresi pada media komputer dengan baik.

Seperti eksplorasi Blender saya dahulu (yang sayangnya sudah hilang akibat Geocities sudah tutup), saya membuat contoh hasil dari perkakas ini. Ini semua saya buat di waktu senggang makan siang dengan menggunakan  tetikus. Mungkin kalau dengan kanvas elektronik bisa lebih ekspresif lagi. Maaf pakai bahasa Inggris.

Dreaming Girl

Dreaming Girl

A picture of an open interpretation. Is it a girl dreaming or a dream of a girl? I love ambiguity.

Just To Make Unhappy Face

Just to make unhappy face

The semantic of science according to a child born in these age of insanity.

Just To Make An Instant Noodle

Factory for Instant Thing

For every convenient thing on your house, there are inconvenient truth about it: underpaid labors, wretched environment, and that funky smoke that will haunt generations to come. Here’s for your instant noodle BEER.

The Most Terrifying

The Most Terrifying

The most terrifying in the history of mankind.

Referensi:

[APT] Jalankan  “apt-cache show mypaint” pada Ubuntu 10.04

[REMPT] Boudewijn Rempt. MyPaint. http://www.valdyas.org/fading/index.cgi/2009/10/01 (diakses 20 Mei 2010)

Sound For The Audiophile

Sound For The Audiophile

In my previous post, I’m talking of juicing your sound to the last bit of it using Audacious. Well, it turns out the Last.FM plugin is not working. So, I’m trying to do alternatives. It turns out that the alternatives are fun. I can play with them and find a suitable configuration.

I’ve find a suitable solution: OSS4 + Jack (Jackd + Jack Rack) + GStreamer + Bluemindo. They satisfied my need. You may be think that those are overkill. Well, I have tried PulseAudio + Jack + ALSA  stack and found glitches when there are two sound sources (media player + system sound). Too bad, otherwise I would not install OSS4.

This is the screenshot of  my JACK using Sennheiser PX100

Jack Rack

JACK

PatchBayConnection Kit

Getting Back Audioscrobbler (Last.FM) on Audacious 2.3

Getting Back Audioscrobbler (Last.FM) on Audacious 2.3

Audacious is the most XMMS-like player. Meaning, it supports what XMMS 10+ years ago capable of: visualization and sound enhancements. Those are what modern GNU/Linux music player lack of.

Unfortunately, Audacious 2.3 dropped support for Last.FM and in these few days I have none scrobbled to my account. From digging the site, I have found the solution, which require to compile [LFM] or just download [UBF]. I prefer to compile. Last, this is not my original work and the original poster (togdon)  is the most credited. This post is for archiving.

Compile method

$ sudo apt-get build-dep  audacious-plugins

$ sudo aptitude install libcurl4-dev

$ wget <a href="http://distfiles.atheme.org/audacious-plugins-2.2.tgz" rel="nofollow">http://distfiles.atheme.org/audacious-plugins-2.2.tgz</a>

$ tar -zxvf audacious-plugins-2.2.tgz

$ cd audacious-plugins-2.2

$ ./configure --enable-dependency-tracking  --disable-esd  --disable-pulse   --disable-coreaudio  --disable-icecast  --disable-dockalbumart   --disable-altivec  --disable-sse2  --disable-mp3  --disable-libmadtest   --disable-rocklight  --disable-lirc  --disable-evdevplug   --disable-hotkey  --disable-gnomeshortcuts  --disable-statusicon   --disable-aosd  --disable-aosd-xcomp  --disable-adplug  --disable-vorbis   --disable-flacng  --disable-libFLACtest  --disable-wavpack   --disable-aac  --disable-sndfile  --disable-modplug  --disable-ffaudio   --disable-jack  --disable-sid  --disable-oss  --disable-oss4   --disable-alsa  --disable-amidiplug  --disable-amidiplug-alsa   --disable-amidiplug-flsyn  --disable-amidiplug-dummy  --disable-cdaudio   --disable-streambrowser  --enable-scrobbler  --enable-lastfm   --disable-neon  --disable-mms  --disable-mtp_up  --disable-bluetooth   --disable-paranormal  --disable-xspf  --disable-xmltest  --disable-cue   --disable-projectm  --disable-projectm-1.0  --disable-filewriter   --disable-filewriter_mp3  --disable-filewriter_vorbis   --disable-filewriter_flac  --disable-bs2b

$ cd src/scrobbler/

$ make

$ sudo make install

$ cd ../lastfm/

$ make

$ sudo make install

Well, it surely stable enough for me.

Not compiling

Just go to [UBF]  and read it. Basically, it suggests to download the binaries.

Reference:

[LFM]  Togdon. http://www.last.fm/group/Audacious/forum/36299/_/618007

[UBF]  http://ubuntuforums.org/showthread.php?p=9255642

CSS Zen Towards Enlightenment: The Beginning and Block Position

CSS Zen Towards Enlightenment: The Beginning and Block Position

How could a smart card, C/C++, BASH, and Java developer like me ended up using CSS? At this new age, many technologies incorporating their framework with web technologies. One cool thing is taking web rendering into applications. So, for the sake of better application, we could make the layout painless using CSS. Oh, btw, to know CSS doesn’t mean must one must surge into PHP. 😀

I’m using BASH style scripting for variable, e.g. $VAR_NAME. Please replace the $VAR_NAME with suitable number.

For some experience, I’m using CSS to make the content widgetized. In order to have better alignment, I’m using

z-index

property for each of my content. Well, later if you need one.

Vertical Alignment

To play with vertical alignment, we just play with “top” position, “bottom” position, and “margin-top”.

Top

The CSS code:

position: absolute;
top: 0px;

Centering

The CSS code:

position: absolute;
top: 50%;
margin-top: -${$HEIGHT/2};
height: $HEIGHT;

Here’s the example:

position: absolute;
top: 50%;
margin-top: -128px;
height: 256px;

Bottom

The CSS code:

position: absolute;
bottom: 0px;

Horizontal

It share a common idea with vertical alignment.

position: absolute, left: $POS,  margin-left: -${$POS/2}.
DVD Just Fine

DVD Just Fine

I can watch my original DVD “U2” “go Home” using libdvdread4. The package have a script that would instal libdvdcss2 into the system. To have it:

$ sudo apt-get install libdvdread4
$ sudo /usr/share/doc/libdvdread4/install-css.sh

And it would download all of the non-free debs. I hate it when I am using non-free blobs, but what I hate the most is I can’t play my own ORIGINAL DVD. Gah! Hail to the greed of liberalism!

Anyway, it seems that the DVD aged, so I guess now I need to create a backup copy. K3B rocks! It reads scramble DVD just fine. 😀

Another story with my Lucid, I just find out that Twitter revamped their site. I know this is outdated info, but since I am busy I haven’t realized it. I’m using Choqok to see all the post.

It seems that Choqok doesn’t have any capability for seeing friend request. I must go to the site to do the job. Anyway, google-chrome failed at accepting friends. It always failed when I pressed the “Accept” button. Fortunately, my Konqueror can do the job. Yay! All hail to the almighty ancient browser. 😀

Oh, btw, I’m using Kubuntu.

Sony Ericsson W508 + OpenOffice Presenter + KDE 4.4.x

Sony Ericsson W508 + OpenOffice Presenter + KDE 4.4.x

Sony Ericsson W508 + OpenOffice Presenter + KDE 4.4.x = GG!

For non (Warcraft) gamer, it means:

Sony Ericsson W508 + OpenOffice Presenter + KDE 4.4.x = World Domination!

I’ve just found out that SE W508 Presenter is supported by KBluetooth. It means, I can make it as my controller for screen projection. All of controller were detected.

How to do it?

Just set your phone to be discoverable and set your laptop as discoverable as well. Connect them, and let them trust each other (you know the drill, put PIN). I’m sorry for the no screenshots. I have no camera, but the phone itself.

Hardware involved:

  • Lenovo Y41
  • Sony Ericsson W508

Software used:

  • Kubuntu Lucid
  • OpenOffice 3.2 (from Kubuntu)
  • KBluetooth
  • KDE 4.4.x (from Kubuntu)

Feel free to comment. If you have an urge in needing of screenshot, I shall reconsider to put them later. But, in the meantime I am really busy.

Playing With Your GRUB (Debian Way)

Playing With Your GRUB (Debian Way)

There are times when you want to do funky things to your computer. Sometimes, it messed up your zen. Well, when that happens, just do the Debian way. Oh, btw, it also means you could do it in Ubuntu.

1 Regenerate your settings

$ sudo update-grub

2 Reinstall GRUB on MBR

$ sudo dpkg-reconfigure grub-pc

ADVANCE:

2a Adding kernel options to GRUB

$ sudo $EDITOR /etc/default/grub

Change $EDITOR with your favourite editor. Modify the file to suit you then do the #1. Some configuration already asked when you do #2.

Feel free to comment and ask.

Configuring Basic Network (2 of 2)

Configuring Basic Network (2 of 2)

Now, you could pinged the network router, yet, you couldn’t access

google.com
. It’s because the way internet runs is by using IP, not names. So, when you type google.com, actually your system is trying to translate it into IP.

There are two ways of setting it.

#1 Using

/etc/hosts

This is an ARPANET legacy and still holds true. Although nowadays we are using DNS, but this file still can be used to point in some site. This is what it looks like:

127.0.0.1 localhost rajagukguk-laptop

It binds IP 127.0.0.1 to localhost and rajagukguk-laptop. So, when you type localhost, you would be directed into 127.0.0.1

#2 Using DNS

There are ways to set DNS, but the default standard is using

/etc/resolv.conf
. Here’s my
/etc/resolv.conf
:

nameserver 152.118.24.2
search ui.ac.id

The first line is the DNS server that we would be using to query IP. The second line is about our home network name. So, when we type http://www/ the address will be rewritten as http://www.ui.ac.id/, or if we enter “webmail”, then it would be rewritten as webmail.ui.ac.id. Neat, eh?

Now, here’s some bonuses tips.

1 If you are a web developer

When we entered an address, the system will looked into /etc/hosts first then your DNS. So, you could set your own version of something.com before you published it with real IP. For example, smartcard.ui.ac.id is situated on 152.118.24.116. But, we are going to pimp that one out. Instead of pimp it online and pissed people, I could set another box in 192.168.1.68 and then set my development PC to point into that address. So, in order to do that, I add my web development PC’s /etc/hosts as following line:

192.168.1.68 smartcard.ui.ac.id smartcard

So, everytime I access http://smartcard.ui.ac.id/ from my browser in that computer, it would go into 192.168.1.68 instead of the real one.

2 You are an anti-ad

WARNING: I don’t recommend this, because ad is something that some people lived from. But, sometimes a site is awfully slow because of these ad sites keeps pushing bad javascript.

[Gah! This is left as an excercise for the reader. HINT: Point them to localhost]

Configuring Basic Network (1 of 2)

Configuring Basic Network (1 of 2)

There are several reasons why this basic skill is important:

  • Your network is failing because of your experimentation.
  • You want to be an l33t and impress your GF.
  • You are stranded on an Debian/Ubuntu server.

To configure a basic networking, usually we use “

/etc/network/interfaces

“. Every network interface (e.g. ethernet card) can be brought up and down by using command

   $ sudo ifup eth0
   $ sudo ifdown eth0

Change eth0 with any network device you like. To see available network interface, type this:

$ sudo ifconfig -a

Currently, these way of action is being deprecated in favor of

network-manager

. But, these commands still can be run and overriding

network-manager

.

One more powerful command is to use

ifconfig

directly. The principal is easy, set the network card’s IP and then set the default gateway

1 Set the network card default IP

$ sudo ifconfig eth0 192.168.0.3 netmask 255.255.255.0

2 Set the default gateway

$ sudo route add default gw 192.168.0.1

That’s it.

Lucid From Debootstrap

Lucid From Debootstrap

What scenarios does this would likely involved you in? Well, for instance:

  • Creating an Ubuntu system on your USB stick because your lack of faith to trust all of your system to GNU/Linux.
  • Creating new system from your Ubuntu stick because you have become the enlightened.
  • Creating a customized *buntu flavour because you have become one.
  • Killing time because you have insomnia. 😀

Most likely I’m in reason #4. This scenario is tested on GNU/Linux Debian and Ubuntu. I played with Unstable/Experimental and Lucid.

#0 Backup your data on USB stick.

Don’t tell me that I didn’t warn you! 😀

#1 Set the partition

Stick your USB and seek what is the node file it representated.

$ dmesg | tail

Now, it would come up something like

 /dev/sdb1

or

/dev/sdc1

depending how funky your system is.

#2 Format the USB stick

$ sudo mkfs.reiserfs /dev/sdb1 -l "KEREN DEH"

I’m used to label the filesystem. This label is important that you may prevent from accidentally formatting that particular partition. (Been there, done that) Oh, before the holy war begin, let me warn you that my flavour on ReiserFS is subjective, stick with whatever your fave filesystem. Here the change: EXT3: mkfs.ext3, XFS: mkfs.xfs, JFS: mkfs.jfs

#3 Mount the filesystem

$ sudo mount /dev/sdb1 /mnt

#4 Debootstraping begins

$ sudo debootstrap lucid /mnt http://kambing.ui.ac.id/ubuntu/

The “

--arch amd64

” before “lucid” parameter is optional. It would come in handy if you are trying to make 64bit Ubuntu from 32bit system, vice versa. See the manpage for more information.

#5 Setup before chrooted to there

Mount all the important directory.

$ sudo mount /proc /mnt/proc -t proc

$ sudo mount /dev /mnt/dev -o bind

Optionally copy these files:

$ sudo cp /etc/hosts /mnt/etc

$ sudo cp /etc/resolv.conf

resolv.conf

is deprecated on desktop because of the

modem-manager

being. But, it won’t hurt you if you still use it.

$ sudo cp /etc/fstab /mnt/etc

Don’t forget to edit the /mnt/etc/fstab and delete the root directory entry (find “/” and delete it) because we are using USB stick.

#6 Chrooted there

$ sudo chroot /mnt

#7 Add a user

This is important! Don’t let your system userless…

# adduser user

Make him/her an admin.

# addgroup user sudo

By default Lucid is making everybody in the sudo group to be an admin. If you are using another, you could add yourself a group:

# addgroup penguasa

echo “%penguasa ALL=(ALL):ALL” >> /etc/sudoers

(Or just type

visudo

to edit the file properly)

#8 Install kernel

There are few flavours of the kernel. Desktop user usually stick with generic.

# apt-get install linux-image-generic

This virtual package will install

linux-image-generic-2.6.32-13

in time this writing. If you want, you could search for another linux kernel with

# apt-cache search linux image

#9 Install grub

# apt-get install grub2

Usually, it would let you choose where it would like to install. Install it into USB stick’s Master Boot Record/MBR (/dev/sdb). If later you would like to install it, the sane way to install is:

# dpkg-reconfigure grub-pc

Or, if you’re the rock star:

# grub-install /dev/sdb

To have GRUB reconfigured, i.e. generates the GRUB menu, do:

# update-grub

#10 Install your flavour

# apt-get install kubuntu-desktop

#11 Get some sleep!

It’s already morning and you have a life? No? Well, you could go on and try your new system by restart to the system.

~hiddenCurcolCrouchingDeadline

Java Could Not Connect To Host

Java Could Not Connect To Host

If you are experiencing:

Caused by: java.net.SocketException: Network is unreachable 

This is most likely because of the Debian bug to force all system using IPv6. According to the reference, you should do:

$ sudo sed -i ‘s/net.ipv6.bindv6only\ =\ 1/net.ipv6.bindv6only\ =\ 0/’ \ /etc/sysctl.d/bindv6only.conf && sudo invoke-rc.d procps restart

REFERENCE: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560044