Adventures of a Xipe Totec

Assorted bollocks relating to my life, free software, and ideas the world over.

Archive for the ‘Linux’ Category

Getting Suspend and Hibernate to work with compiz fusion and the NVIDIA binary driver on a Dell E1505N

Posted by xipietotec on July 15, 2007

I spent several hours hacking this today, and I finally have a surefire (if somewhat hacky) way of getting suspend and resume to work on my Inspiron E1505N.

Because of a bug in the NVIDIA Binary (which supposedly is going to be fixed this september), compiz-fusion crashes pretty much everything on resume.

First: So the first thing you’ll need to do is update your /etx/X11/xorg.conf and add an


“Option “NvAGP” “1″
line in the “Section “Device”"

Section "Device" ... Option "NvAGP" "1" EndSection...


Second:
Disable warm-booting and vbe post/save options on resume by editing your /etc/default/acpi-support:

... # Should we attempt to warm-boot the video hardware on resume?POST_VIDEO=false # Should we save and restore state using VESA BIOS Extensions?SAVE_VBE_STATE=false ...


Third:
Create a file called 25-compiz-kill.sh in your /etc/acpi/resume.d/ After creating it, type in terminal: sudo chmod 711 /etc/acpi/resume.d/25-compiz-kill.sh

#!/bin/bash#/etc/acpi/resume.d/25-compiz-kill.shkillalll compiz.real

Fourth: Create a file in /etc/acpi/resume.d called 99-compiz-resume.sh
            Then type: sudo chmod 711 99-compiz-resume.sh

Edit this file to have the following

#!/bin/bash#/etc/acpi/resume.d/99-compiz-resume.sh export DISPLAY=:0.0sudo -H -b -u your_user_id compiz --replace &

And lastly, go into compiz-config settings, under General Options, and Display settings, and uncheck v-sync to blank.

And that’s it =) Now it’s important to note that this only works for 1 user. Which is generally fine for a laptop, I wasn’t able to get it to work with the $USER wildcard. If anyone has improvements to this, please let me know. I’m not very good at scripting so there’s obviously a better solution, but this is a very very simple and direct way to do it, so if your more advanced scripts fail, this is pretty much guaranteed to work.

Edit: Thanks to Andy in comments.

Posted in Dell, Linux, Ubuntu, shell | 1 Comment »

Bashisms and a call for a new posix standard

Posted by xipietotec on July 14, 2007

##EDIT##
A friend of mine just advised me of the folly of this, so I retract it. Essentially it seems that *Linux* is the culprit, that when bash is invoked as /bin/sh it should not allow non-posix compliant commands, but does.
##/EDIT##

The prevalence of bash shows that mere codification of an open standard does not in itself mean that anyone will actually follow it, and in fact this might be particularly apt when it comes to open source.

While bash of course does have a posix mode, since bash is so common as the default shell, its very uncommon to use it, and its very common to use bashisms (That is, bash specific behavior that does not conform to POSIX sh). The segue in Ubuntu from bash to dash, and the numerous broken scripts that ensued is a bit of a testament to this.

In open source in particular, because the code is available, often the superior choice is readily apparent, whatever the standard might be. This can actually provide a wide impetus for open source coders to move away from the standard because of it, creating a new de-facto standard. While with a proprietary de-facto standard there is more impetus to move toward an open standard because of the unavailability of the code, and inability to make easy (or easier) transitions from one implementation to the next.

With specific regards to the shell, the particular problem with it is the ambiguity as to what /bin/sh really means. And the unique solution actually does rely in having an open standards: create a new POSIX standard to remove the ambiguity of /bin/sh.

We allready have the Shebang, and the fairly common editor encoding line afterwards which is frequently implemented in more and more editors.

Why not create a new comment line which simply defines what /bin/sh means in the context of the script? The shell can read that line before executing the script and simulate or redirect the script to that environment. Therefore, all that would be required to transition your scripts to a new default shell is to add the comment line to the script? Versions of a particular shell that predate this implementation would simply ignore it as a comment, and you could hack the script as is done now. However it certainly makes your scripts more portable among different distros which use different default environments to have this behavior.

So that is, in short, my call for a new posix standard for shell environments.

Posted in Linux, Ubuntu, shell | Leave a Comment »

Deskbar and voice control

Posted by xipietotec on July 11, 2007

I had a thought while inspired by this little video of a hilarious attempt to use vista’s voice control and I got to thinking about just what is wrong with most attempts at voice control software, and what can be done right.

Essentially, unless you’re physically impaired (and maybe even then) you do not need voice control to work on every aspect of the OS, similarly you do not need it trying to parse input and commands all at once. Taking a lesson from Vim, you should have an input mode, a “command mode”, and perhaps a few more modes. So lets go over an example of what the program might do, comparing it to how I do things in deskbar.

If I want to open up my text editor, I hit alt+F3 and type in text, and it brings me up a list of actions: “Lanch gedit, launch scribes, etc.” all text editors, deskbar also gives me a bunch of other options, such as searching online for text, scrounging through my emails, etc.

With a Voice-deskbar like app, I’d say something along the lines of: “Computer: Open Scribes.”, I’d actually recommend something different from “Computer” such as “Linda” or “Serenity” or something else. Basically it’s a reference to tell the computer you want its attention.

Next you’d have a number of modes: Open, Input, Close, Suspend, Turn Off, Hibernate, Search, Find, Locate, Save, Dictate, Delete, etc. And maybe a visual cue to what “Mode” you’re in. This way, if you told the computer to open Scribes (or Tom Boy), You’d then say “Computer: Input.” and from there
it would save what you had said as voice input into Scribes or Tomboy. Telling it “Computer: Dictate” would instead start the record function, and save your voice as a .ogg file.

As a further example, “Computer: Search Yubnub, gis Firefly” Would search yubnub in firefox and parse: gis Firefly in it (which would in turn tell yubnub to search google image search for firefly. Hence Search is tied to the search engine field in firefox. Find would instead run the Find program in Nautilus, locate would instead use locate or tracker or beagle, respectively.

This is a far more useful application of voice control technology, than attempting to navigate menu items and such which would be better done with either the mouse or the keyboard. And I believe this is actually the right path for voice to take in terms of Human/Computer Interface. E.g., stop trying to do that which is better done by either the mouse or the keyboard.

Edit: Also, instead of using say “Computer” or any other voice command to get the computer’s attention, it could be activated via a modifier key. Such as an unused or seldom used media key, etc.

Posted in Interface, Linux, Ubuntu | Leave a Comment »

Desktop UI and Newbie Help Improvements

Posted by xipietotec on July 5, 2007

    This is just a short writeup on things I think could be done to both improve the UI of the linux desktop and also provide better help to complete newbies. First I’ll give you a look at my gnome-panel. I have it situated at the top of my screen, where the eye is naturally drawn to anyways.
    I have no bottom “window switcher” panel, because I instead use a compositing window manager (Compiz-fusion), and an application called Avant Window Navigator. It’s quite superior to the standard window-switcher applet, and also can function as a dock-bar. Anyways, take a look at my panel:

    You may be wondering what the “Start Button” is, it’s actually a program called Deskbar (I’ve just edited the icon file with my own icon)which in many many if not most ways is far superior to the standard category view style of “Application Menu” which happens to be the first icon after the start menu button. The advantage of the category view is that it’s good when you don’t really have any idea what you’re looking for, or what it’s called, in other words, when you just want to browse through your files. The disadvantage is that when you do know what you’re looking for, it’s slower than finding it via deskbar (especially since deskbar remembers the last dozen or so things you’ve done through it). What I percieve as a duplication of both effort and, to coin a term, “visual mindshare” is having to use two different applications to essentially do the same thing: quickly browse through my applications.

    Instead what would be better is to have an alternate “category” mode for deskbar. It could be brought up either through Ctrl+clicking it, or alt+F4 (instead of the default alt+f3), this would bring up a view similar to the standard Main-menu category view.

    Next, since I’ve taken to converting a few people to ubuntu I’ve taken to doing a couple of things to make their lives easier as new users. I usually leave a text file on their desktop with some very basic instructions of “what does what” and “how to do this” and “what not to do” essentially. This isn’t like the ubuntu guide, but rather a more basic explanation of what some of those strange sounding programs and such do. Another thing I do is immediately install a few Firefox extensions that will make their lives loads easier, as well as change the default UI somewhat. Have a look at my Firefox UI standard:

   
    While I install about 18 extensions (Linkification, 3 for AdBlock Plus, the theme I use above, delicious, stumble-upon, tiny menu, Perma tabs, All in one sidebar (not shown), Download statusbar, FireFTP, Unplug, Down Them All!, Cute Menus SVG, Link Alert, Colorful Tabs, and Faviconize tabs), most of them address things I think are shortcomings in Firefox’s default UI. Permanent Tabs however, is there to make their lives much easier. I immediately create a few permanent tabs: Google Homepage, The Ubuntu Guide, and The Ubuntu Forums (which I create an account for them as well).

    In the text file I leave on their desktop I also leave instructions on how to remove the permanent tabs…with a caveat to please read them first. I wish the Official Ubuntu Book was free to distribute in digital form, as It would be nice to just have that sitting on the desktop of every new ubuntu install as well.

    In my next post I’ll write down (since I lost the version I had been using) a new “super newbie guide”.

Posted in Linux, Ubuntu | Leave a Comment »

How Canonical could be the next Redhat

Posted by xipietotec on June 29, 2007

    Ubuntu offers a supreme ease of use and setup, and excellent hardware support, and incidentally I think its positioned uniquely, because of that fact, to offer more than just the standard commercial Linux server package. With Dell now offering Ubuntu PC’s (although not to businesses, but I’ll get to that in a moment), and with the first fully supported, targeted version of Ubuntu (Ubuntu Studio) out the gates Canonical can position itself to offer solutions to business much better than it could before, and also in a way other distros are not uniquely advantaged in.

    Lets take a look at Ubuntu Studio for a second, since its a specifically packaged version of Ubuntu designed for multi-media professionals. It’s also supremely slickly packaged, in as so many words: It’s cool. There’s no reason Canonical could not roll out a specific hardware, setup, and support platform just targeted to multimedia professionals. And really, with some forethought and development, there’s no reason they could also not create any number of slightly differently packaged versions of Ubuntu offering an end-to-end business solution for any particular market segment.

    They can in fact, offer the whole banana, and nothing more than is necessary. To give you an idea, imagine the following: Ubuntu Kiosk, Ubuntu Finance, Ubuntu Hotels, Ubuntu CRM. In fact, this may be a much more profitable course of them to take rather than solely focusing on the traditional linux server market, and would allow them to penetrate much deeper into business markets than solely offering blanket “Enterprise” solutions.

    To give you an idea, I’ll use something of my own experience. I work currently as a Hotelier, and not only is there essentially no open source in hotels, much of the software in general is actually quite abysmal (Fidelio Express comes to mind in particular). This especially applies to the software which is available to small-chain or non-chain hotels. The larger hotels use PMS (Property Management Systems) which are developed in house. Hyatt actually is using a 20 year old Unix terminal system (It’s actually quite good). If A company were to develop an end to end, open source, property management system (and custom back end paperwork templates and such in excel), they’d do very well at capturing a large segment of the market, and do well capturing lucrative support contracts as well. Even the large chains would likely probably like to drop supporting their in-house software (which is typically either ancient or new and buggy), and focus on running hotels.

    Now getting back to Dell not selling to businesses yet, well, this is to be expected actually. Redhat and Suse both have a very solid business reputation on the server end, while Ubuntu is both a.) brand new, and b.) something of a risk for Dell. In fact it works out to both Canonical’s and Dell’s advantage to have the starting deployment be in consumer desktops only. Canonical can establish its distro as a consumer and user friendly (to the business world, not to the allready converted) OS, as opposed to the perception of other linux distros being for back end techs. Dell essentially takes no risks by testing out Ubuntu in this way, as there would be no business contracts its obligated to support. If I’m not mistaken, even their support offerings are essentially discounted support contracts to Canonical. It also doesn’t risk unnecessarily upsetting the two business partners it already has in the Linux market, and likewise does not overburden itself with too many distro offerings in the same market segments.

    The point being, is this allows Ubuntu to gain mind-share in a way no Linux (or Unix, or BSD, etc.) OS ever has, as a solution for users, and because of that, they will be best positioned to pursue the course I have outlined above.

Posted in Canonical, Linux, Ubuntu, business | Leave a Comment »