Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Monday, 30 July 2012

JQuery Accordion Style vi Cheat Sheet

JQuery LogoOver the weekend I was able to complete an accordion style vi cheat sheet using JQuery on the Tools section of my web site. It is based on a really good cheat sheet that is linked at the bottom of my page. I just added some style changes, reordered it and made it expand or collapse sections.



If I can find the time, I'll try to make a offline version of the cheat sheet using HTML5.

Monday, 23 July 2012

Internet Usage by Operating System

Internet IconI found this interesting so I thought I would share:

Usage share of Operating Systems



For my next project at work, I was wondering what operating system to use for any activities. The original course, which this content is based off of, was written for Solaris. But I can't imagine most potential students would have that. So one way of determining operating system usage is to look at statistics gathered by browsers. So the link shows that data for Wikipedia and some other sites that gather these sort of statistics.



Some observations:

  • Windows usage is still around around 70% with most users on Windows 7 and XP.

  • iPhone plus iPad plus Android share is already over 10%. Smaller than I thought it would be, but if you think world wide usage it makes a lot of sense. Smart phones and tablets are just beginning to penetrate everywhere. And tablets are really gonna take off with 7" form factors and $200 list prices like the Google Nexus 7.

  • Mac OS X combined with Linux is only around 10%.

As another data point, I looked at the stats from one of my web sites (abbeyworkshop.com) to see what the geeks are using during the last year. Windows is still strong at 62%, but Mac OS X plus Linux jumps up to 36%. Way to go geeks!



Anyway, it looks like Windows 7 and XP are still my primary targets. But maybe I should think about Linux in the future.

Friday, 18 May 2012

Great Cross Platform Programmer's Editor

I am always looking for good tools. When I just need a text editor, I typically use JEdit. It is free, open source, and since it is written in Java, works well on Mac, Linux or Windows. However, JEdit is not always the simplest tool to configure and use.



Recently I ran across Sublime Text. For $60, you get a really nice editor, with an easy to use interface. Plus, the editor is skinnable so you have a number of options on how the editor and your code actually look. It has nice code completion features with customization options. Top that off with the fact it runs on Windows, Mac OS X, Linux. It is definitely worth a look.

Wednesday, 9 May 2012

Custom Launchers with Ubuntu Unity 12.04

Linux LogoAs you know I have been playing around with Ubuntu 12.04 lately. I found this article on creating custom launchers and Quicklists for Ubuntu unity. Being able to customize the main interface is key to any operating system. That has not always been an easy thing to do in Linux.



In the article it looks fairly easy to customize entries for specific applications. However I'm not sure you can customize an icon to launch random applications, but I intend to look into that. Anyway there are a lot of examples here you can work from and it's a very informative article.

Monday, 30 April 2012

Keyboard Shortcuts and Menu for Ubuntu Unity 11.10 and 12.04

Linux Logo I installed Ubuntu 12.04 this weekend. The Unity interface is not my favorite, but I guess we are pretty much stuck with it. Anyway, I found a couple things that make using it easier.



First, it took me a long time, but I found them. Here are the keyboard shortcuts for the Unity UI and the launcher.

https://help.ubuntu.com/11.10/ubuntu-help/shell-keyboard-shortcuts.html

These seem to be the most relevant shortcuts for controlling the UI.



I was also wishing I could get the menu back. Turns out you can with Classic Menu Indicator. Check out the details here: http://www.noobslab.com/2011/07/classic-menu-indicator-on-ubuntu-1104.html



I know they need to try to push the UI forward, but why do you have to take the menu away. It takes almost no screen real estate. These UI experiments, and that's what they are, should not be forced on us. Instead, it should be very easy for me to switch between the new interface and the old one. Both Windows and OS X do this, why can't Ubuntu?

Tuesday, 1 November 2011

Bash Command Line History Tricks

Linux LogoThis week in a training course I was using a Red Hat based Linux that had the up arrow assigned to taking a snapshot of the screen. Since I like to use the up and down arrows to navigate command lines in the Bash shell this was a bit of a bummer. However, I vaguely remembered some alternatives. Here is what I find.



