ubuntu

Upstart Notes

Wednesday, January 26th, 2011 | bash, code, nerdery, tips, ubuntu | No Comments

I think I’m going to try to keep my notes about Upstart here in the hopes that it may save some others time in the future.

Where scripts should live:

/etc/init

Failed to connect to socket:

status: Unable to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

Run commands as root (duhh):
sudo [start|stop|restart] SERVICE

Information regarding all the stanzas:

http://upstart.ubuntu.com/wiki/Stanzas

Tags: , ,

Notes on PIL + virtualenv + Ubuntu

Saturday, March 20th, 2010 | code, development, nerdery, python, tips | No Comments

Just some quick notes on installing PIL in a virtualenv in Ubuntu:

Most forums or message boards suggest:

sudo apt-get install python-imaging

to install PIL, but that doesn’t exactly do when you’re trying to install into a virtualenv with –no-site-packages, so… you try to install from source by downloading the tarball and doing the usual:

wget http://effbot.org/downloads/Imaging-1.1.7.tar.gz
tar -xzf Imaging-1.1.7.tar.gz
cd Imaging
sudo python setup.py install

In some cases this works, but other times build will fail with this:

...
_imaging.c:3138: warning: return type defaults to ‘int’
_imaging.c: In function ‘DL_EXPORT’:
_imaging.c:3138: error: expected declaration specifiers before ‘init_imaging’
_imaging.c:3149: error: expected ‘{’ at end of input

A little known fact is that if you first install python developer tools, the build will go smoothly:

sudo apt-get install python-dev

This may install a few packages other than just python2.6-dev, but whatever. You should now be able to build and install as usual:

sudo python setup.py install

Took me some poking around, so I figured I’d share, maybe save someone some time.

Tags: , , ,

ubuntu 8.10 + triple monitor = noproblem.py

Thursday, February 12th, 2009 | nerdery, personal | No Comments

So, I thought I’d share my latest experience with setting up a triple monitor xorg config with Ubuntu 8.10 since every other time I’ve set it up, under whichever crazy flavor of linux, there has been at least some sizeable headaches whereas this time there were few. I’ll just go ahead and applaud the Ubuntu team once again on making another one of those little headaches go away.

For the record, my other linux box that serves as my house’s fileserver, my personal staging environment and general non-desktop related task doer had a video card take a dump, so I had to take one of my two nVidia 6600 GTs out of my desktop to replace it to get movie streaming and other things back up. It really doesn’t need this nice of a card, but or even as nice as the 7600 GS (culprit) that was in it, but it just so happens that that is the hardware I have laying around. Call me spoiled.

Anyways, my dad had an extra PCI express card laying around so he gave it to me to replace what I’ll just call the “turd” from now on (even though it probably won’t come up again). So, I’ve once again got both my 6600s back in my desktop.

I’ve got one 22″ monitor I run over DVI and two 19″ 4:3 monitors I run over VGA. Because I’ve played with Xinerama and know how much it totally blows, I decided to at least use two in TwinView. One downfall I knew I was already going to run into were problems with Compiz and Xinerama, it just doesn’t work. I settled on the idea that I’d rather have more screen real estate than have fun wobbly windows.

On to the good stuff. Once I got things to “just work” with TwinView on my first two monitors, it was as easy as going to System -> Administrator -> NVIDIA X Server Settings. This of course assumes that I had the nVidia drivers installed already (hint: System > Administration > Hardware Drivers). This is the only xorg.conf GUI I have ever seen work for a configuration that is somewhat complex like this. To be honest, I fired it up initially still expecting to have to hit up vim and having to do at least some googling. But this sucker just worked. The major things that aren’t detected by the OS or xorg or whatever is just in the display configuration, i.e. the “X Server Display Configuration”. I just had to enable TwinView for the two and then enable Xinerama across the third, set the positions (or just drag the screens) and voila! Well, I did have to save the config to my home directory first. I didn’t run the program as root, so obviously it can’t rewrite /etc/X11/xorg.conf. Once I had that copied in, I logged out, logged back in and everything was peachy. Here’s a link to my actual xorg.conf. By the way, there are a ton more possibilities this little configuration GUI can do which are cool, I’ll probably be playing with it more just for fun :P

This is a bit of a lengthy post and doesn’t cover a ton of the details, but I was so pleased with my experience, I had to share something. Ubuntu just does a great job at finding the drivers in the first place and then including this now “mature” NVIDIA X Server Settings GUI. A+ job. Two pats on the back.

Tags: , , ,