xhost , Xserver, Xterminal ...

What is xhost ?

The xhost program is used to add and delete host names or user names to the list allowed to make connections to the X server. 

bash-2.05# which xhost
/usr/openwin/bin/xhost

or

% which xhost
/usr/X11R6/bin/xhost

What is Xserver ?

Example for Xserver: Xvnc

X is the generic name for the X Window System display server. It is frequently a link or a copy of the appropriate server binary for driving the most frequently used server on a given machine.

An X server is a server of connections to X terminals in a distributed network that uses the X Window System. From the terminal user's point-of-view, the X server may seem like a server of applications in multiple windows. Actually, the applications in the remote computer with the X server are making client requests for the services of a windows manager that runs in each terminal. X servers (as part of the X Window System) typically are installed in a Unix-based operating system in a mainframe, minicomputer, or workstation.
The X server may be compared to Microsoft's terminal server product except that the latter is running on a Windows-based operating system. However, there are X servers designed to run on a Microsoft Windows-based operating system.

What is Xterminal ?
 An X terminal is typically a disk less computer especially designed to provide a low-cost user interface for applications that run in a network X server as part of a distributed X Window System. Typically, X terminals are connected to a server running a Unix-based operating system on a mainframe, minicomputer, or workstation.
X terminals (and the X Window System) appear to have been the forerunner for what is now generally called "network computers" or thin clients. The X Window System and X terminals continue to offer an alternative to Microsoft's terminal server product and their NetPCs.
Example : putty
Case Study:
  • Using a xterminal, telnet to a server.(say using root user) Ex : server1
  • Start the Xserver application say VNC on server1
  • Now Xserver(vncserver) is running on this server1 exports all Display stuff to a particular port(say port number 2).
  • User(root) who started this vncserver can now able to see all his display related stuff by exporting DISPLAY environmental variable.
          ex  :export DISPLAY=server1:2
  • Using xterminal new user say user1 has telnet to the server1.
  • Now user1 wants to use the same VNC server for his dispaly stuff.
  • He just exported DISPLAY variable as follows
           export DISPLAY=server1:2
  • When we try launching a window it may not happen ...
So solution for this is to run a command on server1 ....
Command : 
xhost +

Xhost accepts the following command line options described below. For security, the options that effect access control may only be run from the "controlling host". For workstations, this is the same machine as the server. For X terminals, it is the login host.
-help
Prints a usage message.
[+]name
The given name (the plus sign is optional) is added to the list allowed to connect to the X server. The name can be a host name or a user name.
-name
The given name is removed from the list of allowed to connect to the server. The name can be a host name or a user name. Existing connections are not broken, but new connection attempts will be denied. Note that the current machine is allowed to be removed; however, further connections (including attempts to add it back) will not be permitted. Resetting the server (thereby breaking all connections) is the only way to allow local connections again.
+
Access is granted to everyone, even if they aren't on the list (i.e., access control is turned off).
-
Access is restricted to only those on the list (i.e., access control is turned on).
nothing
If no command line arguments are given, a message indicating whether or not access control is currently enabled is printed, followed by the list of those allowed to connect. This is the only option that may be used from machines other than the controlling host.

To get the proper display for VNC sessions ?
Go to /.vnc
And find the file xstartup
make the file look like below and start a new vnc session.

bash-2.05# cat xstartup
#!/bin/sh
/usr/dt/bin/Xsession
#xrdb $HOME/.Xresources
#xsetroot -solid grey
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
##twm &




0 comments to "xhost , Xserver, Xterminal ..."

Post a Comment

Whoever writes Inappropriate/Vulgar comments to context, generally want to be anonymous …So I hope U r not the one like that?
For lazy logs, u can at least use Name/URL option which doesn’t even require any sign-in, The good thing is that it can accept your lovely nick name also and the URL is not mandatory too.
Thanks for your patience
~Krishna(I love "Transparency")

Popular Posts

Enter your email address:

Buffs ...

Tags


Powered by WidgetsForFree

Archives