EMACS Commands

By default Bash supports the use of EMACs commands to navigate through your command line history. You can move backward through the command history using Ctl-p and move forward through it with Ctl-n. Pretty much replaces the arrows.



In addition, I found out you can use Ctl-r to search through the history. After typing Ctl-r, enter the letters you are searching for and the command that best matches, is displayed. You can also modify the matched command line.



History Commands

In addition to EMACs, there are a number of commands that work with the command line history. You can use !! to run the previous command and !3 to run the command on line 3 of the history list.



I also figured out if you echo the command, (e.g., echo !5) you can use Ctl-p to go back and edit the line.



Movement Commands

Ctl-p - Display previous command line

Ctl-n - Display next command line

Ctl-a - Move to the start of the line

Ctl-e - Move to the end of the line





Search Command Lines

Ctl-r - Searches backward through the history for the letters you type

Just start typing the text you are searching for. The closest match will be displayed. The matched command line can be edited and modified.



History Command



history - Display the command history

!! - Repeat the last command

!# - Repeat the line number in the history

echo !! - Echo the previous command to standard out


Tuesday, 17 May 2011

JavaScript: Now powerful enough to run Linux

Ajax LogoYes someone went and did it. Fabrice Bellard to be specific. He has written a version of Linux using JavaScript. Yes that's right. Javascript. Wanna see? Check it out!

Click to Boot Linux!



Pretty amazing stuff. CNET has the whole story here:

JavaScript: Now powerful enough to run Linux | Deep Tech - CNET News

Friday, 25 February 2011

How to Add VCards to Thunderbird

At work, we have this really nice staff directory. However, it only exports a person's entry in VCard format. But Thunderbird doesn't have a way to import a VCard. Or does it? To add a VCard to a Thunderbird Address Book do the following.

  1. Save the VCard to a file.

  2. Attach the VCard file to an email message and send it to yourself.

  3. When you receive the message, the VCard will be attached along with a small icon that represents a person.

  4. Click on the icon, and Thunderbird will provide a popup that adds the VCard to your address book.

That's it. Saves a bunch of typing.



Thanks to MacWorld hints for the idea.

Monday, 4 October 2010

Ever want to Customize VIM?

Linux LogoHave you ever wanted to customize VIM but you have no idea where to begin? Check out: How I boosted my VIM



It will at least give you an idea of what you can do.

Tuesday, 14 September 2010

A Real Linux/Unix Terminal for Windows with Cygwin

Linux LogoIf you have not heard of it before, Cygwin is a set of Linux/Unix utilities made to run on Windows. Cygwin includes a plethora of tools including databases, programming languages, and command line utilities. But what I use it for mostly is to have a bash shell for Windows. That allows me to use most of the aliases, symbolic links, and other tricks I use to navigate Linux or Mac OS/X on Windows. It also makes file manipulation a lot easier.



The default Cygwin installation uses the same command window as the Windows command prompt. Which is a little clunky, to say the least. Specifically, cutting and pasting text is a pain in the rear. You have to jump back and forth to the menu to cut and paste text. It is slow, clunky, and annoying.



The solution. Install rxvt with Cygwin. This is a terminal emulator that gives you all those cool cut and paste shell features on Windows. Just install rxvt from the shell options as part of your Cygwin install. Then, create a batch file like this in your Cygwin directory.



@echo off

C:

chdir \cygwin\bin

start rxvt -sr -sl 10000 -fg white -bg black -fn Consolas-20 -fb Consolas-20 -fm Consolas-20 -tn cygwin -e /bin/bash --login -i






I called my file, term.bat. Run the bat file and you get a bash shell and window that behaves just like it would on Linux or a Mac. Yays!



Credit to c2.com for a pointer that got me started on this.

Tuesday, 15 December 2009

More Thoughts on Google OS

