A Django site.
July 16, 2008

=Utah Open Source=
Utah Open Source
The Utah Open Source Foundation
» Introducing the Provo Linux User Group (PLUG)

This is the first of many articles to come introducing our readers to the organizations associated with Utah Open Source. Today, we bring you one of the oldest Linux user groups in existence, let alone in Utah: the Provo Linux User Group (PLUG).

PLUG was first formed in 1994 by two then-students at BYU, Thayne Harbaugh and Mike Handy. Thayne and Mike had wanted to form an on-campus student organization for enthusiasts of Linux, but were unable to find a faculty member willing to sponsor its creation. Undaunted, they created PLUG as an off-campus organization.

This was during the early days of Linux and the Internet. The fact the plug.org domain name was available is one example of how early this was; The Intel Pentium CPU was brand new and most geeks were running 386 and 486 CPUs with less than 1GB of hard drive space; Internet service was still a novelty and most connections were made over serial modems at 9600 bps to 14.4Kbps.

The Linux community was young, still driven mostly by volunteers coordinating through online groups. However, 1994 would be the year Red Hat, SuSE, and Caldera would all release the first versions of their respective distributions, thus kicking off the fast-paced commercial Linux distribution race.

PLUG began holding its meetings the second Wednesday of every month — a tradition that has stood the test of time — at various venues around Utah Valley including the Canyon Park campus, The Palace, and at CEDO.

After the first five years of PLUG, the original founders were either moving out of the area, getting busy with work-related (Linux, of course) tasks, or just feeling it was time to pass the torch. Jason “Jayce^” Hall suddenly found himself holding said torch and carried PLUG through the next several exciting years until 2007 when Jason stepped aside to become more involved with UTOS and Ryan Simpkins took the helm.

Over the years PLUG has hosted several special engagements with impressive speakers such as John Terpstra and Steve French of the Samba project, Perl guru and O’Reilly author Damian Conway, and Miguel de Icaza of the Gnome project. Over the course of several Summers, PLUG has held annual barbecues for members and their families which also included surplus swap meets where members could trade or sell old hardware.

PLUG has a member mailing list which varies in the amount of traffic it gets. Most of the time, the list sees fairly low to moderate traffic, but occasionally will fill its members’ mailboxes with spurts of off-topic discussions. PLUG hosts archives of these highly intellectual discussions at http://plug.org/pipermail/plug.

The PLUG website is firmly located at http://www.plug.org/ and, as mentioned above, meets (with some very, very rare exceptions) the second Wednesday of each month at the Omniture building in the Canyon Park campus.

July 14, 2008
» Use Vim As A Syntax Highlighting Pager

It has been some time since I’ve done a Vim Tip of the Week, but I came across something today that I thought I would share.  This tip will allow you to use Vim, with all its syntax highlighting glory, as a pager (similar to less or more).

If you use cat or less or more regularly to quickly view files, but you’d like to keep the same syntax highlighting that you’d get in Vim you can use an included config that makes Vim act as a pager.  Setup the following within your .bashrc file, or wherever you keep your shell aliases:

alias vless='vim -u /usr/share/vim/vim71/macros/less.vim'

You’ll then need to re-read that file, which can be done using:

. .bashrc

At this point you can use vless to view a file, which will use the beloved syntax highlighting.  Normal pager shortcuts should work.  q to quit, / to search, pg-up, pg-dn, etc.

Random Posts

July 12, 2008

Lonnie Olson
fungus
Kittypee
» DNS Exploit News

After reading all the details about the “new” DNS exploit I feel quite annoyed. These types of attacks have always been possible. This isn’t new. Cache Poisoning has always been on every DNS server administrator’s check list of things to carefully plan to prevent. I compare it to Firewalls: Every firewall administrator knows that best practice is to block everything by default and only make exceptions for what should be allowed.

This idea has been around for well over a decade. Maintaining a discrete list of what is allowed which can be completely enumerated with a great level of confidence and block the rest. Badness cannot be enumerated completely. Blacklists will always be missing important aspects. Expecting that all people are good and don’t do bad things will always turn bad.

Patches released for DNS services that are vulnerable do not fix the root cause. It can’t be fixed because it is part of the original specification and migrating away from it will be equally as painful as the migration to IPv6 is. These patches only implement other kinds of mitigation for the exploit. The best form of mitigation comes in the form of implementing standard best practices that have been around for many years.

DNS servers should carefully control who is allowed to ask questions about non-authoritative zones (recursion). DNS servers at ISPs should limit recursion to customers only. Corporations should run internal recursive DNS servers with access restricted to internal users only. This will severely isolate any damage caused by cache poisoning.

I am not saying nobody needs to patch their servers. In fact the patches should be applied quickly because it does help quite a bit. I am just saying that if you have already implemented best practices you shouldn’t have to worry very badly. And if you haven’t implemented them, do it now!

July 11, 2008

Stephen Shaw
no nic
Decriptor's Blog
» PC World, Linux examined by the ‘informed’

Well I’d talk about the article, but well you are just going to have to read it.  Just a quick gem though from the article:

The big question is: Given that Red Hat bases its Fedora distribution on OpenSUSE, and that Fedora and OpenSUSE are both distributions with advanced features intended for power users, why would you pick one over the other?

openSUSE Examined

July 10, 2008

Hans Fugal
no nic
The Fugue :
» k20

I finished the promised K-20 meter. I imaginatively called it k20, and you can find it at http://hans.fugal.net/src/k20. Here's a screenshot:

k20 screenshot

From left to right, read average (VU), peak (instantaneous with 26 dB / 3 sec falloff), maximum peak, and overs.

This is pure unadulterated printf() abuse. No ncurses. Not that I have anything against ncurses, just that I'm lazy. Of course you need an ANSI capable terminal, but I'm sure you can find one lying around.

July 9, 2008

Marc Christensen
no nic
Mecworks
» SLLUG Meeting, July 16, 2008: KVM, the Kernel Virtual Machine

Stuart Jansen from Guru Labs will be presenting on KVM kernel based virtual machine at SLLUG this month. Here’s the announcement for next week’s Salt Lake Linux Users Group meeting:

This month’s Salt Lake Linux Users Group meeting will be on KVM, the Kernel Virtual Machine, presented by Stuart Jansen.

Presentation:

KVM, the Kernel Virtual Machine, is a Linux kernel module that turns a normal Linux kernel into a hypervisor. Many kernel developers feel this is a superior design to Xen. Stuart Jansen, from Guru Labs, will discuss virtualization with an emphasis on KVM, its advantages and disadvantages.

More information and links at : http://en.wikipedia.org/wiki/Kernel-basedVirtualMachine

Time and place:

    Date:  Wednesday July 16, 2008
    Time:  7:10pm
    Place: Warnock Engineering Building (WEB) room 101
           (Previously known as EMCB)
    Cost: $0.00. Zip. Nada.

Directions/Parking:

