bingshui.org

the Life of Zim

3rd August
2013
written by dzimney

logo

It’s official. Push Pop Studio is now an LLC. Not only are we official, we’ve just updated our website: www.pushpopstudio.com

Push Pop Studio is an interactive development and design firm based in Lawrence, KS and doing business for clients nationally. We’ve done work for clients like Roll Global, POM Wonderful, Target and Chamilia.

Push Pop Studio: Kick-ass Interactive

1st May
2013
written by dzimney

IBM has always been on the forefront of computer technology and currently they’re working on using atoms to do just that. They’ve developed a way of moving the atoms around using magnets that only comprised of 12 atoms themselves. Recently they put out a short film to show the world what they’ve been up to. The film is an animated movie (stop motion) made up for atoms. Each dot you’re about to see are being magnified 100,000,000 times. That’s one hundred million. One hundred. Million. Times. Okay, enough jibba jabba. Watch the video…

And of course, as I love watching the special features on a dvd, here’s a quick one on the making of A Boy and His Atom.. And by the way I think it’s pretty safe to say that A Boy and His Atom is a shout out to the NES classic A Boy and His Blob, which is cool.

5th April
2013
written by dzimney

So for the past couple of days I’ve been trying to get a Hello, World! program to run using C++ in Eclipse Juno on my MacBook Pro running OS X 10.8.3. After getting the project to build in Eclipse and getting a successful compile, I kept getting the following error when running the executable: “cannot execute binary file”. The binary file also was being shown in the Project Explorer in Eclipse with a puzzle piece icon, rather than the executable “play” icon. As it turns out, by default Eclipse will set up the project to generate a shared Library rather than an executable, or so it seems. To fix the issue, go into the project properties and under MacOS X C++ Linker, uncheck Shared (-dynamiclib) in the Shared Library Settings sub section. Apply the changes, run a build and presto!

This solution is all thanks to this post. I’m just reposting the solution to firstly help remind myself of what to do and secondly in hopes that the reposting will help someone else find the solution faster than I did.

As far as I can tell, OpenGL had little to do with the problem, but since I noticed the problem after trying to run an OpenGL project, I thought it valuable to tag it.

21st March
2013
written by dzimney

18th March
2013
written by dzimney

This is just amazing. Never would have thought it’d be this complicated.

7th February
2013
written by dzimney

THE ISSUE:
Last night I was messing around with SSH and X. Essentially attempting to use a Raspberry Pi as a client workstation to my Xubuntu 12.04 desktop. I played around a bit, shutdown my desktop remotely and went to bed. When I woke in the morning and attempted to log into desktop’s GUI. The screen would got blank, flash the following message and then go back to the login screen.

