|
NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
question about X inner working(and netbsd's)
Someone said that X do not open a tty.
Then how is it called, the place that one can access through CtrL+ALT+F[6-9] and which show graphical things ? How can we say to run but to not occupy the screen, to do everything like it would run Xserver without actually messing with the screen, or if you want, without sending binary data(which I caught with 'script') that used to be pictures when it works ? I am not programmer(not yet) but I would like to know more about the systems's inner working. The question was to begin with, why 'X > /dev/null 2>&1' doesn't nullify the graphical ouput, as I thought it was just in the end an virtual terminal made busy with pictures. Thanks |
|
|||
But, talking about your schema, what are you accessing to when you switch from a tty to graphical display ? An x terminal ?
|
|
||||
I don't run an embedded X display, and have no X Terminals. My X Servers that I run on OpenBSD consist of 365 files. These are comprised of:
The libraries predominantly consist of hardware drivers for video cards, mice, displays, and keyboards. For example, there are six libraries that have the name "radeon" among the library files included with OpenBSD's X Server. Both NetBSD and OpenBSD use the X.Org implementation of the X Windows System, but there are packaging and operational differences. Last edited by jggimi; 29th August 2014 at 09:56 PM. Reason: typo |
|
||||
Quote:
|
|
|||
thanks, that was very clear.
And, are wsconsole attached to file descriptor, like exec 4 < /dev/something ? I want to be able to say : from this wsconsole, open that program, but send the errors in that one, and normal output in that one. Last edited by spermwhale_warrior; 30th August 2014 at 05:16 PM. |
|
||||
Quote:
If you're working in a terminal, you can get the name of that terminal using the tty(1) command, e.g., $ tty /dev/ttyE2 Actually this is the device file that corresponds to the terminal you're working in (a text wsconsole). Now, suppose you want to send the stdout of a program to a different terminal, say ttyE3. Then you can direct it there like this: $ echo foo > /dev/ttyE3 and you should see "foo" displayed on the other terminal, provided you have write permission on that terminal. You can check this from the permissions shown in $ ls -l /dev/ttyE3 You may need to be logged in on ttyE3 to have the necessary permissions. Similarly you could send stderr to another terminal, or take input from another terminal. Does this help with what you want to do? I also wanted to mention some man pages: ttys(5) wscons.conf(5) ttyaction(5) These are files in /etc that are used to configure terminal things. The pages refer to other useful pages too. |
|
|||
Absolutely ! That is exquisite. This kind of information is way much difficult to find for a beginner.
|
|
||||
I've just been fooling around with this a bit and been unable to demonstrate this part. Not sure if it can't be done, or more likely I haven't figured out the trick.
EDIT: Partial success. What I was doing, on ttyE1, was: $ cat >/dev/null </dev/ttyE2 then type in ttyE2. Nothing showed on ttyE1, but maybe it was being sent to /dev/null without echoing. So I changed it to: $ cat >myfile </dev/ttyE2 This would put something into myfile, without echoing it. But not the first stuff coming from ttyE2. It would seem to "get stuck" and text typed then would go into myfile. Needed Ctrl-C to break out. Weird. Anyway, this part probably isn't what you wanted to do. Last edited by IdOp; 31st August 2014 at 01:22 AM. |
|
|||
THAT is what I want. It is surprising that we found an impredictable behavior.
It should work, or at least we should know that it can't. (cat < /dev/ttyE2) | tee myfile do not echo anything in myfile, and on ttyE2 was a ongoing string of yes. insteat, it occupy the current tty, like it was waiting data. But nothing got on the file. I thought I understood the logic of echo, cat, tee and the redirections, but it seems there are some mysteries yet. |
|
|||
I am thinking that you are slightly misunderstanding redirection.
Only a 'file' can be redirected. 'X' 'pages' are created in video ram and then sent to the screen, (/dev/tty).
__________________
Linux since 1999, & also a BSD user. |
|
|||
And no special files are created to grant raw bitmap access to them ? Ok.
Yet, I don't why it is able to call forth an ongoing column of yes from a tty, to another. It could duplicate the text output. |
|
||||
Quote:
Granted, there is a theoretical question here of how it works, that could be studied for a long time. But I'm not really sure why you would want to do this. Maybe I haven't read the other posts carefully enough and it is explained there. Quote:
|
|
||||
I think we should take a step back, and level set based on a question in the first post in the thread, as there may be some confusion.
Quote:
X Clients may or may not use standard files. They are optional. To add some confusion, among X Client applications are terminal (tty) emulators such as xterm. These are used to run interactive shells, which may include manipulating applications that use standard files -- whether these applications happen to be other X Clients or not. Last edited by jggimi; 31st August 2014 at 05:33 PM. Reason: typos |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
WPA Not working on some routers? | xmorg | FreeBSD General | 3 | 30th April 2011 04:36 PM |
Mouse:X (not-working) and tty-Console (working), in 8.0 | ykt | FreeBSD General | 1 | 22nd December 2009 12:26 PM |
Working with CVS? | Zmyrgel | OpenBSD General | 15 | 6th October 2009 01:32 PM |
external drive partition question + fdisk question | gosha | OpenBSD General | 15 | 15th June 2009 02:00 PM |
hardware not working | Terminal-Chaos | FreeBSD General | 2 | 29th May 2008 05:32 AM |