Directions - [http://www.map.utah.edu/index.jsp?find=62] Parking can be found just East of the WEB building and there is a big lot just North of the Merrill Engineering building (MEB). Parking is free after 6:00 (Based on the signs posted. Always check in case this changes.)

Special thanks go to:

  • Prof. Lepreau and the U of U for providing the meeting room.
  • Various Volunteers


Scott Morris
nexangelus
OpenSUSE Linux Rants
» One of the Greatest Linux Tools Yet

From the OpenSUSE Newsroom:

The openSUSE Project is proud to announce the 1.0 release of the openSUSE Build Service. The 1.0 release provides all the features necessary to support building openSUSE in the public build systems and allowing direct contributions to openSUSE from all contributors. Developers can now submit contributions to openSUSE directly at build.opensuse.org.

The openSUSE Build Service allows developers to create and maintain packages for openSUSE and many other Linux distributions, including CentOS, Debian, Fedora, Mandriva, Red Hat, and Ubuntu. With the 1.0 release, the openSUSE Build Service expands its scope to building the entire openSUSE release, and provides everyone with the same access and transparent interface to work on the openSUSE distribution.

The openSUSE Build Service has offered a simple collaboration system since its inception for groups to work closely together on packages or solutions stacks. The 1.0 release improves on existing functionality to allow the Build Service to scale to larger projects like openSUSE’s Factory distribution, and to allow building openSUSE’s stable releases in the open.

What the changes mean for contributors:

  • Anyone can find a package’s working copy as maintained by the official packager or packaging team. Contributors can submit changes against the working copy.
  • The submission handling and notification system has been put in place, allowing any contributor to request a merge of their changes to a project.
  • Quality assurance happens before contributions are merged. Test builds of a suggested change are accessible to anyone.
  • Improved branch handling. It is easy to set up a branch of a package. The branch will build in the same way as the original package, but can be modified.
  • Source handling is improved in 1.0. It’s now possible to easily maintain a branch, and modifications are stored without creating a full copy. This makes it easier to maintain features based on the latest copy of package. The Build Service builds the latest packages, including modifications, automatically.

The majority of this functionality is implemented on the server side. The rest can be implemented by the various Build Service clients, so that contributors can take advantage of the new features.

The Build Service team has also introduced a number of smaller improvements and bugfixes to make the system more scalable and usable.

The openSUSE Build Service is now considered “feature complete” for collaboration. The Build Service team is looking for additional feedback on improving the openSUSE Build Service as it will now be the standard tool for working on the distribution.


Hans Fugal
no nic
The Fugue :
» opg ftw

Few things about programming (in most languages) are less enjoyable than writing option parsing code. On the other hand, few things are more irritating to users than no -h and no options where options are needed (or underdeveloped option parsers). In few languages is it more painful to do option parsing than it is in C.

So I did what any sane lunatic would do. I wrote an option parser generator. I think it's quite nice. This input:

usage: foo [options] other stuff 
-f --foo          bool     Short name, long name, type, help text.
-b --bar=name     char*    This has a required string argument.
-z --baz=decibels int?     Optional integer argument
-q --quux=MACH    float    char*, int, and float are the recognized types

Any line not starting with a dash is copied into the help message verbatim.

becomes this output (a header and source file):

/* This file is automatically generated by opg */
#ifndef _OPG_H
#define _OPG_H

struct options {
    int   f; /* foo */
    char* b; /* bar */
    int   z; /* baz */
    float q; /* quux */
};

/* Print usage and exit(1) */
void usage(void);

/* Parse options, populate opts, adjust argc/argv */
void parse_options(int *argc, char * const *argv, struct options *opts);

#endif


/* This file is automatically generated by opg */
#include "opts.h"

...

void usage(void)
{
    puts("usage: foo [options] other stuff");
    puts("  -f  --foo             Short name, long name, type, help text.");
    puts("  -b  --bar=name        This has a required string argument.");
    puts("  -z  --baz[=decibels]  Optional integer argument");
    puts("  -q  --quux=MACH       char*, int, and float are the recognized types");
    puts("");
    puts("Any line not starting with a dash is copied to the help message verbatim.");

    exit(1);
}

void parse_options(int *argc, char * const *argv, struct options *opts)
{
    ...
}

http://hans.fugal.net/src/opg. Enjoy.

July 8, 2008

Scott Morris
nexangelus
OpenSUSE Linux Rants
» Linux T-Shirt of the Year

People seemed to have a good time with my last Linux T-shirt post, so here’s another one for you. I really like this one:

Linux T-Shirt

Click for a slightly larger version.

So again, where can I get one of these?

» If you haven’t already, take a look at Flash 10 for Linux

If you haven’t already, take a look at the new features available with the new Linux Flash 10 Beta. Such new features include:

3D Effects

Custom Filters and Effects

Advanced Text Layout

Enhanced Drawing API

Visual Performance Improvements

Enhanced Sound APIs

More information can be found at the link posted above.

The Flash 10 plugin is available both as a gzipped tarball and as an RPM.

July 4, 2008

John Anderson
sontek
sontek ( John M. Anderson )
» Advanced file permissions in Linux

A lot of Linux/openSUSE users aren’t aware that there are more to file system permissions than the obvious Owner, Group, Other / Read, Write, Execute setup.

All major Linux file systems (ext3, reiserfs, etc) support access control lists (ACL) and its very easy to use them.

To see if a file or directory has an ACL set on it, you can use ls:

inspidell:~ # ls -ld /home/sontek

You’ll get output similar to this:

drwxr-xr-x+ 55 sontek users 4096 Jul  4 13:42 /home/sontek

The + at the end of the permissions means that we are using extended permissions (ACL’s). To get the list of ACL’s on the file/directory, run the getfacl <file> command.

inspidell:~ # getfacl /home/sontek
getfacl: Removing leading '/' from absolute path names
# file: home/sontek
# owner: sontek
# group: users
user::rwx
group::r-x
other::r-x
default:user::rwx
default:group:users:---
default:mask::r-x
default:other::r-x

This shows both the ACL’s and the basic Linux permissions.

To modify or set ACL’s you use the setfacl command. Here are a few examples of how to use it:

Grant a single user read access to a directory in your home directory.
setfacl -m u:mom:r /home/sontek/photos

Remove all access from a group on a file
setfacl -x g:developers payroll.xml

You can also copy a set of permissions from one file to another
getfacl file1 | setfacl --set-file=- file2

Remove all ACL’s
setfacl -k /home/sontek

For those of you who are not console jockey’s, you’ll realize quickly that the default nautilus setup doesn’t have a way to view, modify, or add any ACL’s, to get this support you’ll need to install two packages, with opensuse you do this with zypper:

inspidell:~ # zypper in eiciel nautilus-eiciel

Before the ACL permissions show up in nautilus, you’ll have to restart it:

inspidell:~ # pkill nautilus

After this, you’ll be greeted with a very easy to use dialog for modifying ACL’s:
Screenshot of FACL permissions

another great nautilus permissions tip I learned from Christer Edwards is to enable advanced permissions in nautilus, this is a much better UI for managing permissions and should probably be the default.

gconftool-2 --type bool --set /apps/nautilus/preferences/show_advanced_permissions True

A screenshot of this in action:

Screenshot of nautilus advanced permissions

I hope this helps you better secure and manage your computer with the more advanced features your Linux file systems both from console and inside GNOME.

» TCP: Treason Uncloaked?

Today, considering it is a holiday here in the US, I figured I’d take a day off from the tutorials and ask a question of you.

All of my servers run logwatch (which will make for a great tutorial coming up soon), and I pretty regularly see something like this in the daily output:

--------------------- Kernel Begin ------------------------

1 Time(s): TCP: Treason uncloaked! Peer XXX.XX.XX.XXX:XXXX/XX shrinks window 1898670412:1898670413. Repaired.
1 Time(s): TCP: Treason uncloaked! Peer XXX.XX.XX.XXX:XXXX/XX shrinks window 1911943385:1911943386. Repaired.
1 Time(s): TCP: Treason uncloaked! Peer XXX.XX.XX.XXX:XXXX/XX shrinks window 1922304386:1922304387. Repaired.
1 Time(s): TCP: Treason uncloaked! Peer XXX.XX.XX.XXX:XXXX/XX shrinks window 1922444120:1922444121. Repaired.
1 Time(s): TCP: Treason uncloaked! Peer XXX.XX.XX.XXX:XXXX/XX shrinks window 1949802160:1949802161. Repaired.

———————- Kernel End ————————-

I’m not really sure what that means, but if anyone can offer me some feedback I’d appreciate it.  So far I’ve seen conflicting answers from basic Googling.

Random Posts

July 2, 2008

John Anderson
sontek
sontek ( John M. Anderson )
» Get the changelog of a package with rpm

Ever run system updates in Linux (i.e openSUSE) and get a package that doesn’t seem to be changed and wonder why the update was pushed? Or just interested in following the latest changes to some of your favorite Linux packages?

With rpm you can view all the latest changes in an easily to read format. To get the changelog of a package with rpm you do the following:

$ rpm -q --changelog <package> | less

replace <package> with whatever ever package you would like to see the changelog for (i.e rpm -q –changelog banshee-1 | less)

This is for rpm based Linux distributions (i.e openSUSE, Redhat)


=Utah Open Source=
Utah Open Source
The Utah Open Source Foundation
» Announcing a UTOSC keynote speaker: Joe Brockmeier

The 2008 Utah Open Source Conference is coming up fast (August 28-30). We are going to continue to give you reasons to be very excited (as we are) to attend UTOSC 2008 until the very end.

We are very pleased to announce one of the keynote speakers at this year’s conference will be none other than Joe “Zonker” Brockmeir of Novell and the openSUSE project.

Joe’s keynote presentation, titled “How to bootstrap a community,”  is sure to be interesting considering his background. What started with purchasing a copy of Slackware in 1996 turned into nearly a decade-long career writing about Linux and the open source community and industry for a variety of high-profile tech publications. Prior to being hired as openSUSE Community Manager for Novell early this year, Zonker spent time as Editor-In-Chief for Linux Magazine and as editorial director of Linux.com. His writing background also include contribution to many books, HOWTOs and other technical documents.

While his job at Novell is primarily centered around supporting and promoting the use of the openSUSE Linux distribution, Joe’s been quoted in a few recent interviews saying he’s committed to advocating the use of all forms of Linux and open source software.

Joe Brockmeier’s keynote presentation will undoubtably hold special value for users of the openSUSE and SUSE distributions, but considering Joe’s experience and knowledge about the Linux and open source industries over the last decade or so, this presentation offers great potential value for any UTOSC attendee.

A blurb about the conference

The 2008 Utah Open Source Conference is the second annual gathering of open source enthusiasts in Utah. Following the amazingly successful first conference held in 2007 at Novell’s Open Source Technology Center in Provo, UT, this year’s conference is being held on the Redwood campus of Salt Lake Community College near Salt Lake City.

For more information about this conference, to register to attend, or to see a really neat website driven by open source software, go over to <http://2008.utosc.com/>.


John Anderson
sontek
sontek ( John M. Anderson )
» Get build dependencies with zypper

When you are working with the source of a new package on openSUSE and aren’t familiar with all of its dependencies, it gets quite annoying running the normal Linux autconf commands–./autogen.sh, install missing dependency, rinse, wash, and repeat–until you finally have everything you need installed.

zypper makes this easy for us with the following command:

$ sudo zypper si -d <package>

You replace <package> with whatever package’s build dependencies you need.

June 25, 2008

Scott Morris
nexangelus
OpenSUSE Linux Rants
» 20 Reasons Linux Users Like Linux (and you might, too)

One of the major inhibitors to the spreading of Linux, as I see it, is that people don’t know why they should try it. Other reasons may include lack of support for their favorite game, or that Photoshop doesn’t run on Linux. For those of us who weren’t stopped by those reasons, why did we switch? What is it about Linux that makes it a viable alternative?

A couple of weeks ago, I posted an article called “Major Linux Migrations: An Unbelievable List of Nearly 100 From Around the Globe.” One reason for this is so that people could gain a perspective of just how many migrations have taken place. And that list doesn’t even include them all.

The next question might be, “Well why do people find Linux attractive?” It does not support your favorite game. Photoshop does not run on it. There must be reasons for using it that are more compelling than the reasons for not using it.

A few hours of study and research revealed some eye-opening and thought-provoking reasons that Linux users like using Linux. What you’ll like about this is that I made every attempt possible to keep it objective. This study is available as a free ebook from my blog at OpenSUSE Linux Rants. To get your copy, take a look in the upper-right hand corner of the site.

I decided to replace the detractive Linus quote with something more constructive.

In addition to the “Why Linux?” ebook, there are several others available, including:

openSUSE 11.0 - Start-Up Manual (228 pgs, by Novell) This manual provided by the good folks at Novell goes over many things you’ll want to know when learning to use openSUSE Linux 11.0.

Investigation 101 - Gathering Information about Hardware, Filesystem, and Processes (22 pgs, by Scott Morris) Sometimes, you need to gather information about your Linux system. This can be so that you know what is happening on your machine, or so that you can install hardware, or so that you can better describe details to other people who are trying to help you resolve an issue. This book provides different methods of gathering such information.

YAST - Installation and Management of Software (23 pgs, by Scott Morris) One of the very first things that users need to know is how to install software in Linux. This book is a no-nonsense introduction to mastering the basics of using YAST to manage your system software. It also provides a few tips on how to get all the latest software from all the great servers.

The Easiest Linux Guide You’ll Ever Read - an introduction to Linux for Windows users (162 pgs, by Scott Morris) In 2006 I published this book for SUSE 10.1, though almost all of it is relevant to openSUSE 10.2 and 10.3. It was mainly written for people who are competent with using Windows, who have never attempted to use Linux but are interested in giving it a try.

openSUSE 10.3 - Start-Up Manual (258 pgs, by Novell, 09/14/2007) Start-up manual provided by Novell for openSUSE 10.3.

openSUSE 10.2 - Start-Up Manual (236 pgs, by Novell, 11/29/2006) Start-up manual provided by Novell for openSUSE 10.3.

I’ve gotten lots of great feedback on those that I wrote.

If you don’t get anything else from this article, make sure to glean this gold nugget: The Start-Up Manual for each release is included directly on the install disc itself! This is true for the DVD, although I did not see it on the CDs.

Throw your DVD into your drive and mount it. Go into the /docu folder in the root of the DVD. You’ll see an ‘en’ directory and a ‘de’ directory. ‘en’ is for English and ‘de’ is for German. In each respective folder, you’ll find at least 4 excellent ebooks. One to get started quickly with Gnome, one quickstart for KDE, a reference, and a startup guide for openSUSE.

Remember, kids. When you download your new DVD ISOs, head to the /docu folder for the free startup guides.

For those not available on the DVD, you can always check my library.

June 24, 2008

Doran Barton
fozzmoo
Fozzolog
» Review: Samsung Instinct as a replacement smartphone

I've had a Palm Treo 700p for a couple years and a Treo 650p before that, both with Sprint as a wireless carrier. The 700p acted up a few months ago, so I took it into a Sprint repair center. They promptly wiped it, upgraded the firmware and gave it back to me as "fixed." Only, it wasn't fixed. I'm not sure, but I think the firmware they upgraded me to wasn't intended to ever run on a 700p, but I'm not sure. As a result, the phone has kinda-sorta worked since then.

I've read on Engadget about a new phone exclusive to Sprint from Samsung called the Instinct. At first glance, it looks eerily similar to an Apple iPhone, but as I read more about it, it looked like it might be a good fit for me.

Boy, was I wrong.

instinct-250x325.jpg

Before I go into some specifics, let me just say that Samsung and Sprint can easily save this phone. All they need to do is open it up just a little more and listen to the "corporate" users.

What I liked

One thing I liked about the Instinct is that it does not run Windows Mobile. I've avoided Win-Mo on principle, but have helped other people with problems on Win-Mo devices and have experienced the frustration that is running Win-Mo. Using a Palm Treo vs. a Win-Mo Treo is the difference between night and day. One operates like cold tar (and has a lower video resolution) while the other is relatively stable and snappy.

The Instict is an awesome phone, it just isn't quite a "smartphone" and definitely isn't a geek's phone.

The "haptic feedback" is very cool: The phone generates a mild vibration when you touch an active icon on the touchscreen, thereby giving you physical feedback that you've activated a button or other onscreen feature. This goes a long way toward alleviating the "flatness" problem a lot of touchscreen devices have.

The Instinct has a very nice GPS navigation program that plots routes and gives you turn-by-turn directions. This is an amazing feature for a mobile handset that nets you $129 after rebate.

The sound quality of the phone is very, very good, both as a handset and as a speakerphone. Kudos to Samsung for that.

The web browser is "okay." It's better than the Blazer browser on the Treo, but it's not quite what it wants to be which is a browser that people will want to use more frequently than just when they're desperate for something off the Web.

The camera (still and video software is included) is, by far, the best cell phone camera I've ever used. Wow! It lacks a flash, but performed pretty dang well in low-light.

The Instinct has "visual voicemail" which is bound to become a de facto feature on new phones moving forward. Very cool.

Plugging the phone into a USB port on my laptop running Linux worked well. Linux detected a USB mass storage device and let me mount it. If I understand correctly, it's just acting as a card reader for the mini-SD card. This gives you access to all the non-phone media like pictures, movies, and music.

What I really didn't like

E-mail was a dealbreaker. The Samsung/Sprint e-mail client software tried to be very accomodating and provides wizards for setting up mobile e-mail accounts for popular webmail sites like AOL, Hotmail, Yahoo!, and GMail, but doesn't quite deliver as more than a basic e-mail client in any other regard. It does let you set up multiple POP or IMAP accounts and supports SSL-encrypted access for privacy wheres supported. However, I don't believe it's a true IMAP client because it only displays 25 of your most recent messages (I think you can bump that up to 100 in the settings) and doesn't let you access IMAP folders other than Sent, Inbox, and Trash.

Browsing HTML e-mail messages is lame because, while the Instict does take a stab at parsing the HTML, it only displays the text and does not give you any links which you can click on to view on the phone's browser.

E-mail attachment support is nonexistent.

While I don't care, the Instinct only offers a bare minimum support for Exchange users via Outlook Web Access and doesn't sync with Exchange (or anything else, for that matter).

Speaking of synchronization, Sprint does offer a remote sync feature that let's you store your contacts and other data on a remote server. The benefit of this is that if your phone is stolen or broken, you still have access to your address book. Additionally, Sprint provides a web-based facility for you to manage your contacts.

I thought this was going to be cool. I could just export my contacts from KDE's address book and import them into Sprint's web facility and, voila, all the contacts I've had on my Treo would instantly be available to me on the Instinct.

The Sprint import facility had instructions for Outlook users to export their contacts as a CSV file and even went as far as to indicate what column names were valid and would be recognized by the import routine. I tweaked the CSV file my system generated to match the column headings Sprint wanted. The import process took several minutes and then told me it couldn't import anything. Game over.

The in-phone address book is terribly lacking. For starters, there's 's no way to store a company name with an entry, only last name or first name.

Text messaging was... okay, but cumbersome.

Typing text on the Instinct is not too bad, but has some serious caveats. While the text entry routine provides spellcheck on-the-fly, it doesn't provide spelling or grammar correction on the fly at all. That seems odd considering just about every phone I've used the last ten years or so has had that. It should at least auto-conjugate and insert apostrophes when I type "cant" or "doesnt." Nope, won't do it. Even a lone "i" surrounded by whitespace on either side remains lower case. It's smart enough to capitalize the first letter after punctuation and it will highlight mispelled words (including my un-conjugated conjunctions). Tapping on a mispelled word will offer suggestions, but this is a time-consuming affair!

I registered as a developer on Sprint's Developer website hoping to create some cool third-party apps for the Instinct -- fill in some of the gaps, but got discouraged rather quickly.

In one of the developer forum posts, a developer asks, "Is there a desktop USB SDK for access to the Calendar, Notes or any other built-in data? " A Samsung developer replied: "There is no USB SDK/API supported on the Instinct."

The Sprint sales representative who helped me purchase the Instinct told me, up front, the Instinct did not support tethering so I could not use it as a wireless modem for a laptop. I thought I'd investigate that a little further before I gave up on it -- see if it looked like it would be forthcoming as an official capability or as a third-party software add-on, but it doesn't look good.

End result?

I'll be taking the Instinct back to Sprint in the next day and will either purchase a Palm Centro instead or give their technicians another shot at fixing my 700p.

Samsung and Sprint need to assign some hardware interaction and usability people to this phone. Not only are most of the applications painfully minimalistic and basic, they're not as easy to use as they could or should be. 

Again, this could be a good smartphone for Sprint if they give more attention to the needs of "professional" users.

June 22, 2008

John Anderson
sontek
sontek ( John M. Anderson )
» Achieve Zen with openSUSE 11.0 (i.e Get rid of pulse audio)

I’ve been having a lot of stability issues with openSUSE 11.0 lately and the majority of them boiled down to audio.

Here is a list of a few:

1. VLC required root to have audio, wtf?
2. Sound would crash after listening to any audio for an extended period of time (music, video, flash).
3. If my audio crashed, Firefox could not start up until I did rcalsasound restart
4. Some videos were slow/choppy.

So, you are probably asking, how did I fix all these issues?

zypper rm alsa-plugins-pulse
zypper addlock alsa-plugins-pulse

This removes the alsa plugin for pulse and locks it so it will never install again. Without the alsa plugin installed, the apps go back to using alsa directly. This has fixed every issue I’ve had with openSUSE 11.0 so far.

June 19, 2008

Marc Christensen
no nic
Mecworks
» Pidgin support for MSN sucks!

Wow, I have several friends that use MSN and I use Pidgin to communicate with them. They have told me time and time again that I always appear off line when I am not or have been on line all day. I get this message a lot: “Message could not be sent because a connection error occurred:” when sending messages to them.

It really sucks because these are people that I need to communicate with and that I need them to know when I am online. It happens from work and home. I’m using OpenSuse 10.3 x86_64 with pidgin-2.4.1. A google search reveals that this has been going on for sometime and that it has been affecting a lot of people…That’s too bad.


Gabriel Gunderson
gundy
gundy dot org
» OpenSuse 11

To all my OpenSuse friends:

In the past, I’ve made fun of your distro while you where not around.
I’ve poked fun at your package management.
I’ve installed over OpenSuse with other distros.
I’ve blown away partitions reserved for OpenSuse.
I’ve ignored your releases.

But today, that all changes. Today, I give it a fair shake.

I’ll let you know what I think in a week.

» Extend Your Battery Life With Powertop

If you use a Linux laptop and have not heard of PowerTop you really need to keep reading!  This is a fantastic tool for extending your battery life written and published by Intel.  I use it constantly on long flights and my battery lasts long enough for a cross-country flight.

Installing Powertop

PowerTop is available in the Ubuntu repositories so its a really easy installation:

sudo aptitude install powertop

Once you’ve got it installed start things up using:

sudo powertop

This application will scan your machine for 5 seconds and then tell you which hardware or application is causing the most drain on your machine.  The best part about it is that it’ll offer you suggestions along with shortcut keys to disable the feature or hardware in order to conserve power!

Some of the common things that powertop suggests disabling on my machine are bluetooth, wireless and add-on storage (cdrom, usb-devices, etc).  Disabling these few things can extend my battery up to an hour (depending on the software I’m running, of course).

I really suggest checking out powertop for any laptop user.  It should be part of your base installation setup.  What luck have you had with powertop?  How long can you extend your battery life?

Related

June 15, 2008

Dennis Muhlestein
nonic
All My Brain
» Timing C/C++ Code on Linux

For my last post, I played around with C++ and a little programming competition. While on the topic, I decided I'd get slightly more serious and enter the next challenge. One of the things that slightly annoyed me during the process is having to compile/run the program on Windows to enter the competion, while I'm [...]

June 11, 2008

Hans Fugal
no nic
The Fugue :
» My Studio

Well, I've spent two days doing actual work in my studio and I can now confidently report my settings for the benefit of Linux-running MacBook users (and other related hoodlums).

I won't go into the detail that I did in the previous posts, most of which is still relevant.

I pass the option position_fix=3 to the module snd-hda-intel. I did this by creating /etc/modprobe.d/local, containing: options snd-hda-intel position_fix=3

then running sudo update-initramfs -uk all.

I set up my Gnome session to run QJackCtl, which is in turn configured to start JACK on startup. My JACK settings (from ~/.jackdrc) are: /usr/bin/jackd -R -t2000 -dalsa -dhw:0 -r48000 -p1024 -n2 -s

JACK is extremely stable. I've had 2, maybe 3 xruns through two days of work, and those were when starting up applications, not when actually using them.

Now, since we have only one audio device and JACK has monopolized it, and we want to hear other than JACK, we need more configuration. Here is my ~/.asoundrc:

# Set the default device to PulseAudio for all well-behaved ALSA applications
pcm.!default {
        type plug
        slave.pcm "pulse"
}
ctl.!default {
        type plug
        slave.pcm "pulse"
}

# This device can come in handy, but I mostly don't use it.
pcm.jack {
        type plug
        slave {
                pcm {
                        type jack
                        playback_ports {
                                0 alsa_pcm:playback_1
                                1 alsa_pcm:playback_2
                        }
                        capture_ports {
                                0 alsa_pcm:capture_1
                                1 alsa_pcm:capture_2
                        }
                }
                rate 48000
        }
}
ctl.jack {
        type hw
        card 0
}

# The acutal PulseAudio device
pcm.pulse {
        type pulse
}
ctl.pulse {
        type pulse
}

Now all well-behaved ALSA programs will use the default ALSA device, i.e. PulseAudio. PulseAudio needs to be configured now to use JACK. You'll need to get the pulseaudio-module-jack package, which probably means you'll need to build it yourself. I show you how to do that and how to configure PulseAudio in a previous post. Incidentally you need to do the same for libasound2-plugins if you want to use the JACK plugin for ALSA as in my asoundrc above.

Now we have a bit of a chicken and egg problem. PulseAudio starts when you log in, and so does JACK (by way of QJackCtl in your Gnome session). But PulseAudio will fail to start if JACK isn't already running. What's more, if you decided you wanted to restart JACK for whatever reason, you'd have to restart PulseAudio too. So here's how I solved it. I leave ESD enabled in the Gnome sound settings, knowing that it will fail to start (and I won't get the really cool Ubuntu Studio startup ditty, but oh well). It needs to be checked if you want Gnome to make nifty system sounds. Now, in QJackCtl setup, on the options tab, check the box for "Execute script after Startup" and put "pulseaudio -D" in the box. Now PulseAudio will start whenever JACK starts, and it will stop/crash/whatever whenever JACK stops.

Now, you need to install libflashsupport to get Flash working with PulseAudio. Even so you might find occasional sites that crash it.

That about covers it. If you do much work with audio applications using complicated JACK graphs, don't overlook the power of QJackCtl's patchbay, which will automatically hook things up. I have a patch that will connect Aeolus to system output 3&4 (headphones/external speakers), and hook my MIDI keyboard to Aeolus. So all I have to do is start Aeolus and pull some stops and I'm ready to play.

Which reminds me, there's still the annoying thing about JACK having 8 outputs (for surround sound) and the internal speakers are on outputs 1&2, and the headphone jack is outputs 3&4. If you're not getting sound from a JACK app and you think you should be, that's the first thing to check. Someday I plan to figure out the .asoundrc magic needed to set up JACK so that it's a regular stereo device sending sound to both the internal speakers and headphones. If you know how, please enlighten us in the comments. I know it can be done, I just haven't put in the time to figure it out and test it.

June 10, 2008

Corey Edwards
tensai
zmonkey.org - Those crazy monkeys
» Recovering After a MySQL Replication Failure

I just solved a weird MySQL replication problem and thought I would share with you all. First, the background. I have a master and slave running with one-way replication. The slave just sits by waiting for his time to shine, but otherwise doesn't do anything. Well, last week the master had a problem with the filesystem. I can't recall exactly what it was, out of space or something. It confused the heck out of the master and so it basically shut down. One of my co-workers fixed the problem and got the master running again, but the slave was in a pickle. Here is the error it was showing:

Relay_Master_Log_File: mysql-bin.031
     Slave_IO_Running: Yes
    Slave_SQL_Running: No
           Last_errno: 0
           Last_error: Query 'DELETE FROM foo WHERE bar = 1' caused different errors on master and slave.
                       Error on master: 'Got error %d from table handler' (1030), Error on slave:
                       'no error' (0). Default database: 'baz'
  Exec_master_log_pos: 118871

Because it thought the command failed on the master, it refused to continue. I can't say it's an altogether bad plan since data integrity is generally the main theme of a database (yes, cue the jokes about my using MySQL in the first place). The question became, how do I get the slave to start up again. "SLAVE STOP; SLAVE START" didn't have any effect.

The trick was suggested to me by a post at mysql.com which pointed out a tool new to me, mysqlbinlog. See I figured the simplest thing would be to restart replication at the step just after the "failed" transaction, since I knew that transaction had actually succeeded. But I have no idea how the binlog counters work, so I couldn't just make up numbers. It's some kind of binary offset. Well, mysqlbinlog will show it to you.

# mysqlbinlog mysql-bin.031 -j 118871 |less

Which of course showed me this:

# at 118955
#080605 18:59:09 server id 1  log_pos 118955    Query   thread_id=3218  exec_time=0     error_code=0

So on my slave I restarted replication at offset 118955 and like magic, the slave ripped through the binlogs and caught up in practically no time at all.

read more


John Anderson
sontek
sontek ( John M. Anderson )
» Official OpenSUSE Forums

Great news! The official openSUSE forums are finally here, combining the awesome communities from suseforums.net, suselinuxsupport.de and the openSUSE support forums at forums.novell.com.

If everyone could try to spend a half hour each day browsing the forums to help new users, it would benefit the whole community. openSUSE is growing fast and these forums fill a huge gap in our community for new users.

Without further adieu, http://forums.opensuse.org/

» openSUSE 11.0 RC2 - Please do final testing!

Coolo was nice enough to leak us the RC2 LiveCD’s for openSUSE 11.0 RC2, please download and do final testing to make sure we have the best openSUSE release. Get them here

Features to test can be found here and as always, check most annoying bugs.

June 9, 2008

Scott Morris
nexangelus
OpenSUSE Linux Rants
» Mobile Linux: The Best Choice for Smartphones?

Introduction

Explain to me the draw people have to technology. Lacking psychology credentials (other than psychosis), I would be unqualified to expound in great detail. That said, there are a few things that I have noticed about people and their attitudes towards computers and other types of electronics. Based on these attitudes and some current trends, I wanted to provide a type of forecast. Where are things going with regards to electronics and the embedded operating systems that run them?

Concepts of Consideration

To start off, let’s consider the concept of convergence. To put this simply, people love combining functionality of stuff. Take cars for example. Take me from point A to point B. Primary function: transportation. Well, except if it’s 132 degrees outside, then it’s too hot. Put me an air conditioner in there. OK, now we have a duality of purpose: transportation and comfort. Oh, wait. If I am driving from Barrow, Alaska to Punta Arenas, Chile, I will get very, very bored. So, could we throw me a radio into my car, too? My kids will get bored with my music, so give them a DVD player for the back. And let’s have GPS, and a radar detector. All of a sudden, we have convergence of several different technologies into one product. People like to combine things.

Next point, we’ll consider a couple of different types of computer users. As an example of the first type, we’ll make up someone called Michael. He likes to play it a little safe, stay in his comfort zone. His philosophy is to go with whatever you know. If it isn’t broken, don’t fix it. He doesn’t like to waste time trying to figure things out. Our fast-paced (and gaining momentum) society encourages users like Michael. Take the tools that you know, and get productive right now.

For my second type of user, we’ll make up someone called Duran. He doesn’t like to be restricted with his options. He likes to be free to choose and do what he wants. He doesn’t mind tinkering with hardware or software to get it working the way that fits his needs. He doesn’t mind taking some time to learn about how things work. After all, this does give experience in the future.

Michael was likely raised using Windows, just because of sheer statistics and probability. This means that he will want to continue using Windows and would likely be hesitant to change, because Windows fulfills his current needs. His first reaction to Linux will be to reject it on account of its reputation of being hard to use. Besides, it’s different, and that means a learning curve. Michael is not interested. What he has and does works for him already, why change?

Duran, on the other hand, doesn’t care about learning new things. As soon as he hears that there’s a free operating system called Linux that may just do what he needs it to, he immediately looks into it. After a bit he gets it up and running. After a month or two, he finds that he can make it do everything he needs it to. He may have to work with it a bit, but he is all good with hands-on. He begins using Linux exclusively.

What has happened, now? Let’s consider it for a second. Michael doesn’t even know all that Linux has to offer, because he doesn’t have enough experience with it. He still prefers his comfort zone, and is resistant to change. He continues doing what works for him, and paying a healthy amount for these privileges. Windows isn’t free.

Now if we think about it, Duran now has the benefits of both situations, without the drawbacks of the first. Remember, the first type of person likes a comfort zone, likes to go with what you know, and just get productive. This is Michael. Duran now has a comfort zone in Linux and knows how to be productive with it. He gets the benefits of Michael’s situation without the restrictions. He also gets the benefits of being able to set things up however he wants because of the options available to him. Duran grows and learns and becomes more productive as Michael stays the same, a slave to his resistence to change.

For a long time, Linux has definitely been too hard for a regular computer user. You know the type, they check email and surf the Internet. Why spend 3 months learning a new operating system just to do that? For most of its life, Linux has been for the hard-core techies only. This is not the case anymore. Read the latest reviews of Ubuntu, Fedora, or OpenSUSE. They are more point-and-click than they have ever been. Linux is now moving over into the realm of Michael. More and more things just work, less and less time figuring out how to get stuff working. Applications are getting much easier to use (OpenOffice, Firefox, Thunderbird). Just install and begin working. In many cases, LiveCDs even allow us to omit the installation, giving us the power to be immediately productive.

We have the principle of convergence, the concept of going with what works, and the concept of freedom of choice.

In-house or Pre-packaged?

What happens when a company needs a software application? They have two choices: develop it in-house, or buy something pre-packaged.

In-house development means that the company has to allocate time and financial resources to develop and test the software. Most of the time, reasons for in-house development stem from a desire to customize it to the exact needs of the company. However, it becomes very expensive in terms of time and money. In the end, the in-house application may or may not be of the same commercial quality as the pre-packaged solution. Likely, it isn’t (possible, but usually isn’t).

The problem with propietary, off-the-shelf software is that it’s much less customizable to the company’s needs. They have to wait on the vendor for security updates. They don’t have access to the code to change things around as they wish.

The choice then becomes one of two things: Spend a lot of time and money to develop a decent in-house customizable solution, or purchase a well-developed commercial solution immediately but is not nearly as customizable?

Let’s complicate this situation. The software will be embedded to power an electronic device, such as a mobile phone.

This is the situation that many mobile carriers find themselves in right now. Verizon has usually just flashed their own OS onto the phones sold to their customers. They spent a bunch of time and money to develop a mediocre operating system that fills the need. Decent, easy enough to use, but charge a bunch for extra features.

Cellular providers like Verizon need an embedded operating system. So far, the pre-packaged solutions haven’t really been up to snuff for many users, especially the technology-savvy. In-house solutions have been lacking, as well. And remember the convergence concept? Customers are now demanding ever more functionality from their cell phones that is currently not possible for many cellular carriers. The current Michaels are fine with what there is. The Durans, however, are going crazy.

These companies need something that already exists, that is tested, proven, and covers the basics. They need something that won’t cost them precious time and money to develop, and will end up being better than what they’d end up delivering anyway. They need something that they can take and modify to fit their needs, and embed it into their phones. Then, they don’t have to gouge the customers for the cost of the development for the OS, and can sell phones that have more functionality for less money. They should also leave the OS open for developers. This will allow people to fill their own demand, as has occurred with Linux as it stands. Then, the Michaels and the Durans will both be happy.

Michael can take it standard as it comes and just use it as it is.

Duran can get into it, install and remove ringtones and wallpapers. He can install and remove software as he wishes.

Verizon’s Strategies

Now apparently, I’m not totally off my rocker on this, because of Verizon’s recent activities. They have recently appeared on the LiMo Foundation’s member list (obviously not a small list)

. The purpose of the LiMo Foundation, from their site:

“LiMo Foundation is an industry consortium dedicated to creating the first truly open, hardware-independent, Linux-based operating system for mobile devices. Backing from major industry leaders puts LiMo at the Heart of the Mobile Industry and makes LiMo the unifying force in Mobile Linux.”

“The mission of the LiMo Foundation is to create an open, Linux-based software platform for use by the whole global industry to produce mobile devices through a balanced and transparent contribution process enabling a rich ecosystem of differentiated products, applications, and services from device manufacturers, operators, ISVs and integrators.”

Verizon’s entrance into the LiMo Foundation is only one thing they’ve done. How about their Any App, Any Device initiative? Essentially, anyone can develop any hardware and have it certified by Verizon. How does Verizon accomplish the Any App part? By using Linux. The LiMo foundation gives them this.

And how would they make this possible? How about the C Block of the 700MHz spectrum that Verizon won? Combine all this, and we are going to see some sick hardware and software spew forth onto the scene. Convergence, remember? Maybe we’ll finally have videophones?

Virtual Reality Enemy Territory LAN Party over the C Block of the 700MHz spectrum of Verizon’s network, anyone?

Think Verizon’s the only one who knows all this? AT&T walked away with a chunk of the 700MHz spectrum, too. You think the current 3G networks are cool? Verizon and AT&T are both developing 4G networks.

Forget about whether open source is going to happen, or whether Linux will appear on more than just PCs. It’s already happening. Looks like it might be a good time for those who dig open source stuff to consider Verizon, or any other carriers supporting Android or LiMo.

Forget about whether open source is going to happen, or whether Linux will appear on more than just PCs. It’s already happening, and fast.

Looks like it might be a good time for those who dig open source stuff to consider Verizon, or any other carriers supporting Android or LiMo.

And if you are already using Verizon, I have a free 53-page ebook available on how to get the very most out of being their customer. This ebook makes Verizon’s current phone OS feel like it’s already open source. Plus, it can save you over $300 in accessories and other stuff.

The Future

Let’s take it further.

How long until we have an open-source main-stream gaming console designed for Linux? I was looking at a 1080p PS3 game the other day. Power something like that with Linux.

What about computers in vehicles? We currently have GPS systems. What about throwing Linux on there? Put a Media center in it (mythtv?) along with some open source GPS software. If people want to make it even better, let them. Then, let everyone else have the software updates free.

Even more, how long until we can make an Any App, Any Device appliance that certifies with Verizon that does ALL of the above?

Proprietary OSes cannot keep up with the demand for diversity. People want too many different things right now. And when the proprietary OSes can deliver something, security and stability are the first things to go, as we have seen with what comes out of Redmond.

Open Source can keep up because there are unlimited amounts of people who can work on it. If someone wants something bad enough that isn’t currently provided, they can write it themselves if it’s an open platform.

Gates and MS have been going almost 30 years. Linux has been in development just more than half that, and it’s good enough to be displacing hundreds of thousands of MS desktops. When Linux has in production for 30 years, we’ll compare it to how much Windows developed in 30 years.

Can proprietary work with mobile phones? Obviously.

Will further progress be made faster by everyone working together? Absolutely no doubt. The costs of the initial development of the OS drop drastically. Customers get what they want, making it easier to add whatever they want (which they will, anyway). Michael gets something that’s easy to use, and Duran gets something that he can hack to his heart’s content.

Blow me off if I’m totally crazy. But honestly, we have seen Mobile Linux predictions before.

Conclusion

People want something that will just work for them and do what they expect. Other people want options and configurability. Linux is very rapidly approaching the ability to provide both of these. People also want to have their PDA, phone, MP3 player, and GPS all on one device. Linux has the potential for doing all of this. And people are in love with mobile phones. Linux on mobile phones is what will make all of this work. So there’s my prediction, and where it comes from.

June 8, 2008

Aaron Toponce
atoponce
Aaron Toponce
» What About Interoperability?

Tomorrow is my birthday, so yesterday, my wife and I went to a local electronics store, and purchased a 1 TB hard drive to store family photos, videos and other data. The only requirement, is that the drive’s filesystem be compatible with both Mac OS X, and Ubuntu 8.04. I figured this was a non-issue, as it’s 2008, and computing has come leaps and bounds over just the last 5 years. We purchase the drive and come home.

First thing I do, after unpacking it of course, is pull up Wikipedia to see what my options are as far as compatibility between the two operating systems. As far as legitimate native filesystem support, here’s the page I found: http://en.wikipedia.org/wiki/Comparison_of_file_systems#OS_support. Comparing Mac to Linux, my only options are crap:

  • FAT12/16/32/NTFS- Suffers from BAD block fragmentation. While I don’t plan on deleting data a lot from the drive, should I ever need to, I don’t want to have to sit there and defrag my drive everytime I turn around. Further, the FAT-family of filesystems have disk limits that keep me from taking advantage of a full terabyte anyway.
  • HFS- Three main problems with this filesystem: 1) it suffers from a write queue where only one application is allowed to write at a time. In other words, not a multi-tasked filesystem. 2) I’m limited to 65,535 maximum files on disk. With a 1TB drive, I’m not too terribly excited about that. 3) With large disk space, HFS suffers badly from wasted disk space, as files must occupy the entire allocation block size. With a 1GB disk, this is 16KB. If a file size isn’t a multiple of 16KB, then you have wasted disk space.
  • HFS+- This would be a fine solution, if in Linux, I wasn’t required to make the partition a multiple of 4K. Every time I try a “mkfs.hfsplus /dev/sdb1″, I get an error. I don’t want to make the partition smaller, thus eliminating disk space, just so I can make HFS+ happy.
  • ext2- With a 3rd party tool, Mac OS X can read and write ext2 filesystems. This is good news, as ext2 has proven to be reliable, stable and robust. However, the tool for OS X has not been updated since 2006, and it seems the developer has abandoned the project. With outstanding bugs, this doesn’t inspire confidence in the tool.
  • Now, let me make one thing clear. I do not have a computer with USB 2.0 or Firewire 400 that I could plug this into for NFS. Otherwise, NFS would be my option, as I could put any filesystem on it I wanted to, and we’d be done with it.

    Needless to say, this is 2008, and I’m not too terribly excited with the lack of operating system interoperability right now. Are we still playing games of “My OS is better than your OS”? Please.

