Exercise 3 – Build X window

Slides:



Advertisements
Similar presentations
Introduction to Linux X-Windows, Desktop Environments Other commonly used programs.
Advertisements

CS 497C – Introduction to UNIX Lecture 37: - X Windows Chin-Chih Chang
Guide to Linux Installation and Administration, 2e1 Chapter 5 Using Linux Graphical Environments.
1. Objective 1 Overview of the Linux Desktop  X Server  Controls Graphical Interface  Manages Input Devices  Transmits Input actions to the client.
Chapter 11: The X Window System Guide To UNIX Using Linux Third Edition.
X Window JianJing Cao (ID #98284). Content Introduction X Window System Function Window Principle How X Window Works Security.
Linux+ Guide to Linux Certification, Second Edition
Lesson 15 – INSTALL AND SET UP NETWARE 5.1. Understanding NetWare 5.1 Preparing for installation Installing NetWare 5.1 Configuring NetWare 5.1 client.
XFree86 Jonathan Billings SCS Facilities. XFree86 ● What is XFree86? ● XFree86 files ● Structure of X configuration file, XF86Config ● Helper programs.
Linux GUI X-Windows System. X-Windows System A stable and extremely powerful GUI system that provides a complete Client/Server framework. The X-org foundation.
Exercise 2, Part (a) – Build X window. Computer Center, CS, NCTU 2 Outline  X Window System Introduction Architecture X11 implementation The Window Manager.
Getting Started with Linux: Novell’s Guide to CompTIA’s Linux+ (Course 3060) Section 2 Use the Linux Desktop.
Chapter 2: Exploring the Desktop The Complete Guide to Linux System Administration.
Virtual Machine and UNIX. What is a VM? VM stands for Virtual Machine. It is a software emulation of hardware. By using a VM, you can have the same hardware.
Terminal Services Terminal Services is the modern equivalent of mainframe computing, in which servers perform most of the processing and clients are relatively.
Linux Shell. 2 Linux Command-Line Interface ■ Linux shells: A shell is a command interpreter that allows you to type commands from the keyboard to interact.
Linux GUI Chapter 5. Graphical User Interface GUI vs. CLI Easier and more intuitive More popular and advanced Needed for graphics, web browsing Linux.
CIS 116SUNY Ulster Chapter L5 – The GUI Karl Wick.
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
X Window System.
SUSE Linux Enterprise Desktop Administration Chapter 2 Use the Linux Desktop.
Linux+ Guide to Linux Certification Chapter Ten The X Window System.
AE6382 Secure Shell Usually referred to as ssh, the name refers to both a program and a protocol. The program ssh is one of the most useful networking.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 13 FTP and Telnet.
X Window System mangoking 2015/09/24. Computer Center, CS, NCTU Outline ❑ X Window System Introduction Architecture X11 Implementation The Window Manager.
X-WindowsP.K.K.Thambi The X Window System Module 5.
XWN740 X-Windows Configuring and Using Session / Window Managers Desktop Environments (Chapter 8: Pages )‏
Chapter Eleven The X Window System. 2 Lesson A Starting and Navigating an X Window System.
1 Lecture 6 Introduction to Process Management COP 3353 Introduction to UNIX.
SCSC 455 Computer Security Chapter 3 User Security.
CIS Lesson 7 X. Understanding X Overview One of the original open source projects Developed at MIT Criticisms of X Handles fonts poorly Security.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco PublicITE I Chapter 6 1 Router Initialization steps.
Explore GNOME The easy way, using a live CD By Carl Weisheit.
 Prepared by: Eng. Maryam Adel Abdel-Hady
Basic UNIX 4: More on the GUI ● How X works ● Window and desktop managers ● File managers ● Common tasks ● System administration tools Iowa State University.
Basic UNIX 4: More on the GUI
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com SSH Thomas Petazzoni Free.
X Window System introduction to Beryl Omid Mottaghi Welcome.
Pasewark & Pasewark 1 Windows Vista Lesson 1 Windows Vista Basics Microsoft Office 2007: Introductory.
System Administration Terminals and the X Window System.
Session / Window Managers
LINUX Shell Programming
Create setup scripts simply and easily.
Guide to Linux Installation and Administration, 2e
Chapter 2: Configure a Network Operating System
SOFTWARE TECHNOLOGIES
Computer Skills windows.
Configuring the X Windows Server
Introduction to Computers
Telnet/SSH Connecting to Hosts Internet Technology.
Chapter 2: Configure a Network Operating System
Chapter 2: System Structures
X Windows.
Web Programming Essentials:
Installing Linux Redhat:
BASIC COMPUTER OPERATION
Windows.
Windows Virtual PC / Hyper-V
X Window System shunyi 2014/09/25.
Remote Computing Services Cloud connection Distributed system
Lecture9: Embedded Network Operating System: cisco IOS
Chapter 2: Operating-System Structures
February 16th, 2004 Class Meeting 5
Lecture 6 Introduction to Process Management
Computer Skills windows.
Computer Skills windows.
Lecture9: Embedded Network Operating System: cisco IOS
How to install and manage exchange server 2010 OP Saklani.
Presentation transcript:

Exercise 3 – Build X window Announced Date: 2005/10/27

Outline X Window System Steps of Exercise Appendix Introduction Architecture X11 implementation The Window Manager Steps of Exercise Install X11 Configuring X11 Install Afterstep Configuring Afterstep Appendix Classic S Apps X Startup Remote X client X11 Forwarding

X Window System (1) Introduction What is X Window System? History The X Windows System, also referred to as ‘X’ or “X11”, is the standard graphical engine for Unix and Linux. It is largely OS and hardware independent, it is network-transparent, and it supports many different desktops. History 1984: The X Window system was developed as part of Project Athena at MIT. 1987: X Version 11 is released. X is now controlled and maintained by the Open Group. 1993: X11R6

X Window System (2) Naming Version Latest version X Window System X Version 11 X Window System, Version 11 X11 Version X11R6 X Window System Version 11 Release 6 Latest version From X.Org X11R6.8.2 Feb.9 2005

X Window System (3) Architecture: A client-server architecture The X client request display service The X server provide display service Communicate with X Protocol

X Window System (4) Client-Server Design Client Server An application written using X libraries (e.g. Xlib) Request service (like create window) Receive events from X server (like mouse input) Server Runs locally and accepts multiple X clients Manage the keyboard, mouse and display device Create, draw and destroy graphic objects on screen

X Window System (5) X Protocol The X Protocol is also divided into device dependent and device independent layers. Advantages of X protocol The X server is highly portable (various OS, Language) The X Clients also have high portability X support most oriented network protocol Local and network based computing look and feel the same

X11 implementation Open-source implementations of X Window System XFree86 project FreeBSD 4.10-Release, 5.2.1-Release Latest Version: 4.5.0 Mar. 16, 2005 Xorg foundation FreeBSD 5.3-Release X11 official flavor Latest Version: 6.8.2 Feb. 9, 2005 From 1992 From 2004

The Window Manager (1) Window Manager A special kind of “X Client” provides certain look-and-feel window in front of you. Background, desktop, theme Virtual desktop Window attributes and operations Size: resize, minimize, maximize Position: Overlap, move

The Window Manager (2) Examples: AfterStep Enlightenment Window Maker Gnome KDE …

Steps of this exercise Install X11 Configuring X11 Install Afterstep Configuring Afterstep

Installing X11 (1) Use cvsup to update your ports Pre-steps: /usr/local/bin/cvsup –g –L 1 /usr/local/etc/cvsup-ports Pre-steps: We use Xorg as our X Server Add the following line in /etc/make.conf X_WINDOW_SYSTEM=xorg Do this line pkg_delete -f /var/db/pkg/imake-4* /var/db/pkg/XFree86-* Your “PATH” environment variable Edit /etc/csh.cshrc set path = (/bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/X11R6/bin )

Installing X11 (2) We use Xorg as our X Server To build and install Xorg from the ports % login as root % cd /usr/ports/x11/xorg % make install clean If you want to install XFree86 % cd /usr/ports/x11/XFree86-4 It will run about 50 minutes P4 1.8G 1GB Ram 100MB NIC Install Xorg needs 4G free space

Configuring X11 (1) Pre-step – know your hardware Monitor specifications Horizon Synchronization frequency Ex: 31 ~ 81 KHz Vertical Synchronization frequency Ex: 56 ~ 76 KHz Video adaptor chipset Ex: ATi Radeon 9200SE Ex: nVIDIA GeFource FX5200 Ex: ATI Mobility RADEON 7500 (16M) (IBMT30) Video Adapter Memory Ex:128MB

Configuring X11 (2) Steps of X11 configuration Generate an X11 configuration skeleton file % Xorg –configure (Xorg) The file will be put in /root/xorg.conf.new % XFree86 –configure (XFree86) The file will be put in /root/XF86Config.new

Configuring X11 (3) Test the existing configuration % Xorg –config /root/xorg.conf.new (Xorg) % XFree86 –xf86config /root/XF86Config.new (XFree86) If a black and grey grid and an X mouse cursor appear, the configuration was successful Press “Ctrl+Alt+Backspace” to leave the test

Configuring X11 (4) Tune Configuration file Edit /root/xorg.conf.new (Xorg) Edit /root/XF86Config.new (XFree86) Section Monitor Section Screen Section InputDevice Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/sysmouse" Option "ZAxisMapping" "4 5" EndSection Section "Screen" Identifier "Screen0" Device "Card0" Monitor "Monitor0“ DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 24 Modes "1280x1024" "1024x768" EndSubSection EndSection Section "Monitor" Identifier "Monitor0" VendorName "Monitor Vendor" ModelName "Monitor Model“ HorizSync 31.0 - 81.0 VertRefresh 56.0 - 76.0 EndSection

Configuring X11 (5) Copy configuration file to real place % cp /root/xorg.conf.new /etc/X11/xorg.conf (Xorg) % cp /root/XF86Config.new /etc/X11/XF86Config (XFree86) Startup X window % startx [Comment] Switch to Virtual Console Press “Ctrl+Alt+F1~F8” View xinitrc /usr/X11R6/lib/X11/xinit/xinitrc # start some nice programs twm & xclock -geometry 50x50-1+1 & xterm -geometry 80x50+494+51 & xterm -geometry 80x20+494-0 & exec xterm -geometry 80x66+0+0 -name login

Install Afterstep (1) Here we use afterstep as our WM Installation http://www.afterstep.org/ Installation % cd /usr/ports/x11-wm/afterstep-stable % make –DWITH_DIFFERENT_LOOKNFEELS –DWITH_SAVEWINDOWS install clean

Install Afterstep (2) Configuring X11 to use afterstep Edit “xinitrc” File Location: System Default: /usr/X11R6/lib/X11/xinit/xinitrc Personal: ~/.xinitrc Format: just like a shell script! System Default To execute afterstep # start some nice programs twm & xclock -geometry 50x50-1+1 & xterm -geometry 80x50+494+51 & xterm -geometry 80x20+494-0 & exec xterm -geometry 80x66+0+0 -name login # start some nice programs exec afterstep

Install Afterstep (3) Run Your X-Window Usage % startx Ctrl + Alt + Backspace  force to quit X Left button: copy Right button: paste

AfterStep Configuration (1) Location of configuration file Global configuration file directory /usr/X11R6/share/afterstep/ Personal configuration file directory ~/.afterstep/ When AfterStep starts Personal configuration first It first tries to read personal configuration files, and then read global configuration files for those not found. Follow “.include” configuration Global configuration if missing personal configuration To make personal configuration Copy what you want to change from global to personal and modify it. And Add “.include” to include other global you need.

AfterStep Configuration (2) Pager module WinList Wharf module Start menu WinTab Animation feel look MinitorWharf

AfterStep Configuration (3) Under /usr/X11R6/share/afterstep/ Name Purpose base Afterstep configuration file autoexec Define what is run when AfterStep starts and restarts animate Animate Module configuration file pager Pager module configuration file wharf Wharf/MonitorWharf module configuration file winlist WinList module configuration file start/ Start menu when you click left button feels/ Define how AfterStep feels looks/ Define how AfterStep looks

AfterStep Configuration (4) Steps to add something to start menu install your favorite applications first Add entry under directory Edit the entry file Update menu % ls 0_Applications 3_Screen_savers 6_nop 1_Desktop 4_Windows 7_About_AfterStep 2_Modules 5_Quit Exec “Firefox" exec firefox & MiniPixmap "mini-app.xpm" % ls 0_Applications 3_Screen_savers 6_nop 1_Desktop 4_Windows 7_About_AfterStep 2_Modules 5_Quit f_firefox

AfterStep Configuration (5) Add something to wharf module Edit wharf configuration file (ex. add Term Folder) … *Wharf Terms large/Monitor1,dots/3_dots Folder *Wharf aterm aterm Exec "-" aterm -tr -tint blue -fg yellow -bg black & *Wharf rxvt rxvt Exec "-" rxvt -tr -fg yellow -bg black & *Wharf eterm eterm Exec "-" Eterm -O --tint blue -fg yellow -bg black & *Wharf xterm xterm Exec "-" xterm -fg yellow -bg blue & *Wharf ~Folder

Appendix A: classic x apps (1) xterm xclock

Appendix A: classic x apps (2) xeyes xbiff xman Not this

Appendix B: X Startup (1) xinit - X Window System initializer xinit [ [ client ] options ] [ -- [ server ] [ display ] options ] Files Default client script: ~/.xinitrc /usr/X11R6/lib/X11/xinit/xinitrc (run xterm if .xinitrc does not exist) Default server script: ~/ .xserverrc / usr/X11R6/lib/X11/xinit/xserverrc (run X if .xserverrc does not exist) startx: script to initiate an X session

Appendix B: X Startup (2) xdm - X Display Manager Xdm provides services similar to those provided byinit, getty and login on character terminals Files: /etc/ttys Default script ~/.xsession ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm on secure

Appendix C: remote x-client To launch an X client from a remote host for display on the local X server, you need to do following steps: Start X Server with tcp connection support %startx -listen_tcp Permit for the remote host to display X clients on the local machine. %xhost +remotehost set DISPLAY for remote X clients %setenv DISPLAY=server:display [hostname]:displaynumber[.screennumber] not needed if localhost “0” in most cases defaults to “0”

Appendix D: X11 forwarding To forward X11 connection Connection to X11 DISPLAY can be forward by ssh, any X11 programs started will go through the encrypted channel. Server: Enables X11 forwarding: ssh -X Enables trusted X11 forwarding: ssh –Y Client: Execute any X clients you want ※Note: X11 forwarding can represent a security hazard. X11 forwarding should be enabled with caution. Users with the ability to bypass file permissions on the remote host (for the user's X authorization database) can access the local X11 display through the forwarded connection. An attacker may then be able to perform activities such as keystroke monitoring.