04.04.2013 Views

Introduction to Unix and Networks

Introduction to Unix and Networks

Introduction to Unix and Networks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

managers: twm, olwm, kwin,<br />

Pr int Ser ver<br />

client<br />

application<br />

Window<br />

manager<br />

Screen Server<br />

X-windows Client-Server couplets wor king across a networ k<br />

Note that the Client <strong>and</strong> Manager proceses do not need <strong>to</strong> be running on the local machine. Infact, it is<br />

common <strong>to</strong> distribute X applications around the networ k, in order <strong>to</strong> exploit the available processing <strong>and</strong><br />

s<strong>to</strong>rage facilities. With such a powerful <strong>and</strong> flexible system, there is a real danger of unwanted data arriving<br />

on your screen. The first level defence is <strong>to</strong> s<strong>to</strong>p all "foreign" hosts from sending data <strong>to</strong> your screen:<br />

$xhost -<br />

This s<strong>to</strong>ps all the fun! So normally you would open up <strong>to</strong> trusted remote machines or friends:<br />

$xhost +kenny +rwilliam +164.11.222.164<br />

With this arrangement, new windows can be opened on your machine from anyone running on kenny orkyle,<br />

or rwilliam from any machine.<br />

If you are running a client X application (in fact practically any <strong>Unix</strong> program) <strong>and</strong> wish <strong>to</strong> display remotely,<br />

the client process has <strong>to</strong> send X data acros the networ k <strong>to</strong> the selected target screen. This can be done be<br />

setting theDISPLAY environment var iable on the client machine:<br />

$export DISPLAY=target_machine:0.0<br />

The term target_machine can be either the IP or the domain name of the machine This will of course mean<br />

that all o/p will get redirected <strong>to</strong>the same remote machine, soanalter native is<strong>to</strong>use an X comm<strong>and</strong> line<br />

parameter when starting the application:<br />

$xeyes -display 164.11.253.36:0.0<br />

Following this introduction <strong>to</strong> parameters for X applications, there is also font control.<br />

$emacs -font -*-helvetica-*-r-*-*-*-120-*-*-*-*-*-* &<br />

The font name is <strong>to</strong>o complex <strong>to</strong>type in, even though only 3 of the fields are necessary. Use the font browser<br />

xfontsel <strong>to</strong> view the available fonts, copy the name specifier using the [select] but<strong>to</strong>n, <strong>and</strong> paste it back on<strong>to</strong><br />

the comm<strong>and</strong> line using the middle mouse but<strong>to</strong>n.<br />

$xfontsel &<br />

9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!