June 5, 2008

Aaron Toponce
atoponce
Aaron Toponce
» What Goes Out Can Come Back In

Remember the old saying “What goes up must come down”, referring to the gravitational pull? Well, I have a similar saying for firewalls: What goes out can come back in. This is a cool SSH trick that will stump even the most seasoned network administrators.

The trick is port forwarding. The idea is that a box will be listening for connections on a port that you specify. If a connection is made, the packets are then transferred through the SSH connection to the box at the other end on a different port that you have specified. So, the obvious is, you need access to an SSH server to make this possible. Let’s take a specific example.

I’m at work. The company mail server is not accessible from the Internet, so when I get home, I can’t read my corporate mail. One specific day during the week, however, I need access. I try to convince the network administrator to punch a hole in the firewall, or at least give me VPN access, but nothing. No ports open for tightest security is his approach. So, seeing as though I have access to an SSH server at home, I open an outbound port that will allow me to connect back in. In otherwords, piggy-backing off of the SSH connection to my home SSH server. I issue the following command from work, just before I leave:

ssh -R 22225:mail.company.com:25 -fN ssh.home.com

What is this saying exactly? It’s saying that the SSH server on ssh.home.com will be listening for mail traffic on port 22225. When a connection is made, the packets will be forwarded through the SSH connection to mail.company.com in the corporate office on port 25. As far as the connection is concerned, mail.company.com received a port 25 packet as if it came from the box internally on the corporate LAN. All I need to do, is launch my favorite email client that supports TCP proxies, and connect to ssh.home.com on port 22225 to make the connection. Simple as pie.

