Skip to content

Tag: ubuntu

GtkWarning: could not open display

I am trying to run a spider on a vps (using scrapyjs which uses python-gtk2). On running the spider I am getting the error How do I run this in a headless setup? Answer First of all, you didn’t specify if you have a desktop environment (or X) installed on your server? Regardless of that, you can achieve…

Use Python to Access Battery Status in Ubuntu

I am trying to come out with a small python script to monitor the battery state of my ubuntu laptop and sound alerts if it’s not charging as well as do other stuff (such as suspend etc). I really don’t know where to start, and would like to know if there is any library for python i can use. Any

Install psycopg2 on Ubuntu

I’m trying to get the python postgres client module installed on Ubuntu 12.04. The guidance is to do the following: However, apt says that the package can’t be located. I’m keen to install this through apt. Is this part of another package that I can install? Answer Using Ubuntu 12.04 it appe…

Virtualenv on Ubuntu with no site-packages

I’ve been using virtualenv lately while developing in python. I like the idea of a segregated development environment using the –no-site-packages option, but doing this while developing a PyGTK app can be a bit tricky. The PyGTK modules are installed on Ubuntu by default, and I would like to make …