Google LogoAfter listening to the This week in Google from a few weeks back, I have a better understanding of just what the new Google OS is. It is interesting that Google is targeting the Netbook platform for this OS. With the requirement to essentially have an Internet connection to do anything, this would seem like quite a limitation to me. There are still a lot of places I go with a laptop or netbook where there is no Wifi.



To me a better target might be a really inexpensive desktop replacement. Almost everyone I know now has wifi unless they live in very remote places. The combination of Google Office and OS would meet the needs of about 90% of the folks. Word processing, web surfing, video streaming, social networks, etc.. would all be covered. The only thing I see missing is a replacement for Quicken.



Just think how nice it would be to set up your parents or grandparents on a PC that  is always up to date, gets no viruses and is really easy to use. With a low price that would be a very compelling story.

Thursday, 26 November 2009

Chrome OS

Google Logo

After launching the Go programming language, Google followed up with the announcement of their Chrome operating system. I know I am a week or two late on this post, but I have been busy. :) Basically, Chrome OS is a Linux distro optimized to be Net connected. The early target hardware appears to be Netbooks. Here are some links to details.

An OS that is basically just a browser is an interesting idea. With the way things are moving to the Net, I suppose you will be able to find everything you need online. And of course, Google wants to promote their online office apps. But I think I would still want a full featured OS. The computer biz will be interesting the next 5 years.

Tuesday, 18 August 2009

Next Linux to Try


Linux Logo

Is this the next Linux I should try? Check out this review of Linux Mint. (Found via digg)


Since this distro is based on Ubuntu, I keep a lot of the neat features I like about that distro. It appears that Mint is mainly a project to improve the UI and media features. Definitely worth checking out.

Wednesday, 29 July 2009

PCs Free Like Phones


Linux Logo

PCs free with your internet service? That is the point this article makes. I agree with it. With the price of things like NetBooks getting cheaper than many devices, like an iPhone, I think its inevitable.

Saturday, 18 July 2009

WYSIWYG Open Source HTML Editing

While working on a project this week, I needed to create a simple HTML file to store a little narrative. So, instead of doing this by hand, it seemed like a good idea to try to create the file using a WYSIWYG editor.


For the initial try, the file was created with Open Office 3.1 for the Mac. Now editing the file in Open Office, is nice and easy. Just what you would expect from a full featured word processor. However, the HTML produced from OO is less than full featured. Heavy use of font tags and such makes for a less than desirable HTML output file. Very 1990s.


So to clean up the file, I remembered that the Composer application is still included as part of the SeaMonkey Project. If you are not familiar with it, SeaMonkey is essentially the "Son of Netscape", the continuation of the classic Netscape browser. It uses the same core as the Firefox browser, but keeps the same all-in-one feature set of Netscape. I was very pleased with the HTML output of Composer. Very clean HTML. No unecessary font tags and the like. The user interface is still a bit basic, but functional.


While searching around for information on Composer, I ran across this post about Kompozer, Composer, and NVu. KompoZer is a continuation of NVu. NVu is a very simple stand alone open source HTML WYSIWYG editor made for the Linspire OS. Unforunately, for copyright reasons, it could not be updated. So the source was forked and Kompozer was born. According to the post, the KompoZer app will be updated to the latest version of Gecko and then folded back into the SeaMonkey version of Composer. Very cool. It is good to have a tool like this in the Open Source space.

Friday, 1 May 2009

Playing with Virtual Box


With my work begining on JDK 7, I went to download the latest version and realized I need to build the JDK from source. This seems like a perfect opportunity to give Virtual Box a try on OS X. I decided Ubuntu would be the best guest operating system to run, so I downloaded the software and and installed it.


To help me out I found this article on installing Ubuntu 9.04 on Virtual Box. Well everything worked great until I got to the part where I need to boot off the installer CDROM. When I tried to do that, I got this error: No Bootable Medium Found. So Googling around I found this support article which identified the fact it wasn't a problem with my boot disk. After a little sniffing around I found that you have to enable "Passthrough" for you CDROM drive for the boot disc to work. After doing that, the VM started up fine and I was installing! Yay!


