Re: start X11 app on second X11 screen/virtual console
- From: "Enrique Perez-Terron" <enrio@xxxxxxxxx>
- Date: Fri, 13 Jan 2006 11:05:45 +0100
On Fri, 13 Jan 2006 00:11:36 +0100, <g18c@xxxxxxxxxxx> wrote:
Hi, i would like to run an X11 app on startup... simple request but
after a bit of diggin i have hit a problem with my very newbie skills
(or lack thereof!)
If I Alt+Fn away from the X11 terminal to another text virtual console,
and try and run an X11 app will it fail? Im presuming the app will
fail, saying it cant find a X11 server
X applications look for an environment variable DISPLAY. Shells started
in a virtual console don't usually have this variable, and yes, the
application will say it does not find the display.
Say "export DISPLAY=:0", and the applications you start from that shell
will find it.
(i have seen that when remote
X11 over ssh and my XMing server crashes)... therefore i cant run the
app
When running an application on another computer (than the one having the
video monitor) you need to tell the application where to connect to the
X server. (The computer having the monitor is the "X server", even you
would swear your desktop was a client, not a server...)
export DISPLAY=host.domain.com:0
export DISPLAY=192.168.1.13:0
For these to work, the X on host.domain.com or 192.168.1.13, must listen
on a tcp socket, not just a unix-domain socket, and it must be set up
to allow connections from the computer the application runs on. See man
xhost for this part. See man Xserver and look for -no-listen.
There is another way too. If you use the "-X" option to ssh, the remote
sshd will set up a local socket on the remote side, and the shell will
have DISPLAY=:10 or something similar. (The number after the colon is the
display number. If a computer has three monitors, and running X on all of
them, they would be addressed :0, :1, and :2.)
With "ssh -X", applications running on the remote computer will think they
are using a "local display", i.e. on the remote computer, but listening on
that socket is sshd, not X. Sshd forwards everything sent to this socket
through the ssh encrypted channel, and the local (to you) ssh forwards the
data to the :0 on your local computer. :0 or whatever the local DISPLAY
points to.
as a daemon as these are console based processes.
A daemon running on X? What exactly is a daemon? Before X was invented,
these two definitions were almost equivalent: A program that is not attached
to a terminal, and one that does not interact (directly) with a user.
Since X was invented, most programs running on X are not connected to
a terminal, but they are indeed interactive.
But "console based processes" on X? That would be a feat. For a program
to show anything on X, it has to speak the X protocol, and do so with
X. You can't just send arbitrary ascii text down a pipe or socket to
X and expect X to show that somewhere. In principle, nothing prevents
a process, which has been programmed to do so, from sending text to
a terminal and also sending X protocol messages to an X server, but
I have never heard of any such programs - oops, I am forgetting xvidtune.
Ok *some* such programs do exist.
Presuming these assumptions are correct, the next best thing would be
to have the app run up automatically and be accessible on, for example,
virtual console 5. How would i go about running an X11 app like this?
I don't understand. Next best for what? What programs would you like
to run, what do they do? etc.
I've seen it done before with running text based apps from inittab, but
never X11. Would i need to use a display manager and go from there?
I know the above questions may be confusing and i apologise for my lack
of knowedge, hopefully someone can see what im trying to achieve and
kick me in the right direction.
I hope this clarifies something.
-Enrique
.
Relevant Pages
- Re: making fonts look same in Ghostscript and X11
... look *exactly* like it does in my X11 app. ... the rendering for individual glyphs. ... Xorg 6.8.1.902, GNU Ghostscript 7.07, 100dpi display). ... X11 - my app just needs to manipulate text on a display, ... (comp.lang.postscript) - Re: Async Socket IO Question
... I think you're mostly bumping into Socket Timeout issues. ... If you kill the process of your client app, the TCP session isn't cleanly ... When your server sends to the client app, that send happens just fine (the ... (microsoft.public.dotnet.framework) - Re: Linux and OS wide events
... I am new to Linux programming. ... app that needs to dispatch events using C++. ... Registration requests will cause the socket the request appeared on to be added to the list of sockets messages of the requested kind will be "broadcasted" to. ... (comp.os.linux.development.apps) - CPU Usage 100%
... Socket connection, ... the refresh timers are only initiated when the data has been ... When I start the app, ... it seems my message handling procedure and it's ... (microsoft.public.win32.programmer.ui) - CPU Usage 100%
... Socket connection, ... the refresh timers are only initiated when the data has been ... When I start the app, ... it seems my message handling procedure and it's ... (microsoft.public.win32.programmer.kernel) |
|