xwn740 x-windows configuring and using running x clients (chapter 7: pages 112-115)

13
XWN740 X-Windows Configuring and Using Running X Clients (Chapter 7: Pages 112-115)

Upload: madison-suzanna-wood

Post on 17-Jan-2018

227 views

Category:

Documents


0 download

DESCRIPTION

X Windows & Hardware Running X Clients Since most X applications don't need to interact directly with user, they can be run in the background. The ampersand symbol & follows the command to run in the background. If the terminal (that initiated the X application) is closed, it may close the application, unless the nohup command is used (i.e. The “No hangups” command...)‏

TRANSCRIPT

Page 1: XWN740 X-Windows Configuring and Using Running X Clients (Chapter 7: Pages 112-115)

XWN740

X-WindowsConfiguring and Using

Running X Clients(Chapter 7: Pages 112-115)

Page 2: XWN740 X-Windows Configuring and Using Running X Clients (Chapter 7: Pages 112-115)

Agenda

  Running X Clients:

Running X Clients Background Operation Geometry Running non-graphical Applications

Page 3: XWN740 X-Windows Configuring and Using Running X Clients (Chapter 7: Pages 112-115)

X Windows & Hardware

  Running X Clients

Since most X applications don't need to interact directly with user, they can be run in the background. The ampersand symbol & follows the command to run in the background.

If the terminal (that initiated the X application) is closed, it may close the application, unless the nohup command is used (i.e. The “No hangups” command...)

Page 4: XWN740 X-Windows Configuring and Using Running X Clients (Chapter 7: Pages 112-115)

X Windows & Hardware

  Examples:

xcalc (will terminate if terminal window that started xcalc closes)

nohup xcalc (xcalc will continue to run if terminal window closes)

Page 5: XWN740 X-Windows Configuring and Using Running X Clients (Chapter 7: Pages 112-115)

X Windows & Hardware

  Storing Stderr / Stdout

When running X applications in the background, standard error (stderr) messages my not be displayed in the graphical X Windows session.

In this case, the application can be run at the shell prompt while redirecting stdout and stderr to a file to be viewed from the shell prompt to help understand what went wrong...

Page 6: XWN740 X-Windows Configuring and Using Running X Clients (Chapter 7: Pages 112-115)

X Windows & Hardware

  Example

  nohup kcalc > kcalc.log 2>&1 & How it works:

Standard output (stdout) from “nohup kcalc” command is redirected to a file called kcalc.log. After stdout has been redirected to file, any standard Error (stderr) message is also added to kcalc.log file...

Page 7: XWN740 X-Windows Configuring and Using Running X Clients (Chapter 7: Pages 112-115)

X Windows & Hardware

  Geometry

Geometry refers to the size and position of windows.

The size and position of an application window can be set by the user from the command-line, but also the window manager can force its own window geometry.

Page 8: XWN740 X-Windows Configuring and Using Running X Clients (Chapter 7: Pages 112-115)

X Windows & Hardware

  Geometry Specification

WIDTHxHEIGHT[+-]XPOSITION[+-]YPOSITION WIDTH and HEIGHT are units of measurement depending

on application (eg. Pixels for apps like kcalc and characters for apps like xterm)

XPOSITION and YPOSITION indicates vertical coordinates (in pixels) from the screen corner

A plus sign (+) indicates coordinate from upper-left corner of the screen and a minus sign (-) indicates coordinate from lower-right corner of the screen...

Page 9: XWN740 X-Windows Configuring and Using Running X Clients (Chapter 7: Pages 112-115)

X Windows & Hardware

  Examples

xterm -geometry 80x25+50+100 xterm -geometry 80x25-50-100 xterm -geometry 80x25+50-100 xterm -geometry 80x25-50+100

Page 10: XWN740 X-Windows Configuring and Using Running X Clients (Chapter 7: Pages 112-115)

X Windows & Hardware

  xwininfo Useful X windows utility to determine size (geometry) of a

specific open window application.Just issue the command in your graphical enviroment, then click on the specific window for information.

The xwininfo command with the -size option can provide information for character-based information to be converted into pixel information....

Page 11: XWN740 X-Windows Configuring and Using Running X Clients (Chapter 7: Pages 112-115)

X Windows & Hardware

  Running Non-Graphical Applications Many applications have been written with a character-

based interface intended for use with a terminal (console).

Examples of these applications range from typical Linux commands such as ls, cp, mv to more elaborate text-based applications such as vi, Midnight Commands (mc), etc....

Page 12: XWN740 X-Windows Configuring and Using Running X Clients (Chapter 7: Pages 112-115)

X Windows & Hardware

  Running Non-Graphical Applications X Windows itself is incompatibe with all character-based

applications (i.e. X itself does not provide a termios interface like text-based console does)

To solve this problem, terminal emulator applications can be used to run a program in a console that provides a termios interface.

Page 13: XWN740 X-Windows Configuring and Using Running X Clients (Chapter 7: Pages 112-115)

X Windows & Hardware

  Examples

xterm -T “Vi Editor” -e vi Gnome-terminal -t “Vi Editor” -e vi Konsole -T “Vi Editor” -e vi

You can refer to coure notes“X Powertools” page 117 for othercool examples....