The installation went very smooth. When you are done everything works, but the VM screen resolution was only 800x600. Virtual Box has a set of tools for fixing this sort of thing up like VMWare. But instead of being call the Virtual Box Tools, they are the Virtual Box Additions. Different name, same thing as VMware tools. However, the installer for this is much, much better than the VMWare tools. I just ran one script, and everything is installed. This was much easier than my last experience with VMWare and Ubuntu. Anyway, after the reboot, everything worked fine. The screen resolution is much better and the mouse no longer gets captured in the VM. The CPU utilization seems a tad higher then VMWare, but other than that, getting things up and running was pretty easy. I'm looking forward to playing around more.


Note: For full disclosure, I am an employee of Sun Microsystems which owns Virtual Box.

Monday, 6 April 2009

Portable Ubuntu for Windows

Linux Logo

Check out this post on LifeHacker about a portable thumb drive Ubuntu for Window. Once installed, Ubuntu launches as a tool bar. From this, you can launch all your favorite Linux applications. Haven't tried this out yet, but I intend to. Looks really cool!

Unix ls and ls -l for Windows

Linux Logo

I spend almost all my time in some form of Unix when I work on computers. So when I have to work on Windows, I am constantly typing ls to get a directory list and ll which is my alias for ls -l. Instead of trying to retrain my brain to use dir again, I do the following to the Windows system I am working on.



  1. cd \windows

  2. edit ls.bat

  3. Put the following into the file: dir /w %1 %2 %3 %4
    This makes the dir command ouput more like ls. The parameters (%1 %2, etc...) allow you to add parameters, file wild cards, and such to the command line.

  4. Save the file and close it.

  5. edit ll.bat

  6. Put the following code in the file: dir %1 %2 %3 %4
    The default behavior of dir is like ls -l.

  7. Close and save the file.


That is it. Now you have ls and ll in Windows. No retraining required.

Wednesday, 25 February 2009

Freakish Linux Desktop UIs


Why do hardware manufacturers continue to slap these freakish Linux desktop UIs on NetBooks? I just got a Dell Mini 12 with Ubuntu 8.04 (more to come on the NetBook). The main reason I got the NetBook was I wanted a bigger screen and a REAL Linux distro. Not some bizarre 3rd party Debian distro with a UI designed by drug crazed gnomes.


The default Ubuntu UI is very similar to Windows. The start menu is called "Applications" and appears at the top of the screen instead of the bottom. But it is very easy to figure out and works great.


The Dell came configured with a special "Dell" desktop mode. So instead of the nice easy to understand text at the top of the menubar, there are just icons. And in the middle of the screen is this bizarre, giant launch bar thingy. Why?????? How is this an improvement over the default?


You can make the same complaint about the Asus eee 1000 UI and its hideous tab interface. You have to do a fairly serious configuration change just to get a Start menu. I just don't understand it. If you are trying to appeal to Windows users, the closer the thing looks and acts to Windows, the easier it will be to use for 90% of the users out there. And if you take the default Ubuntu UI, you need to make 0 changes for an average Windows user to get off and running.


Fortunately, Dell did include a "Switch Desktop Mode" menu option off the main Application menu. This allows you to switch to the default Ubuntu desktop. Yay!!!! So I'm back to normal.

Monday, 23 February 2009

tar: write error: unexpected EOF

I got this error trying to tar up a file on Solaris 10: tar: write error: unexpected EOF. So what does it mean?


Well, the most likely cause is the Unix file system you are trying to write too is full. Since the operating system can not add any more files to the tar, you get this error.


On Solaris, to see how much space you have on a file system, just type: df -k. This gives you a list of filesystems and shows by percentage how full they are.


To fix the problem, either free up space on the file system you are trying to write to, or write to a filesystem that has the free space you require.


Decided to write this post because the explanations on Google for this were mostly really lame. Back in the day, doing tech support, the most important lesson I learned was, check the most obvious cause first. About 90% of the time, the most obvious cause for the problem, is the cause of the problem.