April 26, 2015

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

Actually, there's a package in AUR (https://aur.archlinux.org/packages/atom-editor/) 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: https://launchpad.net/~webupd8team/+archive/ubuntu/atom/+packages. 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: http://www.miketaylor.org.uk/tech/deb/deb2targz. 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.


Posting Komentar