Let’s look at another example:

ssh -R 22222:foo.example.com:22 -fN ssh.home.com

This example is saying that the SSH server on ssh.home.com will be listening for SSH traffic on port 22222. If a connection is made, the packets will be forwarded through the SSH connection to foo.example.com in the corporate office on port 22. This is a great way to get SSH access to machines in the office that are not accessible to the Internet.

Cool, eh? Who would’ve thought that the developers of the most secure-by-default Unix, OpenBSD, would be providing me with simple tools to bypass firewalls?

Now, the question remains, what about the firewall? My only response- what about it? If you have an outbound Internet connection, your only task may be to find out what port is open for the outbound connections. If you have access to an SSH server that you can configure, then change the port on the SSH box to match your corporate outbound port, and you’ve effectively bypassed any and all firewalls that may be in place, both out an in. The only way, the ONLY way you can keep me from bypassing your firewall is to completely cut outbound connections to the Inertnet. Completely, and totally isolate the corporate network. Then, you have a impenetrable firewall.

So, as I mentioned earlier, “What goes out can come back in”.

June 4, 2008

Hans Fugal
no nic
The Fugue :
» PulseAudio as a JACK Client

I spoke too soon about not being able to get PulseAudio working as a JACK client. I found this post that tells you how to do it.

The key I think is chmod -s `which pulseaudio`. I didn't have to start the JACK transport rolling, so that may be antiquated information. I did have to build some packages from source, though:

