Güngör Budak's Blog

Bioinformatics, web programming, coding in general

Install Steam on Ubuntu 12.04

Download steam_latest.deb at:


Double click and open it on Ubuntu Software Center and click Install

It’ll start Terminal and ask password for sudo because there are some packages required, enter your password and continue

Next it’ll update itself



Enable Hibernation for Lenovo Z500 on Ubuntu 12.04

Using Terminal add this file:

sudo gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla


[Re-enable hibernate by default]

Save & reboot


Install Spotify on Ubuntu 12.04

Start Software Sources from Dash Home

Add following in Other Sources tab:

deb http://repository.spotify.com stable non-free

Close Software Sources

Add Spotify repo key on Terminal:

sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 94558F59

Install Spotify on Terminal:

sudo apt-get update && sudo apt-get install spotify-client

Find Spotify in Dash Home


Enable Software Sources in Dash Home Ubuntu 12.04

First copy the software sources desktop file to your local applications folder:

mkdir -p ~/.local/share/applications
cp /usr/share/applications/software-properties-gtk.desktop ~/.local/share/applications/

Edit the file & change the line NoDisplay=true to NoDisplay=false:

gedit ~/.local/share/applications/software-properties-gtk.desktop

Save, logout and login


Save Brightness Settings Ubuntu 12.04 LTS

If your laptop starts with minimized or maximized brightness and you want to have a fixed default value for that do following:

Run terminal and type to get maximum brightness:

cat /sys/class/backlight/acpi_video0/max_brightness

Now set the brightness as you want and run following which give you the value for current setting:

cat /sys/class/backlight/acpi_video0/brightness

Edit /etc/rc.local to have that value as default after each reboot / start:

sudo gedit /etc/rc.local

Add this line before exit 0:

echo YOUR_VALUE > /sys/class/backlight/acpi_video0/brightness

Save /etc/rc.local

Now, the problem should be solved


session_start() Permission denied (13) Laravel 4

Solve it by running following lines:

chmod -R 755 /path/to/your/laravel/directory
chmod -R o+w /path/to/your/laravel/directory

And/or maybe:

sudo chown -R www-data:user /path/to/your/laravel/directory

Install Ensembl API and BioPerl 1.2.3 on Your System

I’m going to work on a project that requires lots of queries on Ensembl databases so I wanted to install Ensembl API to begin with. Since it’s programmed in Perl, I will be using Perl in this project.

There is a nice tutorial on Ensembl website for API installation. Here I will describe some steps.

1. Download the API and BioPerl

Go to Ensembl FTP ftp://ftp.ensembl.org/pub/ and download “ensembl-api.tar.gz” or click here

Go to BioPerl downloads page http://bioperl.org/DIST/old_releases/ download stable 1.6.1 1.2.3 version (in tar.gz)

2. Place your in a source directory

On Ubuntu, you can use the code below to generate your source folder, extract the downloads and then move the content to your source folder

mkdir ~/src
tar xvfz ensembl-api.tar.gz
mv ensembl ~/src/ensembl
mv ensembl-compara ~/src/ensembl-compara
mv ensembl-functgenomics ~/src/ensembl-functgenomics
mv ensembl-tools ~/src/ensembl-tools
mv ensembl-variation ~/src/ensembl-variation
tar xvfz BioPerl-1.2.3.tar.gz
mv BioPerl-1.2.3 ~/src/bioperl-1.2.3

3. Set your environment variables so tat Perl 5 can find the source directory and files inside

gedit ~/.bashrc

Add following lines to at the end of .bashrc;

export PERL5LIB


source ~/.bashrc

4. Check if the installation is successful

perl ~/src/ensembl/misc-scripts/ping_ensembl.pl

If you get “Installation is good. Connection to Ensembl works and you can query the human core database”, it’s done.

For more information and the steps in installation on Mac and Windows see the original tutorial.

Suspend Laptop When Lid Closed Ubuntu 12.04 LTS in Lenovo Z500

I guess this is a bug. Although suspend is set in Power settings, it doesn’t suspend the laptop when its lid is closed.

To solve it, I’ve found a workaround on web. Here is how you implement it:

Generate folder if it’s not present:

sudo mkdir /etc/acpi/local

Set its permissions:

sudo chmod 755 /etc/acpi/local

Generate the script:

sudo gedit /etc/acpi/local/lid.sh.post

Copy-paste the following:


grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]

Make script executable

sudo chmod +x /etc/acpi/local/lid.sh.post

After these operations, you should be able to suspend it when lid is closed and awaken back when it’s open. Note: it doesn’t show lock screen.