unix window system

14
1 Unix Window System October 22 nd , 2007 Class Meeting 10 * Notes adapted by Lenwood Heath from previous work by other members of the CS faculty at Virginia Tech Lenwood Heath, Virginia Tech, Fall, 2004 2 Why Window Systems? A window system provides a graphical user interface (GUI) based on windows, icons, and interrupt-driven interaction Increased usability due to Access to multiple environments and applications at once Direct manipulation of graphical objects with mice, joysticks, tablets, etc.

Upload: others

Post on 12-Sep-2021

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Unix Window System

1

Unix Window System

October 22nd, 2007

Class Meeting 10

* Notes adapted by Lenwood Heath from previous work by other members of the CS faculty at Virginia Tech

Lenwood Heath, Virginia Tech, Fall, 2004 2

Why Window Systems?

� A window system provides a graphical user interface (GUI) based on windows, icons, and interrupt-driven interaction

� Increased usability due to

� Access to multiple environments and applications at once

� Direct manipulation of graphical objects with mice, joysticks, tablets, etc.

Page 2: Unix Window System

2

Lenwood Heath, Virginia Tech, Fall, 2004 3

Window Systems and Unix

� Unix evolved before window systems and optimized use of the command line

�Modern Unix systems include a window system to combine the advantages of the window system with the availability of a command line for expert use (that means you!)

Lenwood Heath, Virginia Tech, Fall, 2004 4

X Windows

� Practically all Unix window systems are based on X Windows (XFree86)

� Standard Version: X11R7

� X server:

� Hardware interface (display, mouse, etc.)

� Manages the screen space

� Draws simple graphics

� Assigns rectangular regions to X clients

� Local and remote clients supported

Page 3: Unix Window System

3

Lenwood Heath, Virginia Tech, Fall, 2004 5

The X Client-Server Architecture

� X designed to work over a network

� X server: software that runs on the machine where the program’s output will be displayed

� X client: program running on the same or another machine

� Client sends drawing and other X commands to the server, which displays the results

Lenwood Heath, Virginia Tech, Fall, 2004 6

Historical Use of X

� User sat at an X terminal – graphical terminal that ran an X server, but no OS

� User logged into remote computer running UNIX or other OS supporting X clients

� Separates graphical interface and manipulation from application

� Combine applications running on multiple computers

Page 4: Unix Window System

4

Design decisions for X11 (from Wikipedia)

� Do not add new functionality unless you can think of an application that will use it.

� It is as important to decide what a system is not as to decide what it is. Do not serve all the world's needs; rather, make the system extensible so that additional needs can be met in an upwardly compatible fashion.

� The only thing worse than generalizing from one example is generalizing from no examples at all.

� If a problem is not completely understood, it is probably best to provide no solution at all.

� If you can get 90 percent of the desired effect for 10 percent of the work, use the simpler solution.

� Isolate complexity as much as possible.

� Provide mechanism rather than policy. In particular, place user interface policy in the clients' hands.

Lenwood Heath, Virginia Tech, Fall, 2004 8

Window Manager

�Window manager runs on top of X11 and within a desktop manager

� Place borders, sliders, and other widgets on windows to provide the interface look and feel

� Examples: � kwin— default for KDE

� metacity— default for GNOME

� mwm—Motif standalone window manager

Page 5: Unix Window System

5

Lenwood Heath, Virginia Tech, Fall, 2004 9

Features of X

� Transparent remote execution

� Gives each program its own virtual screen

� Includes important windowing concepts

� Window damage

� Window reveal events

� Backing store

� X11 programs are highly portable

Lenwood Heath, Virginia Tech, Fall, 2004 10

Desktop Environment

� Desktop environment organizes display into an integrated environment

� Includes file managers (Nautilus), icons,

panels, configuration tools, and applets

� GNOME (GNU)

� built on GIMP Toolkit (GTK+)

� KDE (uses Qt C++ libraries)

� XFce (GTK+ based)

Page 6: Unix Window System

6

Lenwood Heath, Virginia Tech, Fall, 2004 11

XFCE Screenshot

Lenwood Heath, Virginia Tech, Fall, 2004 12

Gnome Screenshot

Page 7: Unix Window System

7

Lenwood Heath, Virginia Tech, Fall, 2004 13

KDE

Lenwood Heath, Virginia Tech, Fall, 2004 14

Advanced desktop features

� Traditional 2D is rather old

� Future: OS X expose / Windows flip

� X11's answer: Compiz / Beryl

Page 8: Unix Window System

8

Lenwood Heath, Virginia Tech, Fall, 2004 15

Apple Expose

Lenwood Heath, Virginia Tech, Fall, 2004 16

Windows Flip

Page 9: Unix Window System

9

Lenwood Heath, Virginia Tech, Fall, 2004 17

Compiz Features

Lenwood Heath, Virginia Tech, Fall, 2004 18

Compiz Features

Page 10: Unix Window System

10

Lenwood Heath, Virginia Tech, Fall, 2004 19

Compiz Features

Lenwood Heath, Virginia Tech, Fall, 2004 20

Compiz Features

Page 11: Unix Window System

11

Lenwood Heath, Virginia Tech, Fall, 2004 21

M$ vs Unix

� One way for everyone vs choice and flexibility

�Minimalist / Heavyweight

� Interoperability with other software

� Community versus Company vision

Lenwood Heath, Virginia Tech, Fall, 2004 22

X11 on Windows

� Cygwin can turn windows into an X11 terminal

� Start up cygwin and type startx

� You can use commands such as xclock xeyes

� Running programs from rlogin.cs.vt.edu

� Type ssh -X [email protected]

� Use xclock or xeyes to verify it works

Page 12: Unix Window System

12

KDE on XP *shudder*

Windows on X11

� Two methods to get your Windows programs running under X11� Emulation

� WINE

� Virtualization� VMWARE / XEN

Page 13: Unix Window System

13

WINE

� Open source implementation of the windows API

� Can run several windows programs, not everything works

� Commercial variants� Cedega (transgaming.com)

� CrossOver (codeweavers.com)

� Free version: http://www.winehq.org/

Wine screenshot

Page 14: Unix Window System

14

Virtualization

� Several operating systems on one computer

� Can run windows 2k/xp/vista inside of linux or linux inside of 2k/xp/vista

� Has some overhead / doesn’t allow games (starting to change)

� VMWare (www.vmware.com)

� XEN (www.xensource.com)