sudo apt-get build-dep pulseaudio
sudo apt-get install libjack-dev
fakeroot apt-get source -b pulseaudio

This creates a bunch of .debs, including pulseaudio-module-jack*.deb. I just installed them all, but you can probably just install the jack module deb. Make the changes permanent by putting them in ~/.pulse/default.pa or in /etc/pulse/default.pa and you're in business.

» JACK on the MacBook

I spent the better part of two days fine tuning my linux audio setup on my MacBook, so maybe I can save anothe MacBook user some time with this post.

The sound card in this thing is an Intel HDA Controller, driven by the kernel module snd-hda-intel. Intel HDA cards (usually onboard cards) are looked down upon and generally derided, and I can testify with good reason. Like all sorry excuses for an audio card, it has only one subdevice which means only one application can use the card at a time. (If you want to know if your audio card is cheap, this is a good indicator—just look in /proc/asound/card0/pcm0p/info for subdevices_count)

Luckily in these modern times, the default ALSA device does software mixing (dmix), so even on a cheap card you can usually hear more than one application just fine. No, no, you do not need PulseAudio for this. In fact, PulseAudio steals the audio card in its default configuration (at least on Ubuntu 8.04). So if PulseAudio is running, applications that aren't PulseAudio aware (or ESD aware) will simply not be able to make sound. There are other misbehaved kids on the block, but they're fairly rare. The difference is that a well-behaved application will grab the default ALSA device, instead of the first audio card in the system explicitly, hw:0. PulseAudio in fact advises the use of this trick, to set PulseAudio as the default ALSA device, which I suppose explains why PulseAudio grabs hw:0 by default. Unfortunately Ubuntu is only halfhearted here—it enables PulseAudio but does not set up the default ALSA device to point to it. So in Ubuntu you need to either set up the default ALSA device with an ~/.asoundrc that looks like this

pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

or you need to configure PulseAudio to use the default device instead of hw:0. If you are going to be using JACK too (and you want to hear other applications outside the JACK pipeline when JACK is running), I recommend the latter, though if you're twisted enough you might try JACK as a PulseAudio client.

JACK also by default grabs hw:0, because JACK is all about low latency and high performance and going through dmix adds a layer of overhead. If you're using JACK, you may be enough of a snob that you're ok with leaving those non-JACK applications out in the cold while JACK is running. In fact you may not want to hear Pidgin sounds (for example) at all while you're doing audio work. Semisnobs like myself, though, might want a compromise. Setting up my studio just the way I want is enough of a pain, I really don't want to quit all my JACK applications just so I can listen to Last.fm or watch sb_email.

Now at this point I would be remiss if I didn't mention the very cool JACK plugin for ALSA. It allows you to make well-behaved ALSA applications (the ones that use the default device or allow you to configure which device is used) go through JACK. I modified my .asoundrc in a manner slightly different from the example given:

pcm.jack {
        type plug
        slave {
                pcm {
                        type jack
                        playback_ports {
                                0 alsa_pcm:playback_1
                                1 alsa_pcm:playback_2
                        }
                        capture_ports {
                                0 alsa_pcm:capture_1
                                1 alsa_pcm:capture_2
                        }
                }
                rate 48000
        }
}

