Switching Users

Once you have logged in to your desktop, you can switch to different user without having to log out or end your current user session. On GNOME you use the User Switcher tool, a GNOME applet on the panel. For KDE you use the Switch User entry on the Main menu.

User Switcher: GNOME

On GNOME, the switcher will appear on the panel as the name of the currently logged-in user. If you left-click the name, a list of all other users will be displayed. Check boxes next to each show which users are logged in and running. To switch a user, select the user from this menu. If the user is not already logged in, the login manager (the GDM) will appear and you can enter that user’s password. If the user is already logged in, then the Login window for the lock screen will appear (you can disable the lock screen). Just enter the user’s password.

Read the rest of this entry »

Linux Tags: desktop, gnome, kde, switcher, user

Why Shell?

In UNIX, which is the parent operating system of Linux and the origin of many of the ideas and of the philosophy of the operating system, a variety of different shell programs are available. The most common on commercial versions of UNIX is probably the Korn shell, but there are many others. So why use a shell to program? Well, the shell leads a double life. Although it has superficial similarities to the Windows command prompt, it’s much more powerful, capable of running reasonably complex programs in its own right. You can not only execute commands and call Linux utilities; you can also write them. The shell uses an interpreted language, which generally makes debugging easier because you can execute single lines, and there’s no recompile time. However, this can make the shell unsuitable for time-critical or processor intensive tasks.

Read the rest of this entry »

Linux Tags: programming, shell

Getting Help

The vast majority of Linux systems are reasonably well documented with respect to the system programming interfaces and standard utilities. This is true because, since the earliest UNIX systems, programmers have been encouraged to supply a manual page with their applications. These manual pages, which are sometimes provided in a printed form, are invariably available electronically.

The man command provides access to the online manual pages. The pages vary considerably in quality and detail. Some may simply refer the reader to other, more thorough documentation, while others give a complete list of all options and commands that a utility supports. In either case, the manual page is a good place to start.

Read the rest of this entry »

Linux Tags: documentation, help, online

Development System - Shared Libraries

One disadvantage of static libraries is that when we run many applications at the same time and they all use functions from the same library, we may end up with many copies of the same functions in memory and indeed many copies in the program files themselves. This can consume a large amount of valuable memory and disk space.

Many UNIX systems and Linux support shared libraries can overcome this disadvantage. A complete discussion of shared libraries and their implementation on different systems is beyond the scope of this book, so we’ll restrict ourselves to the visible implementation under Linux.

Read the rest of this entry »

Linux Tags: libraries, shared

Development System - Static Libraries

The simplest form of library is just a collection of object files kept together in a ready-to-use form. When a program needs to use a function stored in the library, it includes a header file that declares the function. The compiler and linker take care of combining the program code and the library into a single executable program. We must use the –l option to indicate which libraries other than the standard C runtime library are required.

Read the rest of this entry »

Linux Tags: archive, libraries, static