Image: Powered By GNU/Linux

Code Monkey, Oh So Random, Tech and Security No Comments

I saw a Linux logo I liked on Google Images a while back, but all instances of it have been removed. I got tired of searching, so last night I hacked around in Photoshop and recreated it.

Powered By GNU/Linux thumbnail

Enabling X Server Remote Connections on Fedora 9

Code Monkey, Tech and Security 2 Comments

Fedora LogoRecently, I was trying to run a GUI front-end to Valgrind (Valkyrie) from within a chroot’d environment on Fedora 9. It failed to run, and after some searching I figured out the problem. Here’s the story.

First, I made sure to disable access control from outside the chroot (warning: make sure you understand the security implications of this!):

[dev]$ xhost + localhost
localhost being added to access control list

Next, I entered the chroot’d environment and attempted to run the application, but it failed with the following error:

[chroot]$ valkyrie
valkyrie: cannot connect to X server 127.0.0.1:0.0

The problem is that the X server is configured by default NOT to listen for remote connections (usually on port 6000). I verified that this was the problem by leaving the chroot and trying to connect via telnet:

[dev]$ telnet 127.0.0.1 6000
Trying 127.0.0.1…
telnet: connect to address 127.0.0.1: Connection refused

The way to fix this on previous Fedora installations was to use gdmsetup. However, this is no longer available. Hunting through the KDE config files I found the solution: change the arguments passed to the X server after login in the kdmrc file.

NOTE: I’m using fluxbox as my desktop environment… KDE is used for the Fedora login screen, which is why we are messing with its config files.

[dev]$ sudo su
[root]# cd /etc/kde/kdm
[root]# cp kdmrc kdmrc.old
[root]# vi kdmrc

On my system, the problem was this line:

ServerArgsLocal=-br -nolisten tcp

I simply changed it to:

ServerArgLocal=-br

I restarted my X server and tried to connect with telnet again (this time with success):

[dev]$ telnet 127.0.0.1 6000
Trying 127.0.0.1…
Connected to 127.0.0.1.
Escape character is ‘^]’.

Then, I once again disabled X access control (`xhost + localhost`) and everything worked fine. Hope this helps!

EDITED 11/17/2008: Changed ‘xhost +’ to ‘xhost + localhost’

Windows 7 Development Guide

Code Monkey, Tech and Security No Comments

Windows 7: Under ConstructionMicrosoft has started to release developer information for Windows 7 (the follow-on to Windows Vista). Of particular interest to me is the Windows 7 Developer Guide. It discusses many of the new features that will be available when this new version of Windows is released.

Of particular interest to me are the changes to DirectX 10, Media Foundation, and the new DirectX 11. Here are some highlights.

DirectX 11:

  • “…resource creation and management has been optimized for multithreaded use, enabling more efficient dynamic texture management for streaming.”
  • Several improvements have been made to the high-level shading language (HLSL), such as a limited form of dynamic linkage in shaders to improve specialization complexity, and object-oriented programming constructs like classes and interfaces.”

DirectX 10 improvements:

  • “The pipeline also introduces the geometry shader stage, which offloads work entirely from the CPU to the GPU. This new stage enables you to create geometry, stream the data to memory, and render the geometry with no CPU interaction.”
  • Predicated rendering performs occlusion culling to reduce the amount of geometry that is rendered. Instancing APIs can dramatically reduce the amount of geometry that needs to be transferred to the GPU by drawing multiple-instances of similar objects. Texture arrays enable the GPU to do texture swapping without CPU intervention.”

Media Foundation improvements:

  • “…Media Foundation has been enhanced to provide better format support, including MPEG-4, as well as support for video capture devices and hardware codecs.”
  • “In Windows 7, Media Foundation provides extensive format support that includes codecs for H.264 video, MJPEG, and MP3; new sources for MP4, 3GP, MPEG2-TS, and AVI; and new file sinks for MP4, 3GP, and MP3.”
  • “In Windows Vista, Media Foundation exposed a relatively low-level set of APIs. These APIs are flexible, but may not be appropriate for performing tasks. Windows 7 adds new high-level APIs that make it simpler to write media applications in C++.”

ASCII Video Rendering