Then if you want to make the JACK plugin the default, you add

pcm.!default {
    type plug
    slave.pcm "jack"
}

I tried configuring PulseAudio to use the JACK plugin, but it would crash on startup. Last.fm's client also had issues—it will play fine for one song and then crash jackd when the second song starts. So unfortunately it doesn't look like the JACK plugin for ALSA is quite ready for prime time, but you can certainly use it from time to time in applications that let you choose the ALSA device.

Unfortunately, the JACK plugin isn't found in Ubuntu's libasound2-plugins package where it belongs. It's an easy remedy, however, just install libjack-dev and fakeroot, then build the package from source (you don't even have to patch it):

apt-get install libjack-dev fakeroot
apt-get build-dep libasound2-plugins
fakeroot apt-get source -b libasound2-plugins
sudo dpkg -i libasound2-plugins*.deb

Getting Ubuntu to not annoy you constantly about "upgrading" that package is another story.

Ok, so now to the meat of this post. JACK does not work well on this sound card with its default settings. It either has an insane number of xruns, or it sounds terrible. For quite some time I chased the red herring of the position_fix parameter to the snd-hda-intel module, and I can report with confidence that on this hardware you don't want to change it from the default (0, which is auto). However, if you are only concerned with JACK, you will want to change it to position_fix=3, which gives rock-solid JACK with the default settings on hw:0. However, although JACK or other direct-to-hw:0 applications sound fine, dmix sounds crackly using position_fix=3. So it's probably not a good all-around solution if you're interested in more than just JACK.

