Basic UNIX 3
Linux for Windows Users

Information Technology Services

Iowa State University

	This section of the class makes the assumption that you are comfortable with Microsoft Windows, but want to deal with Linux on your own terms. While the hardcores who've been using UNIX forever may laugh at us, some of us prefer dealing with Linux through a graphical desktop. That's okay. In this section, we'll contrast Windows and Linux, then show you how working at the Linux graphical desktop is like and unlike Windows, building on your Windows experience. Finally, we'll take a brief look at the art of being compatible with Windows, show you where to look for new software, and how to get help.
	While they appear similar at the desktop, Linux and Windows are very different "under the hood". Linux lets you choose how to you want to work with it, and the underlying structure makes it more secure and easier to administer by design.
	While Windows has a single user interface, Linux has many choices. The graphical desktop uses X Windows, which was designed from the start to work both locally and over a network connection. A number of different graphical desktop managers are available to fit your machine and your working style. If bandwidth concerns, machine horsepower or disabilities make working with the graphical desktop a problem, a wide variety of console applications let you manage servers remotely and/or do useful work with a text terminal.
	The Microsoft Way is to incorporate many features into the Windows kernel. Internet Explorer, for example, is intimately integrated into Windows -- so much so that fixing a security problem with IE may require rebuilding much of Windows (and a couple of months), and crashing IE will take Windows down. Linux, on the other hand, is modular; the graphical environment, desktop manager, Web browser and media players are separate programs that run on top of the Linux kernel. Crashing one of them (like the Web browser) shouldn't kill the Kernel, and making changes to them is much easier.
	UNIX has always made a distinction between users and administrators. Only an administrator ("root") can install software or make modifications to system settings; ordinary users can change their own preferences and install software in their own directories but can't affect anyone else. This greatly reduces the spread of viruses and the hassles of management. Windows does provide this feature in Windows 2000 and XP, but many Windows applications can't be run correctly by a non-privileged user, so hardly anyone uses the feature (especially on home systems). Linux applications, on the other hand, have always been designed with this in mind. That makes Linux just a little bit more secure than Windows, as a non-privileged user can't as easily infect the machine with a virus or mess up other people's settings.
	Windows machines are really designed to be managed from graphical tools. That's great for a few machines, but difficult when you manage many servers or desktops. Almost all management tasks in Linux can be done from a text console (i.e., remotely) and a wide variety of scripting tools are available. That's better if you're managing lots of servers; servers don't even need keyboards and monitors, and can be managed over a network or even a dialup.
	Most Linux distributions require a username and password to log in to the machine. If you don't have one, contact the administrator of the machine. Machines with Iowa State Linux installed use the ISU Kerberos system to govern access to the machine; your ISU NetID and password will be enough if you're on the machine's access control list. (Again, see the machine's administrator.) If you want to use the default window manager (Gnome) and the default language (English) you can just log in now. However, you may want to wait a bit...
	Before you enter your username and password, you can select a different window manager from the default. Some of the choices: Gnome Desktop (the default on RHEL) K Desktop Environment (KDE, the default for many of us) Fallback (a very minimal window manager) Because Nautilus has problems with Iowa State Linux, we tend to use KDE. Older machines may work better with stripped-down window managers like IceWM or WindowMaker. [ Exercise: begin by selecting Gnome. ]
	Linux by default supports a wide variety of languages (especially important for those in Europe, where much of Linux is written). You can select a language on the login screen, and that language will be used in menus and icon names. [ Exercise: you'll have to stick with English in our training lab, as we didn't install language files for everything. When you install your own Linux machine, however, you can add the support for any language in the list (or all of them, if you've lots of disk space). Now go ahead and log in using the username and password we gave you. ]
	The Gnome desktop looks a little different from the Windows desktop. As with any UN*X system, your files are stored in your home directory (/home/username). This directory can be on another disk, or even on another machine; Iowa State Linux uses your AFS home directory. The Gnome Desktop gives you an icon for this directory, as well as a "Computer" directory containing all of the mounted drives on your system. There's also a Trash icon to which files may be dragged to dispose of them. The functions of the Windows Taskbar, including the Start Menu and the System Tray, are divided in Gnome Desktop into two panels: one on the top edge of the Desktop and the other on the bottom edge.
	The left end of the top edge panel has the Application Menu; it has the same function as Windows XP's All Programs menu. [ Exercise: click on the Application Menu icon and take a minute to explore the categories. A couple of notes: Controls for the way your windows and desktop appear, how your keyboard and mouse work, and other things unique to your user are found under “Preferences”. Most of the items under “System Settings” and “System Tools” affect all users, and will require the root password, as they make changes to the system as a whole. Nearly all of the items installed in this lab are included with Red Hat Enterprise Linux, including OpenOffice.org, Evolution and all the games. Almost all the software you'll need to do useful work is already installed at no extra charge.
	The Action Menu is where you can run a named application and log out. There's also a file search similar to Windows' Search, a tool to capture the screen to a graphics file, and a useful “Lock screen” tool to prevent anyone from seeing your screen without entering your password.
	The Application Launcher buttons let you launch selected applications with a single mouse click. Holding the mouse pointer over the button gives a description of what the button does. [Exercise: click on one of the application launcher buttons to start a program.]
	Small applications for special purposes, called applets, appear at the right end of the top edge panel. To make the applet appear, click the button once; to make it disappear, click it again. [Exercise: click the time to display a full-month calendar. Click the time again to make it go away.]
	The left end of the bottom edge panel is a useful “Clear Desktop” button. Click it once, and all the windows on the current desktop are minimized. Click it again, and the windows will be restored.
	Most of the bottom edge panel is used to display buttons for open windows in the current virtual workspace. Clicking the button selects that window; right-clicking the button displays a menu for moving, resizing, and moving the window to another virtual workspace. [ Exercise: if you don't see any buttons, open a couple of items from the Application Menu. Home is a good start, and you'll find a calculator (or two) in the Accessories menu. Clicking the Close box in the upper right-hand corner of a window will usually close it if you open something big by mistake.]
	The Gnome Desktop allows four virtual workspaces. Thumbnails of the workspaces are shown at the right edge of the bottom edge panel. You can switch between them by clicking on the appropriate button. [Exercise: click on one of the empty virtual workspaces and start an application. Notice that the windows you already had open are gone, but their thumbnails appear in the first button in the selector. Only the windows in the current workspace have buttons in the bottom panel. Click the first button in the Virtual Desktop selector to get them back.]
	The K Desktop Environment looks much like the Gnome Desktop, with a couple of exceptions. KDE gives you icons for removable drives (like the floppy) that automatically mount the disk when you double-click on it (about which more later). The KDE Panel also has some significant differences from the Gnome Panel, not the least of which is different items in the K Menu. [ Exercise: log out of the Gnome Desktop by choosing “Log Out” from the Actions Menu. Notice that “OK” is on the right side of the dialog box, an annoying trait for Windows users (for whom OK is usually on the left). Once you've logged out, choose “KDE” from the Session menu and log in to the K Desktop Environment using the username and password you were given. ]
	The K Menu, which is at the left end of the KDE Panel, is very like the Windows Start Menu. Besides links to the applications you can run, it includes choices to run a named application and logout. The Home choice opens your home directory in Konqueror. [ Exercise: Click on the K Menu and notice the differences between it and the Gnome menus you just looked at. If you've used KDE on this machine before, the last applications you ran will appear at the top of the menu, and there's a useful “Lock Session” option towards the bottom. ]
	In the KDE Panel, the application buttons are just to the right of the K Menu. Moving the mouse over a button displays the name of the application the button starts and a short description of what the application is for.
	The Pager is used to switch between virtual desktops (which the Gnome people call virtual workspaces.) Unlike the Gnome desktop, the Pager just shows numbered buttons for each desktop in a compact array. There is a KPager application under Accessories that will let you see thumbnails of the different workspaces.
	[ Exercise: if you don't have any windows open, go to the KDE Menu and choose Home and perhaps an accessory or two, so you can see what these buttons look like and what they do. ]
	What happens when you click on an applet depends on the applet. Some raise a menu (much like the Windows System tray) and some have a click-on, click-off system. Clicking on the time brings up a nice calendar.
	Switching between windows is much like Windows; either <Alt/Tab> between windows [in the same workspace, about which more later], click on the window you want, or click the appropriate button in the Panel. Clicking the button of an open window will minimize it into the Panel. Some (more primitive) window managers may demand that you click on the titlebar to select a window. Most modern window managers don't. [ Exercise: if you haven't opened a couple of windows, open two or more and use the various techniques to switch between them.]
	Most of the Windows rules for moving and resizing windows work in most window managers: Click, hold and drag the title bar to move the window; Click, hold and drag an edge to resize a window; Click in the close box to close the window; Click the minimizer box to move the window to a panel button. Click the maximizer box to blow up the window to screen size. There are a couple of non-Windows tricks that KDE and Gnome can do: The “On Top” button forces the windows to appear on top even if another window is the active window; There are a number of commands for moving windows between virtual workspaces. [ Exercise: play a bit with the windows you've opened. ]
	Let's work some more with virtual workspaces. You can move windows that belong together to another workspace, and <Alt/Tab> will only switch between the windows in that workspace. Just click on the upper-left-hand corner of the window and choose the desktop you want to move the window to. Then use the Pager to go to that desktop, or use <Ctrl/Tab> instead. You can also specify that the window appear in all workspaces – handy for IM clients. [ Exercises: Move to another desktop (like 2) and back; Pick a window and move it to another desktop; Verify that <Alt/Tab> doesn't show that window in the marquee; Switch to the other desktop and move the window back to desktop 1. ]
	The Windows rules for closing windows also work in most window managers: Select Exit from the first menu; Press <Alt/F4>; Click in the close box to close the window. If you're working in a terminal window, you can also close that window by pressing <Ctrl/D>; that's the end-of-file character in UN*X, and that means you've ended input to the shell, so it closes automatically. [ Exercise: close the windows you've opened using these techniques. Select System Tools -> Terminal from the KDE Menu to open a shell window, then press <Ctrl/D> to close it again. ]
	Ideally, you'll have a three button mouse to work with Linux but hardly anyone ever does. So: Left-and-right click = middle click (that's tricky) Wheel-click on a wheel mouse = middle click The biggest difference is the fact that the simple act of highlighting copies the highlighted text into the Clipboard. And middle-clicking pastes the text in the cursor location. No menu choice, no <Ctrl/C>, nothing. (Most applications also support the Windows-style copy and paste, but you'll miss this in Windows once you get the hang of it in Linux.) [ Exercise: Use the Launcher button to start Firefox. From the KDE Menu, select Programming -> Nedit. Switch to the Mozilla window and highlight some text. Switch to the Text Editor window and middle-click to paste. ]
	The program used to move, copy, open and delete files is a file manager. (In Windows, it's EXPLORER.EXE, though hardly anyone knows that.) In Linux you have lots of choices. Each window manager (KDE, Gnome, etc.) has a default choice (as shown above) but you can still use whatever file manager you like. (Because Nautilus has problems with OpenAFS, we tend to steer away from it even in Gnome.)
	True, hardcore UN*X geeks can still move, copy and open files from a command shell (just like old DOS hackers can do it from the Command Prompt in Windows). [ Exercise: Use System Tools -> Terminal to open a terminal window. Choose Run Command, then run xterm to open a different kind of console window. Use the ls command in both windows to display your home directory's files. Use <Ctrl/D> in both windows to close. ]
	Your files will be in your home directory (/home/username). That directory may be on your machine, or it might be on a server somewhere. It doesn't matter to Linux. To work with your files, just choose Home from the KDE Menu or double-click on the Home icon. The Konqueror window looks a bit like the Explorer window; a list of directories appears on the left, with file and folder icons for the selected directory on the right. You can double-click on a file or folder to open it or right-click on a file to present an action menu. The shift and control keys let you select multiple files just like Windows. The Up button shifts the active window to the directory above the current one, while the Back button takes you back to the previous directory you were in (wherever that was). [ Exercise: Select Home from the KDE Menu and use the navigation buttons to explore the system. ]
	If you want to copy or move files, you have several choices: Open another Konqueror window and drag-and-drop the files from one window to another; Copy the file(s) with the right-click menu, change directories, then right-click and choose Paste. Open another Tab with the New Tab button, change directory and paste into the new tab. Right-click on the file(s) and select “Copy to...” and the appropriate folder. Konqueror is not only a file manager but a Web browser. You can open Web servers, ftp sites, etc. in a window and copy and paste just like you do with directories. [ Exercises: Open another Konqueror window, then copy a file from a directory other than home in the first window you opened to the second one. Open the ISU ftp server (ftp://ftp.iastate.edu) in the first window and copy the README file to your home directory. ]
	Since all your files are in your home directory, you shouldn't need to use a removable disk unless you're (a) moving files to/from another computer without a network, (b) backing up your home directory or (c) installing software from a CD/DVD. Those are things that can cause insecurities, so Linux normally demands that root mounts and unmounts removable disks before they can be used. The icons on the Desktop, in Computer or Konqueror can break that rule, so that you can mount and unmount floppies and Zip disks. [ Exercise: insert a diskette in the machine's drive, open Konqueror, then double-click on the “Floppy” icon to mount it. ]
	Don't press the buttons on the drive to remove a removable disk! Before removing a removable disk, right-click on its icon and choose "Unmount" to unmount it. Files and data may be lost if you don't. Then right-click again and choose "Eject" to get Zips and CDs out. Or you can unmount and eject any removable disk with the shell command eject /media/device. [ Exercise: in the Konqueror window for the floppy disk, right-click on the floppy and choose “Unmount”. Remove the floppy from the drive. ]
	Linux isn't as paranoid about floppies as it used to be, when only root could format a floppy. If you want to format a floppy from a terminal window, type the su command, then type gfloppy to run the floppy formatter.
	Windows determines what a file is and what application should open it by its extension, the characters that follow the last period in the filename. Konqueror (and other file managers) can use that, but it doesn't stop there. It can analyze the files in a directory using the file command to determine what they are. Because of this, Konqueror will use the correct application to open the file even if it's misnamed -- unless, of course, you've used the Konqueror settings to tell it to use the wrong one. Unless you've installed more than one application that can open the same file, you shouldn't need to worry about it.
	f you want to specify an application to open a particular type of file, choose Tools -> Configure Konqueror -> File Associations. Select the type of file (they're sorted by MIME type, so images will fall under image/something) and you'll see a list of applications that Konqueror knows can open the file. All of these applications will appear when you right-click and select “Open With...”. Move the one you want to use for the Open command (or double-clicking) to the top of the list with the “Move Up” button. [Exercise: In Konqueror, choose Tools -> Configure Konqueror. Now click on File Associations in the left pane of the window, then choose image/png as the file type. Move the bottom application in the list up to the top by highlighting it and using the “Move Up” button. ]
	If you deal with text files (program source, HTML the hard way, flat-file databases, etc.) you'll need an editor. If you need something with power but don't want to spend the time to really become familiar with Emacs or VI, Nedit is a good choice. It can do a wide variety of editing tricks, highlights tags in common languages, and if what's there isn't enough you can pipe all or selected text to a shell command (including text filters like grep, awk, perl and python).
	There are a huge number of free and proprietary software packages available for Linux for every conceivable purpose. The fact remains, though, that Linux users are a minority in a Windows-dominated world. We usually have to be compatible with Windows users and their applications to coexist. Fortunately, there are alternatives. We can access Windows shares, run compatible and equivalent applications wherever possible, or we can run Windows applications when necessary.
	You can easily access Windows shares from either Nautilus or Konqueror. Windows are "SMB" shares, so simply enter an SMB URL for the location of the form "smb://username@servername/sharename/path". (The path is optional.) The share will open in a window. If you want a more permanent connection, use the "File -> Connect to Server" command in Nautilus. Nautilus will create an icon on the Desktop that can be used to reconnect to the share.
	For Microsoft Office compatibility the logical choice is OpenOffice.org (aka StarOffice). If you have an older machine with less than 128 MB of memory, a better match might be “GnomeOffice”, i.e., the Abiword word processor and the Gnumeric spreadsheet. These have good (but not perfect) compatibility with MS Office and require a lot less horsepower. Other applications have equivalents as well. The URL http://www.linux.ie/newusers/alternatives.php is a link to a database of Linux equivalents to common (and not so common) Windows applications.
	Wine is a tool that attempts to let you run Windows applications under Linux. It's not perfect, and it works better if there's a copy of Windows installed on the machine so it can utilize DLLs from the Windows install, but it does allow some Windows applications to run. You can run applications that need Wine with the command wine applicationfilename If the program has to be installed in Windows, just run the setup routine from Wine first, then use the wine command to start whatever the executable file is. You can get Wine (and information on what programs run with it) from http://www.winehq.com.
	So, if I install a program under Wine, where does it go? There's a hidden directory in each user's directory named “.wine”. In that directory are folders representing the Windows hard drive (c_drive) and the full UNIX filesystem (dosdevices/z:). Under the C drive folder you'll find “My Documents”, “Program Files” and “windows”. (I've found that for some Windows applications to work it's useful to create a symbolic link to “windows” named “Windows”.) If Wine is installed by root, then it's installed in a sharable location and everyone can run root's installed applications – but they can't install software themselves except in their own area.
	Wine runs with the user's privileges, so Windows applications can't access anything that UNIX applications can't. If you need to access a FAT partition, you'll probably have to run Wine as root, or make changes to the permissions when you mount the FAT partition (normally, FAT partitions are read-only for everyone but root). Running as root means that the application can tinker with files and ports below 1024 to its heart's content, so be careful and read the Wine documentation if you need to do anything too fancy.
	Simple Windows applications seem to work well under Wine, but Microsoft Office isn't simple. Crossover Office is an enhanced version of Wine that is specifically designed to run Microsoft Office. This works remarkably well for this purpose; unfortunately, it costs money. (It will be available in the new 139 Durham Linux lab, along with Microsoft Office.) There's also a server edition that allows thin client machines running little more than an X server to run Office on a Linux server machine – without the Client Access Licenses (for Windows Terminal Server) required by the Windows 2003 Server solution.
	While there's a lot of software included in a Linux distribution, it doesn't have everything. Finding software for a Linux machine can be a bit more difficult than finding it for Windows; they don't get stocked as much at the bookstore or local computer place. The URLs given here are indexes to Linux software, both Free and Open Source software and commercial packages. SourceForge (sourceforge.net) and FreshMeat (freshmeat.net) catalog Open Source software projects for Linux and other operating systems, and are a good first place to look for problem solutions.
	What about help? There's help for KDE in the KDE Menu under “Help”. Also available in KDE Help are the “man pages”, the help for Linux commands used in a command shell. You can also read that help in the shell window with the command man commandname. For Red Hat Linux users, the manuals are all available online at http://www.redhat.com/docs. For more help, the Linux Documentation Project organizes all of the “Howto” and “FAQ” documents covering hundreds of Linux topics. Those documents can be difficult to understand for the Linux newcomer. For those folks, the Newbie Help Files are a little easier to understand . Many books on Linux-related topics are available in print and online from O'Reilly Media (see http://www.oreilly.com/). And if all other help fails, you can purchase Linux for Dummies (along with a host of companion Linux ??? for Dummies books) at your favorite bookseller.

Last update: October 14, 2005 by Jeff Balvanz (jbalvanz@iastate.edu)

Linux for Windows Users – Basic UNIX 3	Page 14

2005-01-19T09:48:57