Question:
Hi Plz provide me help in computer science assign.?
2008-06-04 13:39:01 UTC
Display variable & Display option of X-client

how to run the program on remote machine ....

please tell me complete programming or coding for that..
Three answers:
Himanshu Sharma
2008-06-04 14:18:09 UTC
Display variable is used to Direct the X client program (running on the remote machine) to write their output to a different terminal. The Defining and exporting of Display variable is done as follow: I am writing only commands not whole theory ok,

Example of a Typical Use

Assume the IP address of the local host is 128.100.2.16 and the IP address of the remote host is 17.200.10.5. Depending on the network you are on, you may also be able to use the computer names (domain names) instead of the IP addresses.

Step 1. On the local host

Type the following at the command line:

% xhost + 17.200.10.5

< press return >

Step 2. Log on to the remote host

% telnet 17.200.10.5

Step 3. On the remote host (through the telnet connection)

Instruct the remote host to display windows on the local host by typing:

% setenv DISPLAY 128.100.2.16:0.0

at the command line. (Instead of setenv you may have to use export on certain shells.)

< press return >

Step 4. Now you can run software from the remote host.

E.g.: when you type % xterm on the remote host, you should see an xterm window on the local host.

Step 5. After You Finish

You should remove the remote host from your access control list as follows. On the local host type:

% xhost - 17.200.10.5

< press return >

Quick Reference - xhost

• xhost + hostname: Adds hostname to X server access control list.

• xhost - hostname: Removes hostname from X server access control list.

• xhost + : Turns off acccess control (all remote hosts will have access to X server)

• xhost - : Turns access control back on.

Important: Use the man command (% man) to see how a command is used on your particular computer.





I hope this will help u very much….
mizokid
2008-06-04 14:22:37 UTC
You can use the LabF XDK to develop local X clients. Local X clients are X windows client applications built to run on a PC (under MS Windows) instead of a UNIX host.

Local X support permits X windows clients to be started and/or displayed locally or remotely on other X servers in the network. Local X support also permits local X clients to run on stand-alone PCs without network support.



To create a local X client, you can use the contents of the LabF XDK in conjunction with the MS Visual Studio 6.0 application development tool.



You need to prepare the source code for your X client for MS Visual C++ development in the following way:



1 Make the following changes to the source code:



a) If you are creating a GUI application X client, change all instances of the fprintf function to STDERR or STDOUT to calls to printf, lprintf, or some other means of displaying output.



b) Change memory allocation and de-allocation routines to their Xlib counterparts.



2 Check for any incompatibilities between MS Windows 9x/ME/NT4/2000/XP and UNIX, including the following:



a) Ensure that there is no UNIX-dependent code that is incompatible with MS Windows 9x/ME/NT4/2000/XP. For example, you must rewrite code that uses such items as timers, mailboxes, and STDIN (for GUI applications).



b) Ensure that the code does not use any keywords reserved for the MS Windows 9x/ME/NT4/2000/XP C compiler as variables, labels, or application-defined function names.



3 Ensure that all functions are properly prototyped.



4 Ensure that the compiler and linker options are correct. You can find the correct options in the sample make files in the source directory.



Any X application uses the variable DISPLAY to determine where the X server is located. Therefore, you must set the DISPLAY explicitly even when the application is running on LabF Xserver (WinaXe, Winaxe Plus or AceaXe Plus) (even though you might expect the application to use the X server on the local machine).



If you run an X client from XServer, DISPLAY is set to 127.0.0.1 (i.e. to localhost). If you try to run the X application directly (say by double-clicking the application icon in Explorer) then the value for DISPLAY should be set in the MS Windows environment or passed directly to the X application via the command line in the shortcut. In LabF Xserver (WinaXe, Winaxe Plus or AceaXe Plus), if you do not specify the command line parameter for DISPLAY, the default value will be 127.0.0.1 (i.e. localhost).
no1home2day
2008-06-04 13:48:49 UTC
Huh??? You want someone else to do your homework FOR you? Isn't that called "cheating"? Hey, show me what you've got so far, and I can HELP you, but I won't do it FOR you!


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...