Oh So Random, Tech and Security No Comments

So, we’ve been developing a slick cross-platform media framework to standardize or products on (proprietry, of course), and I couldn’t resist building an ASCII text renderer. It was surprisingly easy using our SDK and a free library called libcaca… seriously, that’s it’s name. It looks okay small, but of course it breaks down as you scale up. Anyways, now we can watch video using xterm via ssh… use case? Who cares!… it’s ASCII video :-)

Pelco Reference Renderer - Small Pelco ASCII Renderer - Small

Okay, now the large size (video source: D1 MPEG-4 30 fps):

Pelco Reference Renderer

Pelco ASCII Renderer

Clark’s Three Laws and Other Great Quotes

Oh So Random, Tech and Security No Comments

I recently ran across a few quotes that I feel worth mentioning here. The first 3 relate to technology, and are noteworthy. The remaining ones deal with stupidity. They may seen overly negative to some, but they are intended to be read with an bit of humor.

Arthur C. Clark’s three “laws” of prediction:

  1. When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.
  2. The only way of discovering the limits of the possible is to venture a little way past them into the impossible.
  3. Any sufficiently advanced technology is indistinguishable from magic.

The 3rd law was rephrased by NASA’s J. Porter Clark into one of my favorite quotes:

“Sufficiently advanced incompetence is indistinguishable from malice.”

A corollary to this is called Hanlon’s razor:

“Never attribute to malice that which can be adequately explained by stupidity.”

And while I’m on the subject, here’s a great quote from Albert Einstein:

“Only two things are infinite, the universe and human stupidity, and I’m not sure about the universe.”

Finally, German General Kurt von Hammerstein-Equord (what a name) shared these observations about the risks of human stupidity:

“I divide my officers into four classes; the clever, the lazy, the industrious, and the stupid. Each officer possesses at least two of these qualities. Those who are clever and industrious are fitted for the highest staff appointments. Use can be made of those who are stupid and lazy. The man who is clever and lazy however is for the very highest command; he has the temperament and nerves to deal with all situations. But whoever is stupid and industrious is a menace and must be removed immediately!”

Microsoft’s Midori OS

Tech and Security No Comments

MicrosoftThe SDTimes has an article up about a new operating system Microsoft is working on called “Midori”. It is based on their “Singularity” OS, with everything being written in managed code then natively compiled.  Rumor has it that this is the follow-on to the Windows platform… we’ll see if it ever materializes commercially. SDTimes bases the article on some internal documents they got access to, which may be why we haven’t seen this level of detail before (see the entry in Wikipedia). From the article:

According to the documentation, Midori will be built with an asynchronous-only architecture that is built for task concurrency and parallel use of local and distributed resources, with a distributed component-based and data-driven application model, and dynamic management of power and other resources.

The Midori documents foresee applications running across a multitude of topologies, ranging from client-server and multi-tier deployments to peer-to-peer at the edge, and in the cloud data center. Those topologies form a heterogeneous mesh where capabilities can exist at separate places.

In order to efficiently distribute applications across nodes, Midori will introduce a higher-level application model that abstracts the details of physical machines and processors. The model will be consistent for both the distributed and local concurrency layers, and it is internally known as Asynchronous Promise Architecture.

…operating system services, such as storage, would either be provided to the applications by the OS or be discovered across a trusted distributed environment.

Read the rest…

YouTube’s Architecture and Scalability

Tech and Security No Comments

High Scalability has a great link to a video TechTalk with Cuong Do, YouTube’s engineering manager. He talks about the challenges YouTube faces (past and present) to meet it’s skyrocketing user demand, as well as the infrastructure that allows them to scale. I enjoyed the anecdotes: especially the frantic email sent at 2am alerting the dev team that they only had 3 days of storage left… I always thought Google/YouTube would be immune to emergencies like that… ignorance on my part :-)

(requires Adobe Flash plugin… click HERE to watch it on YouTube)

I found this information interesting:

  • The application code is written mostly in Python (the web app is not the bottleneck… the database RPC is)
  • They use Apache for page content and lighttpd for serving video
  • Thumbnails are now served by Google’s BigTable
  • They’re running SuSE Linux with MySQL
  • HW RAID-10 across multiple disks was too slow. HW RAID-1 with SW RAID-0 was faster because the Linux I/O scheduler could see the multiple volumes and would therefore schedule more I/O

