GTk+python+pyroom fix
March 22, 2008
After talking to Steve Langasek in #ubuntu-devel, he came up with this fix. Thanks alot Steve! We did a check on the python-gobject:
chagas@morphea:~$ apt-cache policy python-gobject
python-gobject:
Installed: 2.14.1-2ubuntu1
Candidate: 2.14.1-2ubuntu1
Version table:
*** 2.14.1-2ubuntu1 0
500 http://us.archive.ubuntu.com hardy/main Packages
100 /var/lib/dpkg/status
chagas@morphea:~$
Here is what is important. This is the check on the python-gobject package after updating to 2.14.1-2ubuntu1. So if you are having trouble running Pyroom and getting the same errors that I was getting on my previous blog entry, try updating the package.
-Eddie M.
GTk+Python bug in Hardy
March 21, 2008
Hey all, I have an interesting bug report to show off. I gave up on trying to run JDarkRoom for a while and tried to run PyRoom instead. It runs perfect in my Kubuntu Gutsy machine. The only problem is that I run Kubuntu Hardy on my laptop which is my everyday machine, since I’m never home for Gutsy action. This bug is in HARDY, as installing the ubuntu-desktop will still cause the same behavior. Updating from Gutsy to Hardy will not change the way Pyroom behaves and thus the bug can not be replicated this way, in Pyroom 0.1 and 0.2
hagas@morphea:~/0.2$ ./pyroom.py
Traceback (most recent call last):
File “./pyroom.py”, line 28, in
import gobject
File “/var/lib/python-support/python2.5/gtk-2.0/gobject/__init__.py”, line 30, in
from gobject.constants import *
File “/var/lib/python-support/python2.5/gtk-2.0/gobject/constants.py”, line 22, in
from _gobject import type_from_name
ImportError: /var/lib/python-support/python2.5/gtk-2.0/gobject/_gobject.so: undefined symbol: PySignal_SetWakeupFd
chagas@morphea:~/0.2$
Let’s try some magic!
chagas@morphea:~/0.2$ python
Python 2.5.2a0 (r251:54863, Jan 3 2008, 17:52:29)
[GCC 4.2.3 20071223 (prerelease) (Ubuntu 4.2.2-4ubuntu3)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import gobject
Traceback (most recent call last):
File “”, line 1, in
File “/var/lib/python-support/python2.5/gtk-2.0/gobject/__init__.py”, line 30, in
from gobject.constants import *
File “/var/lib/python-support/python2.5/gtk-2.0/gobject/constants.py”, line 22, in
from _gobject import type_from_name
ImportError: /var/lib/python-support/python2.5/gtk-2.0/gobject/_gobject.so: undefined symbol: PySignal_SetWakeupFd
>>>
Let’s hit these files.
__init.py___ line 30 asks for an import from constants.py
from gobject.constants import *
Of course, there is more
from _gobject import type_from_name
There seems to be an error in the way the _gobject.so file is being imported and breaking my attempts to run pyroom. Amazing. ps, if there are any gtk/python people out there in the world who can fix this, I would be deeply appreciative.
-Eddie m.
JDarkRoom
March 18, 2008
Ive been trying to install JDarkRoom for some time now, and it just wont work me. I downloaded Version 12 and tried the following command, per the documentation:
java -jar JDarkRoom.jar
Instead I get this nice big of feedback from the terminal:
chagas@morphea:~$ java -jar JDarkRoom.jar
Starting JDarkRoom…
Locking assertion failure. Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb7cc7767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0×31) [0xb7cc78b1]
#2 /usr/lib/libX11.so.6(_XReply+0xfd) [0xb53bf29d]
#3 /usr/lib/jvm/java-6-sun-1.6.0.04/jre/lib/i386/xawt/libmawt.so [0xb54c28ce]
#4 /usr/lib/jvm/java-6-sun-1.6.0.04/jre/lib/i386/xawt/libmawt.so [0xb549f067]
#5 /usr/lib/jvm/java-6-sun-1.6.0.04/jre/lib/i386/xawt/libmawt.so [0xb549f318]
#6 /usr/lib/jvm/java-6-sun-1.6.0.04/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0×2f) [0xb549f61f]
#7 [0xb5c61ecd]
#8 [0xb5c5aedd]
#9 [0xb5c5aedd]
#10 [0xb5c58249]
#11 /usr/lib/jvm/java-6-sun-1.6.0.04/jre/lib/i386/client/libjvm.so [0x621c40d]
#12 /usr/lib/jvm/java-6-sun-1.6.0.04/jre/lib/i386/client/libjvm.so [0x6310378]
#13 /usr/lib/jvm/java-6-sun-1.6.0.04/jre/lib/i386/client/libjvm.so [0x621c2a0]
#14 /usr/lib/jvm/java-6-sun-1.6.0.04/jre/lib/i386/client/libjvm.so(JVM_DoPrivileged+0×363) [0x6272153]
#15 /usr/lib/jvm/java-6-sun-1.6.0.04/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0×3d) [0xb7c7396d]
#16 [0xb5c61ecd]
#17 [0xb5c5ad77]
#18 [0xb5c58249]
#19 /usr/lib/jvm/java-6-sun-1.6.0.04/jre/lib/i386/client/libjvm.so [0x621c40d]
java: xcb_xlib.c:82: xcb_xlib_unlock: Assertion `c->xlib.lock’ failed.
Aborted (core dumped)
I remember reading a blog somewhere about JDarkRoom and Planet Ubuntu a while back, but I can’t recall the author’s name. Any and all help is appreciated in helping me install and run this program.
Edit: Bernd Niederberger dropped a comment on my blog and suggested I drop this into the terminal:
chagas@morphea:~$ export LIBXCB_ALLOW_SLOPPY_LOCK=”true”
I ran the previous and java -jar JDarkRoom.jar command from above and now I have this:
Full-screen mode not supported. Please consider upgrading your version of Java, or using JDarkRoom on a device that supports full-screen mode.
Thank you for using JDarkRoom. Have a nice morning!
I believe there are instructions on the main page for fixing this on the main JDarkRoom page, so I will return to hunting.Thanks Bernd!
-Eddie M.
Everyday Linux
March 14, 2008
I use Linux every single day, seeing as how none of the computers at my house run any other OS’ and I have a laptop for school/work. Being a System76 machine, it runs perfectly for me (with an exception for a couple of Kubuntu Hardy bugs) and I’m more than happy with it. The problem is that I work in an office using the *other* OS’ and I have to deal with them on a daily basis.
I entered work and my fellow co-worker in the tech department was having for lack of a better term “issues” with his computer. We had other computers for use in the office so it would be okay once he put in a new hard drive and did a reinstall of Windows over the weekend, he tells me. Note: fourth install of Windows in as many weeks. Near the end of the day, he said something to the extent of ‘my hard drive is broken so I cant get that file you need for you.’ Now to be clear, his OS was broken and even his file system was in a bad state, but that doesn’t mean I couldn’t get the files I needed. In fact, this sounds like a perfect job for a Linux algorithm.
Live CD of Finnix (Debian based)
reboot.
boot cd.
fdisk -l (logged in as root so no need for ’sudo’)
cd /mnt; ls
mount -t ntfs /dev/sda1 /mnt/hda
cd (to the directory containing the files we need)
cp foo.file /mnt/sdb1 (sdb1 being my flash drive)
umount /mnt/sdb1 (or you can just pull the thing out)
Lesson learned: Linux > Windows.
Lesson 1: If I was feeling malicious, I could have installed a key logger, since he wasn’t really paying attention to what I was doing, and I was doing it this at top speed. Write to his file system. Drop in a trojan or any such information I wanted.
Lesson 2: I could easily have rm ‘d his entire file system. This is drawn from Lesson 1 obviously. If someone has your computer, it is worth knowing what they are doing with it. This is a complaint I have against Geek Squad and other such companies. If I’m paying you money to do something with my computer, I expect you to explain it all in terms I can understand and let me watch you, that way no files are stolen.
Lesson 3: Password. Password. Password. No password to change the BIOS or MBR? No password to initialize the Hard Drive? There is no way to guarantee that your computer will always be physically secure, and with the proliferation of these Linux systems that can do such things as described above, it is important that your computer not be tampered with.
Leson 4: Just because it’s broke doesn’t mean it’s broke. As far as my co-worker knew, his files were completely gone. In fact, the idea of a Live CD was new to him, but I will be giving him one for his own uses so he can learn more. This is why Linux users are encouraged to have a separate /home partition. Extendability and flexibility matter. You OS and file system and kernel and window sessions should never be recursively linked. KDE is acting funny? drop to a shell and hit this to be back in business: sudo /etc/init.d/kdm restart
Computers are complex, yes. But to imply that one task can break everything on your system is just silly.
Lesson 5: OS != computer. As discussed above, a broken file system is inherently different than a bug in GNOME. Or a problem with a misbehaving NIC. Knowing all the parts of a computer and how they work will help you skip all the trouble of trying to troubleshoot and go straight to fixing. Note: I’m looking at you, “I need a new computer, my Windows is acting up”
Final thesis: The file we needed was recovered and I dropped some David Copperfield level magic on the office before I came home. And always carry around a flash drive/live cd combo with you to work so any problems with Windows can be easily fixed.
Update! Ubuntu Installation complete on the computer in question. +1
-eddie m.
Good Software Ideas
March 10, 2008
I’d like to share some ideas that I believe work. Here is my list:
Programming Tonight:
A pun from the ‘Chicago Tonight’, it is an informal grouping of the Chicago Gnu/Linux Users Group. The general idea is to get together at a cafe, hookah house, etc. and code for a few hours, or just talk. If someone is having a problem with a tricky subroutine, or needs wifi access to pull the latest subversion branch of a project, this is the place to go.
Linux or Lunch:
That’s right. LoL. See also: Linux Lunch, Linux or Lunch, Free as in lunch, etc. This basic idea is to get together and have lunch for those of who live/work in the general area of downtown Chicago. Very fun and the variety of food is splendid. Sushi, Inidian, Chinese, American (hot dogs and hamburgers
), the list goes on and on.
2Drunk2Code (2D2C):
A more formal version of PT, which meets earlier in the week (Monday or Tuesday, versus Thur./Friday), this is meant to handle larger projects. It is more group oriented, instead of individual minded.
Quad-Loco Team:
An expansion of the original Tri-LoCo team idea, it is a venue for Midwest teams to get together and discuss various projects, ideas, etc. This covers Ohio, Chicago, Michigan and Indiana. Our next meeting is March. 16th, at 20:00 Central time in #ubuntu-us-in.
Ubuntu-Us meet & Greet
This is basically the same idea as a company outing, or going out for drinks after work. It’s a chance to get out and meet the various people working in your area. This meeting is Thursday March. 13th aat 20:00 Central time in #ubuntu-us, as far as I know.
Barcamp
We all know what Barcamp is. An unconfrence of food and hacking, the whole point is to get together with people and go wild with technology. Very few rules and everything is left to the individual. Drinks, scheduling of talks, talk topics, etc.
With that list, I ask you. What are some good software ideas that you would like to see spread out into the general world, or which ones do you partake in that are missing from this list?
-Eddie M.
Recover your shell from python
March 7, 2008
While messing around with networks and ssh and user permissions, I stumbled upon this question:
Given a user (pybuntu) for example is logging into a machine via ssh and the admin is having a fun time, so the login becomes not a Bourne shell (bash) to instead the account is being launched into a python primary promt (>>>). How would the user recover into a shell?
My first though was to import some sort of bash module into python, or file, but that didn’t work too well for me. Any takes?
ps. exit() kills the ssh session.
EDIT:
>>>import os
>>>os.execl(‘/bin/bash’)
Sweet! Thanks to Martijn for this one.
-Eddie M.
Hello World?
March 4, 2008
If all went according to plan, I somehow or another managed to make myself onto the Planet Ubuntu webpage. Excellent! If not, then I fail at v i+ bzr + cp/mv commands. The first two are new technologies I’ve recently started using, and the last two reflect my recent obsession with dropping away from a GUI into a shell and really exploring the depth and power of the Linux kernel. I am madly in love.
I would like to briefly introduce myself. I have been using Ubuntu Linux since December 2006 when my brother (more on him later) came home and more or less told me outright that Windows was banned in our household. My Win(ironic name, i think)dows partition breaking helped move things along. I became involved with the Ubuntu-Chicago group, as well as the local CHIGLUG group, and switch schools to a private technical institution where I am pursuing a B.S. in Political Science, and a minor in Computer Science. I also work by day at a company handling their computer systems, uploading content to the website, mapping network drives, and other such small tasks. In the long term, I hope to graduate with a solid understanding of societies and the political forces surrounding them (influencing policy is one area I am particularly interested in), as well as a technical understanding of the technologies which surround social change, as a precursor to my goal of pursuing a degree in law. With that in mind, I want to work with OSS companies and softwares, to better mankind through work in Intellectual Property law.
On my spare time I listen to music very loudly (punk, hip hop, rap, classical/romanticist, avant jazz, what I call “radio rock” and most call alternative rock, metal of course, hardcore, etc.) and I love to skateboard, take photos, read, explore the city with my best friends, and play with my dog. Oh, and my family has hosted over 15+ exchange students in the past few years, so my house is always packed.
I am actively involved in the LoCo project side of the Ubuntu community, as the lead contact for the Ubuntu-Chicago Team, and I try to talk to the US team and general LoCo team as much as possible. As such, I have many many people I am indebted to for all the time they’ve put up with me as I learned my way around the community and the CoC as well as the technology in general. You will notice how much time I spend on IRC when I refer to people by their online nicks, not their real names xD . I hope I don’t offend anyone by forgetting them and they are as follows, with explanations:
Effiejayx my brother down South for keeping me up to date on the S.American news
Tyche a great guy all around from Arizona
Greg G keeping Michigan strong
John C what more can I say?
JJesse an all around great Kubuntu and doc person
Jcastro for helping launch the midwest Quad LoCo team
Jucato for hanging out with me in #kubuntu
Manchicken who rants about free software for hours on end
boredandblogging (who has a better online handle than myself… well no, but close
)
Fransisco Athens for letting me SSH into his box for IRC
Jim Campbell an all around solid guy who deserves to be on this planet more than I do.
Kevin Harris for attempting me to switch to Foresight for hours on end (and hasn’t managed it yet!)
I have two more people I want to thank for putting up with me. They are Freddy Martinez, my twin brother and fellow Ubuntu member, and Richard Johnson, KDE/Kubuntu whiz and the best LoCo leader I could try to replace. You read it first here people: twin Ubuntu developers from Chicago invade your Planet and free your computers! A million thanks to Richard for putting up with both of us and making it happen.
-Eddie M. signing off.
ps. I sure hope this works, or else my super long blog post (with too many annoying links!) was a total waste of time.