The first order of business in good JACK performance (on any system) is to enable realtime. Edit /etc/security/limits.conf and add something like this:

@audio - memlock unlimited
@audio - nice -10
@audio - rtprio 99

Now (after logging out and back in) you should be able to pass the -R option to jackd and get realtime.

If you do jackd -R -d alsa (unless you use position_fix=3) you will get lots of xruns. The best I have been able to do is jackd -R -d alsa -p 512 -n 4, as it seems that the trick is getting at least 3 periods (and to do that with hw:0 you have to reduce the period size). This works well but qjackctl reports lots of xruns still. Actually, they're mysterious messages like this

delay of 5152.000 usecs exceeds estimated spare time of 4071.000; restart ...

which don't actually cause an audio blip (but you will get an occasional real xrun). I still need to try the realtime kernel (linux-image-rt package) to see if that might help here. In my early tests (mostly playing with position_fix) the realtime kernel was actually doing worse than the generic kernel, but that was before I learned the number of periods should be at least 3, so I need to test again.

If you run jackd -R -d alsa -d default you will theoretically be able to use JACK and other applications at the same time via dmix/dsnoop. JACK will complain

You appear to be using the ALSA software "plug" layer, probably a result of using the "default" ALSA device. This is less efficient than it could be. Consider using a hardware device instead rather than using the plug layer. Usually the name of the hardware device that corresponds to the first soun

[sic] but pay it no heed, we're doing this on purpose, and actually are able to get better performance than the hw:0 route (with position_fix=0). That command will not actually work, though. It will crash within a minute even without any clients. Again the fix seems to be the number of periods, but this time we can avoid the excess delay by leaving the period size at 1024 (at the cost of some latency, of course). So, jackd -R -d alsa -d default -n 4. This is rock solid. It went all night without a single xrun. (But it wasn't doing much, though Ardour, Aeolus, and Hexter were "running". I was able to play around with them for a half hour or so with no xruns before I went to bed.) However, sometime down the road it will miss a deadline and it will crash. This crashing seems to be specific to using dmix, usually you'll just get an xrun. The workaround is to use softmode with the -s switch. Now you can run JACK 24/7 with excellent performance and without locking other applications out of the soundcard.

So in summary, if you don't care about dmix but only JACK (or any other application using hw:0, which can be all of them if you change your .asoundrc, but only one at a time), set position_fix=3 for snd-hda-intel e.g. in a file in /etc/modprobe.d/ with a line like this: options snd-hda-intel position_fix=3, and do update-initramfs -uk all. If you want a more balanced setup, where you can have JACK running and other well-behaved ALSA applications can use the sound card, leave the module parameters alone and set up realtime and use the following command to start JACK (or equivalent settings in QJackCtl):

/usr/bin/jackd -R -dalsa -ddefault -r48000 -p1024 -n4 -s

If you want to use PulseAudio in this situation, configure it to use the default ALSA device instead of hw:0.

If you like PulseAudio and JACK both, the ideal situation would be PulseAudio using JACK as a backend, JACK using hw:0 with position_fix=3, and the PulseAudio plugin as the default ALSA device. Unfortunately this is just a theoretical ideal, and doesn't work (yet) because of bugs.

And finally, if you have no or limited use for JACK, but want to use PulseAudio, just change your .asoundrc as above to make PulseAudio the default ALSA device, so that all applications, ESD aware or not, use PulseAudio.

Oh, and I almost forgot to mention the mixer. There's Master, PCM, Front, Surround, Center, LFE, Side, and various toggles. AFAICT the Front controls the internal speakers, and Surround controls the headphone volume. JACK on hw:0 has 8 system ports. The first two correspond to the front speakers and the second two to the headphone jack. When you run JACK on default, it's simply stereo output, and goes to the speakers or the headphones if they're plugged in.

Finally, I regret to report that JACK on default will crash on resume (on hw:0 it won't, at least with position_fix=3).