Desember 04, 2015

Swift in Arch Linux

Following its open source release, Swift can be downloaded at I am lucky enough to see that there is Linux version available for download. The binary version was developed in Ubuntu, so I tried to grab the binary release and then have them installed to no luck. It was some problems with some libraries: libpanel (from ncurses5), and libicuuc. Being a bleeding edge distro does mean that I may not be able to run binary files from older libs in my Arch box. That was the case with Swift, it was compiled under Ubuntuwith older libs.

Here's what I did to make Swift able to run without recompiling in Arch Linux:
  1. Whenever Swift complain about no libs available, go to and then find one. Here's an example: Get the rpm, rpmfile, the put all of the files inside, let's say $HOME/lib/swift
  2. Exception for libedit, just make a symlink from /usr/lib/ to (this should be done inside $HOME/lib/swift.
  3. Create a file, mine is $HOME/env/swift:
export PATH=$PATH:/opt/software/swift/bin
 That's all. Now, just "source ~/env/swift" to use Swift.

Mei 03, 2015

ArangoDB for Arch Linux - Binary Version Without Manual Compilation (AUR)

I was once the maintainer of ArangoDB package in AUR. While the package was fine (I think), I am quite tired of having it compiled myself. It's just I am getting older, I guess. Then I prefer binary version after leaving maintainer role. Now I can use it using RPM file of OpenSuSE Factory version - available from ArangoDB download page. Some tweaks are needed anyway. I will give you some tweaks that I successfully use to make it works. In this post, I put all of installation files under /home/bpdp/software/arangodb (a.k.a $ARANGO_HOME).

  • Install rpmextract package: # pacman -S rpmextract
  • Extract RPM file: $ path/to/arangodb-2.5.3-12.1.i586.rpm
  • Move conf files into etc: $ mv etc/arangodb/*.conf etc/
  • Delete init.d dir (we don't need that): $ rm -rf etc/int.d
  • All database will reside in db, so: $ mkdir db
  • Here's the dir structure:

$ ls
total 48
drwxr-xr-x  9 bpdp bpdp  4096 May  4 10:31 .
drwxr-xr-x 91 bpdp bpdp  4096 May  4 10:16 ..
drwxr-xr-x  2 bpdp bpdp  4096 May  4 10:12 bin
drwxr-xr-x  2 bpdp bpdp  4096 May  4 10:19 db
drwxr-xr-x  2 bpdp bpdp  4096 May  4 10:30 etc
drwxr-xr-x  4 bpdp bpdp  4096 May  4 10:12 lib
drwxr-xr-x  2 bpdp bpdp  4096 May  4 10:12 sbin
drwxr-xr-x  5 bpdp bpdp  4096 May  4 10:12 share
drwxr-xr-x  4 bpdp bpdp  4096 May  4 10:12 var

  • Create all needed dirs: cluster and mri (ruby): $ mkdir -p share/arangodb/mr/client/modules; mkdir -p shar/arangodb/mr/common/modules.
  • $ mkdir -p var/log/arangodb/cluster; mkdir -p lib/arangodb/cluster
  • Edit etc/*.conf to reflect all of those dir location.
  • Delete unneeded dirs/files: $ rm -rf lib/systemd/; rm -rf etc/init.d/; rm -rf sbin/rcarango.
  • Set PATH and MANPATH. You may put this inside $HOME/.bashrc:

export ARANGO_HOME=$HOME/software/arangodb
Installation finish. You should source .bashrc or open another terminal and then you may active the server daemon and / or arango shell:

  • Activate arango daemon: $ arangod -c ~/software/arangodb/etc/arangod.conf
  • Enter arango shell: $ arangosh -c ~/software/arangodb/etc/arangosh.conf
That's all I guess, you may now use ArangoDB. 

Uf wiederluege! Na shledanou! Auf Wiedersehen! Bye Bye! Adiau! ¡Hasta luego! Au revoir!
Arrivederci! להתראות! Tot ziens! Adjö! Εις το επανιδείν! さようなら До свидания!

April 26, 2015

Atom for 32bit Arch Linux (or other Linux 32bit distros)

Actually, there's a package in AUR ( but I am too lazy to compile it myself, so here it goes.

Atom is available in binary releases for 64bit only for Linux. Luckily, WebUpd8 team provides binary packages for 64bit and 32bit Ubuntu. Get the package here: For this article, I downloaded 32bit binary for Vivid. We will convert this file using deb2targz utility. You should get it first. If you are in Arch Linux, get from AUR (yaourt -S deb2targz), if you are not from Arch fame (:p) get it here: The .deb file that was just downloaded:

-rw-r-----   1 bpdp bpdp 49547144 Apr 26 17:16 atom_0.194.0-1-webupd8-1_i386.deb

Put it somewhere wherever you like. Once you get deb2targz working, follow these steps:
  1. Convert .deb to tar.xz: $ deb2targz atom_0.194.0-1-webupd8-1_i386.deb
  2. Extract .xz file: $ tar -zvf atom_0.194.0-1-webupd8-1_i386.tar.xz. You will have two dirs: usr and opt. In opt dir, extract file atom/atom-linux32.tar.xz: $  tar -xvf atom-linux32.tar.xz.
  3. Put those two dirs inside whatever dir you like, mine is /home/bpdp/software/atom. We call this $ATOM_DIR (not necessarily exist, just for this article only).
  4. This .deb package search atom binary at /tmp/atom-build/atom, which is surely doesn't exist. To make it works, we should edit usr/bin/atom file. Find the line which says [ -x "$ATOM_PATH" ] || ATOM_PATH="/tmp/atom-build/atom" and change it to [ -x "$ATOM_PATH" ] || ATOM_PATH="/home/bpdp/software/atom/opt/atom/atom" (well of course you should put your own location of atom binary (mine is /home/bpdp/software/atom/opt/atom/atom).
  5. Now you should be able to run atom from $ATOM_DIR/usr/bin: $ ./atom. If you want, you may also put that dir in your PATH env variable: export PATH=$PATH:/home/bpdp/software/atom/usr/bin inside $HOME/.bashrc.

Setting Printer Network HP LaserJet P2035n di Arch Linux

Install paket: hplip dan cups

Aktifkan CUPS dengan menjalankan daemon:

# cupsd

Install driver HP. Siapkan file ppd (hp-laserjet_p2035n-hpijs-pcl3.ppd), diperoleh di /usr/share/ppd/HP/hp-laserjet_p2035n-hpijs-pcl3.ppd.gz. Ekstrak file tersebut di suatu lokasi, setting permission access ke user. Untuk kasus ini, saya meletakkan file tersebut di /home/bpdp/ppd/hp-laserjet_p2035n-hpijs-pcl3.ppd. Ikuti langkah2 berikut:

[root@bpdp-arch ~]# hp-setup -i
HP Linux Imaging and Printing System (ver. 3.15.2)
Printer/Fax Setup Utility ver. 9.0
Copyright (c) 2001-15 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.
(Note: Defaults for each question are maked with a '*'. Press to accept the default.)
  Num       Connection  Description                                              
  --------  ----------  ----------------------------------------------------------
  0*        usb         Universal Serial Bus (USB)                              
  1         net         Network/Ethernet/Wireless (direct connection or JetDirect)
  2         par         Parallel Port (LPT:)                                    
Enter number 0...2 for connection type (q=quit, enter=usb*) ? 1
Using connection type: net
Using device: hp:/net/HP_LaserJet_P2035n?ip=
Setting up device: hp:/net/HP_LaserJet_P2035n?ip=

Please enter a name for this print queue (m=use model name:'HP_LaserJet_P2035n'*, q=quit) ?
Using queue name: HP_LaserJet_P2035n
Locating PPD file... Please wait.
error: No PPD found for model laserjet_p2035n using old algorithm.
error: Unable to find an appropriate PPD file.
Would you like to specify the path to the correct PPD file to use (y=yes, n=no*, q=quit) ? /home/bpdp/ppd/hp-laserjet_p2035n-hpijs-pcl3.ppd
error: Please press or enter 'y', 'n', or 'q'.
Would you like to specify the path to the correct PPD file to use (y=yes, n=no*, q=quit) ? y
Please enter the full filesystem path to the PPD file to use (q=quit) :/home/bpdp/ppd/hp-laserjet_p2035n-hpijs-pcl3.ppd
Description for the file: HP LaserJet p2035n hpijs pcl3, 3.15.2, requires proprietary plugin
Use this file (y=yes*, n=no, q=quit) ? y
Enter a location description for this printer (q=quit) ?Ruang SI Jaringan
Enter additonal information or notes for this printer (q=quit) ?
Adding print queue to CUPS:
Device URI: hp:/net/HP_LaserJet_P2035n?ip=
Queue name: HP_LaserJet_P2035n
PPD file: /home/bpdp/ppd/hp-laserjet_p2035n-hpijs-pcl3.ppd
Location: Ruang SI Jaringan

Would you like to print a test page (y=yes*, n=no, q=quit) ? n
[root@bpdp-arch ~]#

Setelah itu, setiap kali print, akan muncul printer tersebut. Enjoy!