You can read a good summary of the talk HERE from the High Scalability website.

TechCruch has a good article of the YouTube API.

Interview with Mastercard’s Rob Reeg

Tech and Security No Comments

Mastercard LogoCIO has a good interview with Rob Reeg, president of Mastercard’s Global Technology and Operations. He discusses their infrastructure and processing architecture. Definitely worth looking at if you’re interested in how credit card transactions are processed.

Interviewer: How big of an infrastructure do you have to support and maintain? It must be huge.

Reeg: Actually from a pure server footprint standpoint… we probably have fewer actual footprint servers because of techniques like virtualization that help us leverage one box to do multiple things.

Where it gets interesting is philosophically: We try to put [transaction] processing as close to our customers, the banks, as possible. When we talk about the global network, we have small servers that sit with the bank customers that connect to our network. What it does is it gives us intelligence there at the end of the network. So as a transaction comes through, we can take a look at that transaction and decide how do we best process that transaction for the benefit of all those four parties in the model.

As to processing, the majority of transactions we’re looking at relate to how do we process them as fast as possible in the most accurate way. The way to do that is by peer to peer: If you’re using your card in Europe, in London, say, and you swipe your card as you check out of hotel, we can route that transaction to the hotel’s acquiring bank in London directly to your issuing bank and get that message back for approval without ever going through St. Louis or some big data center in the middle of all that.

You can read the full article HERE.

San Francisco city officials locked out of computer network

Tech and Security No Comments

San Francisco: LockedUpdate 7/22/2008: The issue may be more complex than it first looks (of course, the media always over-simplifies things). Click HERE to read an insider’s account of the situation.

Okay, THIS is funny because of the glaring security mistakes made by San Francisco’s Department of Technology (or Department of Ignorance, after this one). From the New York Times:

A disgruntled city computer engineer has virtually commandeered San Francisco’s new multimillion-dollar computer network, altering it to deny access to top administrators even as he sits in jail…

Prosecutors say Childs, who works in the Department of Technology… tampered with the city’s new FiberWAN (Wide Area Network), where records such as officials’ e-mails, city payroll files, confidential law enforcement documents and jail inmates’ bookings are stored.

Officials also said they feared that although Childs is in jail, he may have enabled a third party to access the system by telephone or other electronic device and order the destruction of hundreds of thousands of sensitive documents.

This is like security 101… you never give this much power to any single person. On critical systems like this, you always have check-and-balances, outside security code reviews, and strict audits. The S.F. DoT was basically driving around without insurance and got in an accident… I don’t feel sorry for them. It’s really sad how ignorant the world is about security (sigh).

What Microsoft Really Wants With Yahoo

Tech and Security No Comments

Bill Gates and YahooTechUser has a great article about possible reasons Microsoft would be interested in purchasing Yahoo’s paid-search business (click HERE for the back story). For those of you new to the subject, paid-search is where advertisers bid against each other to get better/more frequent placement of their ads next to search results (think Google AdWords). This is big business. Believe it or not, it’s what drives Google… search, Gmail, Google Docs, etc all revolve around their ad business.

The afore mentioned article puts forth a compelling argument that Microsoft is only interested in the infamous ‘361 patent held by Yahoo. This is the patent on the whole idea of paid-search. Apparently, Yahoo has been dening Microsoft a good licensing deal on the patent, so Microsoft is retaliating. From the article:

Microsoft is still chafing under Yahoo’s influence and is desperate for unfettered access to the ‘361 patent. It is quite possible that the size of the royalties Microsoft is paying to Yahoo are forcing Microsoft to neglect its paid search operations in order to minimize payments to Yahoo, and to minimize the size of an eventual settlement with Yahoo.

Microsoft is completely aware of the ludicrousness of its attempts to buy Yahoo’s paid-search assets and Microsoft’s earlier acquisition bid seems to have been an attempt to soften up Yahoo’s opposition to a paid-search asset acquisition.

The entire theory is interesting. Click HERE to read the full article.

« Previous Entries