LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-18-2022, 07:44 PM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
terminology for X


X Windows can detach itself from the console display device and associated input devices allowing those devices to be used by another instance of X or the Linux kernel as virtual text consoles. what i want to know is what is the correct terminology for this that experts of X would know.
 
Old 04-19-2022, 08:07 AM   #2
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,673

Rep: Reputation: 487Reputation: 487Reputation: 487Reputation: 487Reputation: 487
Not sure if it's correct but i would call it an X-Terminal. I used to be involved in repairing Sun Microsystems kit, we had quite a few X-Terminals whose only job was, as a client, to provide a display and keyboard/mouse input to the host server elsewhere. All the OS and data was on the server, on switch on the X-Server was uploaded with the necessary display terminal handling program. There used to be a program called SLXT (Looks like it may mean something different nowadays!) which allowed a Sun X-Terminal with a 50Mhz Sparc processor and at least 12Mb of RAM to run an X Server session from a Linux powered box.

My

Play Bonny!

 
Old 04-19-2022, 08:07 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,740

Rep: Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923
X uses the client server model and has always been "detached" although for most users both run on the same physical device.

https://en.wikipedia.org/wiki/X_Window_System
 
Old 04-19-2022, 08:19 AM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
It is the elegant and efficient system that Microsoft's "remote desktop" never could be.
 
Old 04-19-2022, 08:21 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,923

Rep: Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319
Quote:
Originally Posted by Skaperen View Post
X Windows can detach itself from the console display device and associated input devices allowing those devices to be used by another instance of X or the Linux kernel as virtual text consoles. what i want to know is what is the correct terminology for this that experts of X would know.
I don't understand what do you mean by that.
X does not detach itself from the console it was started from. Instead, it redirects the events "arrived" on the given device to the appropriate window (depending on the focus to the terminal or browser or whatever). X will generate virtual terminals for terminal emulators and other apps and those apps will handle their virtual (or pseudo) terminals as their real tty. But at the end all the events are generated by the only mouse and keyboard and X will forward them to those virtual ttys.
This virtual device is called pts, pseudo terminal, that's why it is pts and not tty. see man pts.
But probably I misunderstood and you are looking for something else.
 
Old 04-20-2022, 05:20 PM   #6
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
every response seems to be referring to a client or a virtual terminal which communicates with an X server over an octet stream connection using the X protocol. i am not referring to any client nor any virtual terminal. Linux is capable of hosting multiple instances of an X server. each will be associated with a different console virtual terminal allowing the user to switch which instance of X is being used at the computer's console. the user can do this by pressing (typically) Ctrl+Alt+Fn where n is the console virtual terminal to be operated by the user. when this switch takes place between X servers the current X server quits using the console (display, keyboard, mouse) and the next X server begins using that console.

my question was what term is used within X windows to refer to this kind of switching.
 
Old 04-20-2022, 06:03 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,740

Rep: Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923Reputation: 5923
I do not know exactly it works but no different from switching between any virtual console. Most distributions create 6 virtual consoles F1-F6, the 1st X server is F7 and the second is F8 and so on but it is configurable. You can switch between any one when X is running using ctrl-alt F1-FX. If X is not running alt F1-6 is used.
 
Old 04-21-2022, 12:14 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,923

Rep: Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319
Quote:
Originally Posted by Skaperen View Post
every response seems to be referring to a client or a virtual terminal which communicates with an X server over an octet stream connection using the X protocol. i am not referring to any client nor any virtual terminal. Linux is capable of hosting multiple instances of an X server. each will be associated with a different console virtual terminal allowing the user to switch which instance of X is being used at the computer's console. the user can do this by pressing (typically) Ctrl+Alt+Fn where n is the console virtual terminal to be operated by the user. when this switch takes place between X servers the current X server quits using the console (display, keyboard, mouse) and the next X server begins using that console.

my question was what term is used within X windows to refer to this kind of switching.
That is still wrong. Actually using Ctrl-Alt-Fn (or Alt-Fn without X) you will be able to switch your consoles. You can use only one of them. X is initially attached to tty1 or tty2 or ttyN, and you will only see the one which is attached to the current console. Other ones will still work and would be able to handle keyboard and mouse events, but kernel always sends them to the active console which will forward them to the app running on that console (which is the X server itself).
 
Old 04-21-2022, 02:28 AM   #9
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,828
Blog Entries: 1

Rep: Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069
Quote:
Originally Posted by Skaperen View Post
my question was what term is used within X windows to refer to this kind of switching.
To me the switching doesn't seem to exist within X Windows. See man chvt.
 
