Wednesday, June 10, 2015

i3: Launch Android Studio on specific workspace

i3 supports launching specific applications on specific workspace. The problem with Android Studio is that it displays a splash screen and loads the full program, matching applications by title doesn't work in this case.

However, WM_CLASS comes to rescue. Android Studio's WM_CLASS is set to "jetbrains-studio" and we can match that. (This was gathered using xprop.)

Just add the following lines to the end of i3 config file at ~/.i3/config

assign [class="jetbrains-studio"]  2

This makes Android Studio launch by default on Workspace "2".

Tested for : Android Studio 1.2

Sunday, June 7, 2015

Install Debian with Network Install ISO and Grub

What if you want to test an ISO without asking your VPS Provider to put the ISO in their control panel? This is one of the case where directly booting off an ISO image is a better option.

So, let's assume we want to install Debian 8 (amd64) from network. First the server(or perhaps desktop) should have any kind of Linux preinstalled. I am assuming you have a flavor of Linux that is powered by "apt".

Step 1: Install Grub and grub-imageboot

Grub supports booting from ISO images. And, grub-rescueboot makes life easier. Issue the following commands as root:
# apt-get install grub2 grub-imageboot
This will create a new folder on /boot/images where you can put any ISO files and it will be on the meny entry of Grub.

Step 2: Download ISO Image

URL in command below points to minimal CD image (around ~21MB) that can be used to boot latest Debian installer.

# mkdir /boot/images
# wget -P /boot/images http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/mini.iso

This will download the ISO to /boot/images .

Step 3: Update Grub entry

# update-grub

Step 4: Restart

Now, restart your server and select the Grub entry. If you are doing this on a remote server or VPS, use VNC, it's available in most of the control panels.

grml-rescueboot is an alternative similar to grub-imageboot but it didn't work for me.