October 5, 2008

Bringing Linux to the Windows Desktip with “Cygwin”

Tech tips - 185

By Scott Nesbitt – Sunday, September 14, 2008

PullQuote 185Like it or hate it, there's no denying that the command line is a powerful, flexible tool. The number of useful utilities available more than balances out the command line's reputation for not being easy to use.

That said, the default Windows command line is lacking – especially when compared to its UNIX or Linux counterparts. It doesn't have to be that way, though. You can bring the full power of the Linux command line to Windows with an application called Cygwin.

Cygwin_installOverview of Cygwin

Cygwin is an environment and a set of application that emulates the Linux command line within Windows. Originally called gnuwin32, Cygwin was developed by a company called Cygnus Solutions (now part of Linux vendor Red Hat) in 1995. The aim of Cygwin was to bring the software development toolchain used by UNIX and Linux hackers to 32-bit Windows (Windows 95 and NT at the time). With Cygwin, developers could write cross-platform software without many changes to the underlying code.

Cygwin grew from a set of programming tools to a complete implementation of the popular Bourne Shell command line environment. There's also a version of Cygwin called Cygwin/X, which is a version of the X Window System that runs on Microsoft Windows. Note: Cygwin/X may be covered in a future TechTip.

 

Who uses Cygwin?

Obviously, Cygwin isn't a tool that will appear on everyone's Windows desktop. It's a quite specialized, almost techie tool. Cygwin has its roots in cross-platform software development, so obviously one of the major groups of users is programmers; especially programmers who are writing software for multiple, UNIX-like platforms. With Cygwin, they can do their work and not have to worry about needing a second desktop computer running another operating system. Anyone doing system administration will find Cygwin's array of network utilities, and other command line tools, useful. Using them, an administrator can quickly gain access to and efficiently work with a server.

Cygwin is also useful for anyone who wants to learn about Linux or UNIX. That could be a curious Windows user who plans to make a switch, someone who needs to learn either operating system as part of their job, or who wants to take advantage of the wide range of Linux utilities that Cygwin offers. I'm in the latter group. Whenever I use my laptop computer running Windows, I use Cygwin to:

  • Securely log into my Web sites using ssh
  • Convert documents written in Markdown to HTML
  • Work with many of the same scripts and utilities that I work with on my Linux laptop

And quite a bit more.

 

Getting started

Obviously, you need to download some software in order to start working with Cygwin. There is one file that you need to get: setup.exe, which is the setup program. Once that file is on your hard drive, double click it to start the installation. The setup program is a wizard that guides you through the installation and (when it comes time) update process. Unless you have a reason to do otherwise, install from an online source. The wizard enables you to choose a site from which to download the application packages. When choosing a location, find one that's relatively close to you and select a site that uses HTTP instead of FTP – I've found HTTP to be faster. Your results may vary. If you're planning on installing Cygwin on multiple computers, then you might want to choose the local installation option. This will enable you to put all of the packages (another name for Cygwin applications and libraries) on a shared drive so others can access cygwin_terminalthem as needed. Going with the default installation will only install the basic Cygwin system and a few utilities. That basic installation is functional, but doesn't do much. You need to specify what you want to install. That's where the fun begins. There are over 1,100 packages available. You definitely won't need them all – and installing them all at once will take a long time. So, what should you choose? It depends on what you're doing. If you're a developer, you'll want to install various compilers, interpreters, and libraries. A system administrator will want to install tools like ssh, ftp, less, vi, and the like. Consult the package list at the Cygwin Web site for more information that will help you make your choice.

Installation will take anywhere from a couple of minutes to much longer, depending on what you've decided to install. Once the process is complete, you can find Cygwin in the folder c:\cygwin.

Note: For more information about the installation options, read this document.

Using Cygwin

Assuming that you're successfully installed Cygwin, there are three ways in which you can launch it: from a desktop icon, from the Start menu, or from within Windows Explorer. For the latter, you'll have to install a package called Cygwin Prompt Here (sometimes called chere). It's a small application that adds an item to the context menu in Windows Explorer. Just right click on a folder, and then choose Bash Prompt Here. A terminal window opens in that folder. There's no need to use a lot of keystrokes to get there!

 

The file system

Regardless of what method you use to start Cygwin, you'll find the file system to be … well, a bit interesting, especially proscar and propecia if you're not cygwin_logofamiliar with Linux or UNIX. Whereas the Windows command line uses backslashes to separate directories (C:\Windows\System32), Cygwin sticks to its UNIX roots by using forward slashes. Everything starts from the root directory (/), and Cygwin uses standard Linux directories – like bin, etc, lib, and the like.

You can navigate to the Windows file system by specifying /cygdrive/c. From there, you can use the cd command to change to whatever directory you want to.

 

Using Cygwin's programs

To use any of Cygwin's programs, just type the name of the program in a terminal window and press Enter. For example, to get a directory listing just type ls. Of course, depending on the program, you might have to specify some options and/or a file name. You can read this TechTip and this one to learn a few basic Linux commands. Or, you can read the Cygwin user manual.

 

Conclusion

Cygwin is definitely not for every computer user. It's really a tool for the techie or the technically curious user. But if you need to use the Linux command line and don't want to invest in a second computer, to partition your hard drive, or use virtualization, then Cygwin is definitely a good choice. Best of all, it's free!