could not write bytes: Broken pipe
* Starting NFS kernel daemon
* Starting crash report submission daemon
speech-dispachter disabled: edit /etc/default/speach-dispatcher
* Stopping restore sound card(s') mixer state(s)
* Starting VirtualBox kernel modules
* Starting the Winbind daemon winbind
saned disabled: edit /etc/default/saned
* Starting NetBIOS name server

* Starting Mount network filesystems

* Stopping Mount network filesystems

* Checking battery state...

At some point last night, I believe that I also ran an update on Xubuntu. However, I can’t remember if I rebooted the system and had a successful login prior to messing around with SSH and X. That said, it’s possible that either could be the root of this problem.

THE TESTS:
In either case, in an attempt to figure out what was going wrong, I first switched to a terminal over the GUI login. To do this at the login screen press Crtl+Alt+F2. To switch back to the GUI from the terminal press Crtl+Alt+F7. From here I logged in with my normal user and password. I did not log in as root. Once logged in I attempted to start x from the terminal by issuing the following command: sudo startx

This produced the following output:

xauth: error in locking authority file ~/.Xauthority
xauth: error in locking authority file ~/.Xauthority

Fatal server error:
Server is already active for display 0
    If this server is no longer running, remove /tmp/.X0-lock and start again.

Please consult the The X.Org Foundation support at http://wiki.x.org for help.

ddxSigGiveUp: Closing log
No protocol specified
No protocol specified
xinit: giving up
xinit: unable to connect to X server: Resource temporarily unavailable
xinit: server error
xauth: error in locking authority file ~/.Xauthority

With this information my first action was to do what was suggested and “remove /tmp/.X0-lock and start again.” After doing so the problem persisted. I then attempted to start X from the terminal again to see what the output was. This time I got the following:

Fatal server error:
Server is already active for display 0
    If this sever is no longer running, remove /tmp/.X0-lock and start again.

Please consult the The X.Org Foundation support at http://wiki.x.org for help.

ddxSigGiveUp: Closing log
Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyxinit: giving up
xinit: unable to connect to X server: Resource temporarily unavailable
xinit: server error

THE FIX:
Looking back at the orignal output from startx and spending a little time Googling the issue. I decided to try and remove the ~/.Xauthority file. And PRESTO! After a reboot, I was able to log in with no issue.

THOUGHTS:
Looking at the errors, it seems to me that I somehow locked up my display in X while doing so. It likely happened when I shutdown the system from SSH — the system shutdown will the SSH connection was active, resulting in the display remaining locked to the SSH session that would have been terminated by the shutdown. Admittedly, this could just be my failed interpretation of things.

I’m also not sure if I only needed to remove ~/.Xauthory or if it was also necessary that I removed /tmp/X0-lock. However, it seemed odd that the message to remove /tmp/X0-lock remained in the output from my second attempt at running startx, while the first and final errors regarding the .Xauthority file were missing. Curious… but not that curious.

NOTES:
Throughout this post, I’ve replaced terminal outputs containing the full path to my user directory with “~”.

2nd October
2012
written by dzimney

So I think this is my third post on setting display resolutions under Ubuntu. I’ve got this Dell P2311H 23″ monitor, which has really been great for what it cost me (around $200, I believe). However, the monitor resolutions don’t get picked up by Ubuntu and after a few restarts of my computer, I end up with 640×480 display, which is really a pain in the ass. The odd part is, that usually during installation and for a few restarts, everything runs fine. Eventually it always gets jacked. It has something to do with the monitor not putting out a EDID. I write a little about it here. Anyhow, I recently updated to Xubunut 12.04 (not a fan of Unity at all). And so of course, here I am dealing with the same issue. Things have changed since 10.10 however.

In Xubuntu 12.04 (which for the record is simply Ubuntu running Xfce rather than Unity), the xorg.conf files are handled a bit differently. Firstly, they’ve moved out of the /etc/X11 directory and into the /usr/share/X11 directory. Additionally, they have become they. In 12.04, and I believe since 11.04, the xorg.conf is now a directory called xorg.conf.d and contains various *.conf files. This is a very welcome change as it allows for the config files to be more organized. In the /usr/share/X11/xorg.conf.d directory, there should already be a number of files. One thing to not here is the that naming convention is to start with a two digit number then dash then the config file name, such as 10-monitor.conf, which is what we will be using. From what I understand the number at the beginning is used to sort which file gets loaded first. I believe there are also some conventions for the number ranges, such as numbers in the 40s are all for some type of config. I really don’t know, but in case you care, there is a rhyme or reason to it, which you can of course choose to ignore if you wish.


Step 1

Before we begin, there are a few pieces of information we need. Firstly, we need to know how to write our modeline. What’s a modeline? I don’t really know, but we’ll be generating one with the gtf command which takes three parameters, Horizontal Resolution, Vertical Resolution and Refresh Rate. In my case, I will be entering the command like this:

gtf 1920 1080 60.

This will provide a modeline for a screen resolution of 1920px width 1080px high and a refresh rate of 60hz. If you don’t know your refresh rate, you probably want to go with 60, especially if you’re using an LCD screen. Entering the command should output something like this:

# 1920×1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync

We want the “Modeline” which is including and everything after the word “Modeline”.

Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync

We also need the Mode Name. This is the first part in quotes: "1920x1080_60.00", including quotes.


Step 2

Next, we need to know the name of our display device. To retrieve this, enter xrandr into the terminal. This should output something similar to the following:

Screen 0: minimum 320 x 240, current 1920 x 1080, maximum 1920 x 1080
default connected 1020x1080+0+0 0mm x 0mm

What we’re looking for here is the name of the device. This should be whatever appears before the word “connected”. In my case the device name is “default”.


Step 3

Now it’s time to write the configuration file. As I mentioned earlier, we are going to create a 10-monitor.conf file. To do so sudo an editor of your choosing such as pico or leafpad. If you don’t like the terminal try the command sudo leafpad /usr/share/X11/xorg.conf.d/10-monitor.conf. Personally, I enjoy myself a little pico and will be entering sudo pico /usr/share/X11/xorg.conf.d/10-monitor.conf. Either will do.

Type up your config file to look like the following, where <MODELINE> and <MODENAME> are replaced with the modeline and modename you found in the Step 1 and <DEVICENAME> with the device name found in Step 2.

Section "Monitor"
Identifier "Monitor0"
<MODELINE>
EndSection
Section "Screen"
Identifier "Screen0"
Device "<DEVICENAME>"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes <MODENAME>
EndSubSection
EndSection

In my case, the final file looks like this:

Section "Monitor"
Identifier "Monitor0"
Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
EndSection
Section "Screen"
Identifier "Screen0"
Device "default"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1920x1080_60.00"
EndSubSection
EndSection

IMPORTANT! READ THE FULL NEXT PARAGRAPH
For the changes to take you’ll need to save the file and restart your computer. If everything was done correctly, your resolution should be set at 1920×1080 (or whatever resolution you’re using) and you shouldn’t need to touch this stuff again. HOWEVER, if you have a typo or anything wrong with the config file you’ve just created, it is possible for you to lose your display entirely. If this happens, wait for the computer to fully boot and press Ctrl+Alt+F1. This should bring up a terminal and allow you to remove the config file you’ve just created. Do so by running the following:

sudo rm /usr/share/X11/xorg.conf.d/10-monitor.conf

Once you’ve removed the file, restart the computer (this can also be done in the terminal by running sudo reboot). You can also edit the file the same as we did before, although leafpad won’t be an option any more, and attempt to decipher what is causing the problem. It is entirely possible that this solution simply won’t work for your configuration and monitor.

Good luck. And thanks to Samuel Martin for the original post on this.

2nd February
2012
written by dzimney

I’ve been running Ubuntu 10.10 for a year or so now and there have been a few times, after installing some updates I presume, where I’ve restarted my computer and suddenly my monitor resolution isn’t recognized. Normally I run the maximum resolution (1920×1010) of my monitor, a Dell P2311H. But on these restarts, my resolution is reduced to 640×480. Very annoying. Now, from what I understand, this is not an issue with Ubuntu per se, but rather the monitor’s failure to send the proper EDID or Extended Display Identification Data for the monitor. Essentially the EDID sends information of what display settings the monitor is capable of, such as refresh rates and resolutions. The basic remedy is to manually enter these settings.

Very recently I had this issue occur to me twice for two separate issues, which is really what’s prompting me to write this post. I don’t want to have to dig through the interwebs again to solve this. So, in my case there were two separate incidents with two different resolutions.

Round 1
The first time my screen resolution was all jacked up, it was because of the “Screen” settings in my xorg.conf, which is located at /etc/X11/xorg.conf.

NOTE: be sure to make a backup of xorg.conf before making edits. You don’t want to make matters worse, and there’s no guarantee that this solution is the solution to your problem.

At the bottom of xorg.conf you should see a section labeled “Screen” or something similar to this:

Section “Screen”
    Identifier    “Default Screen”
    Default Depth    24
EndSection

In this section you’ll want to add a subsection labeled “Display” that defines your available screen resolutions, or more importantly a Virtual resolution which appears to server as a setting for the maximum allowable resolution. Edit the “Screen” section to look something like this:

Section “Screen”
    Identifier    “Default Screen”
    Default Depth    24
    SubSection “Display”
        Virtual    1920 1080
        Depth    24
        Modes    “1920×1080 1680×1050 1344×840 1280×800″
    EndSubSection
EndSection

The resolutions you enter should obviously match to available resolutions for your monitor. More importantly the Virtual entry should match you monitor’s maximum resolution, or rather the maximum resolution you intend to use, whichever is smaller.

Now restart xerver. Depending on your default display manager, you can do this by running one of the following commands:

sudo restart lightdm
or
sudo restart gdm
or
sudo restart kdm

You can find out what your default display manager is by looking at the file default-display-manager in the /etc/X11 directory.

After the restart, maybe you’re good, maybe not. On to…

Round 2

The second time my resolution went all wonky on me it was due to the refresh rates. For this edit, we’ll still be working with the xorg.conf file, but we’ll be editing the “Monitor” section. In my case, this section looked like this:

Section “Monitor”
    Identifier    “Monitor0″
    VendorName    “Dell”
    ModelName    “P2311H”
    HorizSync    28.0 – 33.0
    VertRefresh    43.0 – 72.0
    DisplaySize    509.76 286.74
    Option    “DPMS”
EndSection

The two fields in question are the HorizSync and VertRefresh. You’ll want to change these to whatever your monitor’s refresh rates are. You’ll probably have to do a bit of Googling to figure it out. Of course you could probably just enter in these numbers I have below and see what happens. I believe the worst case scenario would be that Ubuntu would restart without any GUI in which case you’d be stuck in the terminal. So if you’re not comfortable with the Terminal it might not be worth the gamble. Also, in my case DisplaySize looked awfully suspicious and so I removed that line completely.

Again, in my case, the final section looked something like this:

Section “Monitor”
    Identifier    “Monitor0″
    VendorName    “Dell”
    ModelName    “P2311H”
    HorizSync    30.0 – 83.0
    VertRefresh    56.0 – 76.0
    Option    “DPMS”
EndSection

Again, restart your display manager as per the instructions from Round 1 and with any luck you should be in business.

13th July
2011
written by dzimney

My wife and I recently switched from T-Mobile to Sprint for a couple of reasons. The first being that T-Mobile is scheduled to be consumed by AT&T and we’d rather get rid of our phones all together than go with AT&T. The second being that we just moved to Lawrence, KS and our T-Mobile service wasn’t quite as good as we’d hoped. So our first reason for the switch was in hopes of better service as Sprint’s headquarters are in Kansas City, not 45 miles away. As it turns out, Sprint service here in Lawrence is questionable. It’s been reasonably decent throughout the area, but that’s about it. The majority of the time we get about two out of four bars. We have service in more places that we had with T-Mobile, but where T-Mobile had service, the service was strong. So, I guess it’s a bit of a crap shoot either way.

With our new service, I’ve had to rework how I’ve connected Google Voice to my phone. As it turns out Sprint handles Google Voice a lot differently than T-Mobile did. Now, keep in mind, I have the option of keeping my Google Voice set up and how it connects to my mobile phone the same as I had it on T-Mobile. Essentially, I just used Google Voice as a second number that forwarded to my mobile phone and used Voice for my voice mail. The voice mail isn’t the greatest because it depends on a data connection to retrieve voicemails, but you gain Google’s transcriptions of your voicemail messages, which I think is amazing. I barely listen to voicemails any more because I just read them. Setting this up isn’t as simple as it was with T-Mobile (just a setting in the phone’s voice settings). You now have to check the proper settings in your online Google Voice settings and then call *28-XXX-XXX-XXXX (where the X’s are populated with your Voice number) from your mobile phone to redirect calls to voicemail.

But back to what you get with Sprint’s Google Voice integration…

Initially, I was a bit confused and annoyed with the integration. Somehow it just seemed like Sprint and Google’s way of disabling Google Voice calls from the phone, which they really have successfully done. However, I never really used that feature anyway, so I didn’t really care. What I did gain though, which was awesome, was the ability to have my Sprint phone number call in to my Google Chat account. Basically, when you integrate your Sprint and Google Voice accounts, you are given an option to use your mobile number as your Google Voice number. Your previous GV number is removed after 90 days if you do this (unless you pay Google $20 to keep the number, which seems reasonable to me). So, now that I have my mobile number set as my Google Voice number, if someone calls my Google Voice number which is my mobile number, it rings both my Google Chat account and my mobile phone. Why is this awesome? Well, because if I’m at my desk and have my Gmail open, I can answer the call with my computer. This is awesome for two reasons. First, because if I answer with my computer rather than my mobile phone, then the call is running through Google Voice rather than Sprint and so the call does not count against my monthly plan. It’s a free call. The second reason is that if I’m in an area that doesn’t have a good signal, such as my in-laws’ basement (where I’m currently working), I can answer a call with my computer that has a good Ethernet connection over my mobile phone that has a weak signal.

There do seem to be some quirky issues with the integration that I have yet to full figure out. For example, with the integration, my text messages are now sent through Google Voice, which is fine with me. However, having the option to have them run through my normal text messaging service on my mobile phone would be nice. Especially since Google Voice doesn’t support MMS (Multimedia Messaging Service). Now it’s entirely possible this option exists, but like setting up voicemail forward (as described above) it doesn’t seem to be an easy thing to figure out.

So do I like my Sprint service better than T-Mobile? Probably not, but seeing how T-Mobile is going away, Sprint seems to fill in alright.
Do I recommend using the Sprint + Google Voice integration? I think the verdict is still out, but I’m leaning towards yes. I’m still playing around with the new set up and I wouldn’t be surprised if I change things around again. I’ve already changed the set up 2 or 3 times in the past week have had Sprint.

And for the record, in my comparison, I’m using the Nexus S 4G on Sprint and was using the Nexus S on T-Mobile.

20th June
2011
written by dzimney

Recently I had noticed a padding (or margin) issue with the layout of my site. Now, while most users would not have seen this, it seemed to pop up for me every so often. I was seeing a lot of extra margin on the top of my page, 28 pixels to be exact.

Now, being the lazy CSS person that I am (really I just despise IE and refuse to waste my time making things look good for it), I didn’t really think much of it. Everything seemed to look fine on most of my regular browsers. But finally I just got the itch to take care of as it seemed that I was seeing it more often. Probably just me, but whatever. So I start looking through the code for the site and I find that this block of code as being inserted into my header tag:

<style type="text/css">
    html { margin-top: 28px !important; }
    * html body { margin-top: 28px !important; }
</style>

WTF. I didn’t write that, which leaves one culprit and one culprit only. WordPress. I love you WordPress, but sometimes you make me crazy. Turns out, the reason this block of code is being inserted, is for a fancy new User Admin Bar that will show up on your WordPress site while you are logged in. For some reason, it doesn’t work though. I’m sure it works for some people, but on my site and apparently on others’ sites as well, it just doesn’t show up. And so, as a result, you get this 28px margin that you didn’t ask for because when you upgrade to 3.1 the user admin bar is automatically turned on. I’ll refrain from discussing in depth how WordPress should avoid crappy facebook-like user experiences.

So what to do about it!?

QUICK ANSWER
Log in to your WordPress, go to Users->Your Profile and uncheck “when viewing site” under Show Admin Bar.

Save your profile and the issue will no longer appear. Keep in mind that this fix will only resolve the issue for yourself. Other users using the site may still see the issue if they have the box checked in their own user preferences. Getting around the issue entirely, well franking I just don’t care enough to do the workaround on it. Hopefully WordPress will resolve the issue in a coming version though.