Old 04-21-2022, 09:49 PM   #10
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by mrmazda View Post
To me the switching doesn't seem to exist within X Windows. See man chvt.
X still has to handle the switch. both Xs need to when switching from one X to another one. suppose you switch from X on F7 to X on F8. X on F7 must release resources it (video driver) is using on the video hardware and know not to write the video RAM. X on F8 now takes over and updates the video RAM. it can even be running a different video mode (i used to do that with 3 modes, many years ago). i even tried 4K video that way in 2019.

you can have quite a mess if multiple Xs are updating the display at the same time.

it is a switch between Xs but they must cooperate for it to work. also, X gets the keypress events for Ctrl + Alt + F8 so it has to get things started. i don't know all the nitty gritty details of the switch.

now days lightdm manages this on Xubuntu. i have run as many as 22 instances of X at once. at this moment i have 16 (:0 .. :15) running and am using :2. i use dm-tool to do the switching via shortcut hotkeys.
 
Old 04-21-2022, 10:03 PM   #11
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by pan64 View Post
That is still wrong. Actually using Ctrl-Alt-Fn (or Alt-Fn without X) you will be able to switch your consoles. You can use only one of them. X is initially attached to tty1 or tty2 or ttyN, and you will only see the one which is attached to the current console. Other ones will still work and would be able to handle keyboard and mouse events, but kernel always sends them to the active console which will forward them to the app running on that console (which is the X server itself).
i think we are just using different terms for the same things.
 
Old 04-22-2022, 12:53 AM   #12
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,923

Rep: Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319
No. X is attached to a terminal like tty1 or similar. It cannot be changed at all, this connection is created when X started and will remain as long as the server process is running. There is no any way to alter it.
When you switch to another terminal (to tty2) the kernel will do that and that means the real keyboard and mouse events will be sent to tty2 (always to the active tty) and also the "content" of tty2 will be displayed. The X on tty1 is still running, accepts events and works as usual, just you can't see that.
Again, the switch is made by the kernel and not by X. The keyboard events (Ctrl-Alt-Fn) are captured and handled by the kernel and will not be sent to the X server (any of them). Theoretically you can use any number of X servers and they do not cooperate, do not communicate with each other (and actually they do not care about that at all).

There is a probably interesting case when you start an X server from a terminal emulator within an X session and not from a tty.
 
Old 04-22-2022, 07:12 PM   #13
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
1. tty1 is not a terminal, it is a virtual terminal. see man chvt. what do you mean by the word "attached"? we apparently disagree on terminology. do you have supporting evidence for your usage?

2. "... just you can't see that." why not? it is because that X server is not updating the hardware video RAM. if both X servers were doing that at the same time, you would be seeing a mess on your real screen.

3. "Again, the switch is made by the kernel and not by X." the truth is that both are involved. X has direct access to the real hardware video chip as granted by the kernel. each unswitched X server knows it is unswitched and pauses such access. if one of them does try to do such an update the kernel may well reject the operation of that syscall; but this is not literally necessary. maybe you mean that the kernel carries out the switching protocol. but both X servers are involved in that.

4. "There is a probably interesting case when you start an X server from a terminal emulator within an X session and not from a tty." have you tried that to see what happens? can you predict what will happen? i can tell you that it will fail and give you an error message (via stderr over the pseudo-terminal being used by that instance of terminal emulator). i doubt it will be much interesting. you could have more fun starting X VNC (see man xvnc when you have it installed).

Last edited by Skaperen; 04-22-2022 at 07:13 PM.
 
Old 04-23-2022, 04:35 AM   #14
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,923

Rep: Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319
Quote:
Originally Posted by Skaperen View Post
1. tty1 is not a terminal, it is a virtual terminal.