Permalink • Print • Comment

10 reasons why you should use the Opera browser

  • Date: September 12th, 2008
  • Author: Jack Wallen

Despite its low profile, Opera offers a host of features that set it apart from the browser pack. According to Jack Wallen, Opera is fast and stable — and it contains many features other browsers can’t touch.


I have gone through many browsers in my lifetime of IT. From Lynx to Mosaic to Mozilla to Netscape to Firefox to Internet Explorer to Safari to Flock. But there’s another browser that peeks its head in and out of that cycle — Opera. Opera is a browser that gets little press in the battle for Internet supremacy. But it’s a browser that is making huge waves in other arenas (Can you say “mobile”?) and is always a steady player in the browser market.

But why would you want to use a browser that gets little love in the market? I will give you 10 good reasons.

Note: This information is also available as a PDF download.

#1: Speed

It seems no matter how many leaps and bounds Firefox and Internet Explorer make, Opera is always able to render pages faster. In both cold and warm starts, Opera beats both Firefox and Internet explorer. We’re not talking about a difference the naked eye is incapable of seeing. The speed difference is actually noticeable. So if you are a speed junky, and most of you are, you should be using Opera for this reason alone.

#2: Speed Dial

Speed Dial is one of those features that pros and cons of propecia generally steals the show with browsers. It’s basically a set of visual bookmarks on one page. To add a page to Speed Dial, you simply click on an empty slot in the Speed Dial page and enter the information.When you have a full page of Speed Dial bookmarks, you can quickly go to the page you want by clicking the related image. For even faster browsing, you can click the Ctrl + * key combination (Where * is the number 1-9 associated with your page as assigned in Speed Dial).

#3: Widgets

Opera Widgets are like Firefox extensions on steroids. Widgets are what the evolution of the Web is all about — little Web-based applications you can run from inside (or, in some cases, outside) your browser. Some of the widgets are useful (such as the  Touch The Sky international weather applet) and some are just fun (such as the Sim Aquarium.) They are just as easy to install as Firefox extensions.

#4: Wand

Save form information and/or passwords with this handy tool. Every time you fill out a form or a password, the Wand will ask you if you want to save the information. When you save information (say a form), a yellow border will appear around the form. The next time you need to fill out that form, click on the Wand button or click Ctrl + Enter, and the information will automatically be filled out for you.

#5: Notes

Have you ever been browsing and wanted to take notes on a page or site (or about something totally unrelated to your Web browsing)? Opera comes complete with a small Notes application that allows you to jot down whatever you need to jot down. To access Note, click on the Tools menu and then click on Notes. The tool itself is incredibly simple to use and equally as handy.

#6: BitTorrent

Yes it is true, Opera has a built-in BitTorrent protocol. And the built-in BitTorrent client is simple to use: Click on a Torrent link, and a dialog will open asking you where you want to download the file. The Torrent client is enabled by default, so if your company doesn’t allow Torrenting, you should probably disable this feature. Note: When downloading Torrents, you will continue to share content until you either stop the download or close the browser.

#7: Display modes

Another unique-to-Opera feature is its display modes, which allows you to quickly switch between Fit To Width and Full Screen mode. Fit To Width mode adjusts the page size to the available screen space while using flexible reformatting. Full Screen mode gives over the entire screen space to browsing. In this mode, you drop all menus and toolbars, leaving only context menus, mouse gestures, and keyboard shortcuts. The latter mode is especially good for smaller screens.

#8: Quick Preferences

The Quick Preferences menu is one of those features the power user will really appreciate. I am quite often using it to enable/disable various features, and not having to open up the Preferences window makes for a much quicker experience. From this menu, you can alter preferences for pop-ups, images, Java/JavaScript, plug-ins, cookies, and proxies. This is perfect when you are one of those users who block cookies all the time, until a site comes along where you want to enable cookies.

#9: Mouse Gestures

This feature tends to  bother most keyboard junkies (those who can’t stand to move their fingers from the keyboard.) But Mouse Gestures is a built-in feature that applies certain actions to specific mouse movements (or actions). For example, you can go back a page by holding down the right mouse button and clicking the left mouse button. This is pretty handy on a laptop, where using the track pad can take more time than you probably want to spend on navigation. But even for those who prefer to keep their hands on the keys and not the mouse, the feature can still save time. Instead of having to get to the mouse, move the mouse to the toolbar, and click a button, you simply have to get your hands to the mouse and make the gesture for the action to take place. Of course, this does require the memorization of the gestures.

#10: Session saving

I love this feature. All too many times, I have needed to close a browser window but didn’t want to lose a page. To keep from losing the page, I would keep a temporary bookmark file where I could house these bookmarks. But with Opera, that’s history. If you have a page (or number of pages) you want to save, you just go to the File menu and then the Sessions submenu and click Save This Session. The next time you open Opera, the same tabs will open. You can also manage your saved sessions so that you can save multiple sessions and delete selected sessions.

The upshot

With just the above list, you can see how easily Opera separates itself from the rest of the crowd. It’s a different beast in the Web browsing space. It’s fast, stable, and cross platform, and it contains many features other browsers can’t touch.

Permalink • Print • Comment
« Previous Page
Made with WordPress and a healthy dose of Semiologic • Sky Gold skin by Denis de Bernardy