Linux Blog

BSOD Humor

Filed under: General Linux — TheLinuxBlog.com at 11:36 am on Monday, July 7, 2008

Had a great time yesterday, a friend of mine came over. After dinner he was looking at some t-shirts since an advertisement had distracted him from his initial IMDB search. Some how this made him decide he wanted to make my desktop background a BSOD. I’m a big fan of the BSOD screensaver, and think its funny, whats even funnier is he figured out how to change my background on KDE (although it’s not that hard)

I saw the BSOD with the horrible background just staring at me. It was the classic, “there was an error processing your error”. I never see such things on my Linux box, I’m more used to failed reboots from failing to compile a kernel feature, so jokingly I click on the message box while laughing:

“Why won’t this go away”

Some people find humor in other peoples agony, this is why the TV series (and movies) Jackass do so well. I find humor in BSOD’s and hope that other Linux admin’s do to. But having a BSOD on your Linux box that’s not a screen saver is quite annoying, its like “Gates strikes back”

Here’s a poster I found amusing the other day:

Credit http://www.joyoftech.com/Billy Gates

Creating Dialogs with Dialog

Filed under: Shell Script Sundays — TheLinuxBlog.com at 5:48 pm on Sunday, October 21, 2007

Have you ever seen those pretty dialogs used in Shell Scripts such as the Slackware installation, the slackpkg program or even the NVIDIA driver installer? Well, my friends to display dialog boxes from shell scripts is very easy with… you guessed it – Dialog.

First of all, there are many different types of dialogs that you can create they are as follows: calendar, checklist, fselect, gauge, infobox, inputbox, menu, msgbox (message), password, radiolist, tailbox, tailboxbg, textbox, timebox, and yesno (yes/no).

This blog post is intended to be a primer on using dialog. More examples will be posted in future blog posts in the Shell Script Sunday’s column.

The simplest form of a dialog in a shell script is probably the msgbox. All this really does is displays text. To display text in a dialog you would do the following:

owen@the-linux-blog:$ dialog –msgbox “Hello from the Linux Blog!” 5 50

The numbers after the text in quotes are the widths and heights of the box. The minimum height that I like to use is 5. The width doesn’t really matter as long as it is big enough. It is good to keep the box sizes standard across a whole script because it gets annoying with constantly resizing boxes.
If the text in a message box is too long it will auto wrap around and give you a type of scroll bar. As follows:

owen@the-linux-blog:$ dialog –msgbox “Hello from The Linux Blog. This text is so long it wraps it to a New Line” 5 50

Dialogs can be canceled. Clicking Ok or pressing enter/return returns “true” and pressing escape or Ctrl+C returns a false.
The simple shell scripting syntax shown in Shell Scripting 101

is used for this:

owen@the-linux-blog:$ dialog –msgbox “Dialog Exit Example” 5 50 && echo “ok” || echo “false”

Another simple dialog example is the Yes/No box. The syntax for this is exactly the same as the msgbox example except instead of using –msgbox, –yesno is used. The difference between a msgbox and a yesno box is that there a two buttons. It is pretty obvious as to what they are labeled, but for those in the back, I’ve included an example and some screen shots anyway.

owen@the-linux-blog:$ dialog –yesno “Are you learning anything from this blog” 5 50 && echo “Yes, thanks Owen.” || echo “No, Write some better Linux Related Posts”

The Linux Blog - Dialog Example - Yes / No

Thats about all I have time for this week. Check back next week!