see man chvt.
And? Obviously tty1, tty2 ... are all virtual terminals. From this point of view it is completely irrelevant.
Quote:
Originally Posted by Skaperen View Post
what do you mean by the word "attached"? we apparently disagree on terminology. do you have supporting evidence for your usage?
Attached means attached. X server itself is attached/connected to that tty. You do not need to agree with anything, just check the X server process which is running like this:
Code:
$ ps -ef | grep X
pan64       1295    1293  0 15 apr tty2    00:36:58 /usr/lib/xorg/Xorg vt2 -displayfd 3 ......
Quote:
Originally Posted by Skaperen View Post
2. "... just you can't see that." why not? it is because that X server is not updating the hardware video RAM. if both X servers were doing that at the same time, you would be seeing a mess on your real screen.
Because you can always have only one active [virtual] terminal.
Quote:
Originally Posted by Skaperen View Post
3. "Again, the switch is made by the kernel and not by X." the truth is that both are involved.
No. Can you prove it? I don't think so.
You can have a few virtual terminals and you can always select which one do you want to use, regardless of the programs running on that terminal. (yes, X is just a process as any other one). All these terminals have a virtual display and virtual input, but only the active one is connected to the real hardware (by the kernel).
You can imagine something like this: there is a display buffer (attached to the tty) and X will write into it.
Quote:
Originally Posted by Skaperen View Post
X has direct access to the real hardware video chip as granted by the kernel.
No process can have direct access to any part of the real hardware, but the driver. Only the driver can (and allowed to) communicate with the device.
Quote:
Originally Posted by Skaperen View Post
each unswitched X server knows it is unswitched and pauses such access.
No, you need to prove that too. X has no any idea about that state, there is no such thing as switched/unswitched.
Quote:
Originally Posted by Skaperen View Post
if one of them does try to do such an update the kernel may well reject the operation of that syscall; but this is not literally necessary. maybe you mean that the kernel carries out the switching protocol. but both X servers are involved in that.
X server itself is a client-server pair of applications. Ok, it is not really relevant, and I don't want to go into details, but it is much more complex than you think. X client and server side can run on different hosts. Also you can have several hundreds of X running on the same host which are all active and "switched", just their "display" sides running on different hosts or in different VNC like sessions or .... Also we can have X servers running completely without any real device (in VMs for example). X can run on hosts without video card. (Not that important, but: have you heard about citrix? with citrix [for example] you can detach X client and server side from each other and reconnect later)
How should those X servers handle all these different situations?
 
Old 04-25-2022, 07:25 PM   #15
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
> Because you can always have only one active [virtual] terminal.

but you can have more than one active process that has device driver access.

> No, you need to prove that too. X has no any idea about that state, there is no such thing as switched/unswitched.

X does many things different when unswitched. it knows. and these days it can affect, or be passed on to, clients. Firefox is one example where i have seen changed behavior as a result of its X server being unswitched.

from your ps example, it appears that you (like most people) regularly use only one instance of X. thus, you would have little experience, if any, of X in an unswitched state.

Code:
lt2a/forums/1 /home/forums 7> ps -ef | grep X | wc -l
31
lt2a/forums/1 /home/forums 8> ps -ef | grep X | head -n6
root      1269  1223  0 Apr24 tty7     00:04:24 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 
admin     1382  1366  0 Apr24 ?        00:00:00 /bin/sh /etc/xdg/xfce4/xinitrc -- /etc/X11/xinit/xserverrc
root      5294  1223  0 Apr24 tty8     00:06:41 /usr/lib/xorg/Xorg -core :1 -seat seat0 -auth /var/run/lightdm/root/:1 -nolisten tcp vt8 
clock     5330  5290  0 Apr24 ?        00:00:00 /bin/sh /etc/xdg/xfce4/xinitrc -- /etc/X11/xinit/xserverrc
root      5774  1223  0 Apr24 tty9     00:04:55 /usr/lib/xorg/Xorg -core :2 -seat seat0 -auth /var/run/lightdm/root/:2 -nolisten tcp vt9 
forums    5810  5770  0 Apr24 ?        00:00:00 /bin/sh /etc/xdg/xfce4/xinitrc -- /etc/X11/xinit/xserverrc
lt2a/forums/1 /home/forums 9>
yeah, they have been running since yesterday, when i last rebooted after an upgrade,

and yes one (figurative you) can have many instances of X running with working displays that are not in an unswitched state.

> How should those X servers handle all these different situations?

i have tried X over VNC but decided not to use it because of issues with the client i was using (ease of switching, for one). so i never established a concern how X servers handle all these different situations. thus, i have no answer for that question. my concern is for the X servers associated with (attached to) virtual terminals in an unswitched state.

FYI, i can switch to my "forums" user (where i am right now) with alt+f when it is already logged in.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
snmp terminology alaios Linux - Networking 8 09-10-2005 06:40 PM
OpenGL terminology question shilo Slackware 6 03-02-2005 08:00 PM
Linux terminology hernan Linux - Newbie 3 01-14-2005 04:22 PM
SSL Certificate terminology dvong3 Linux - General 1 12-19-2003 08:50 AM
Understanding terminology digantk Linux - General 9 10-18-2002 06:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration