Controlling terminal of a display server


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Controlling terminal of a display server
# 1  
Old 02-22-2020
Controlling terminal of a display server

When I login on a Fedora 31 workstation and run the ps command, I see the below output;

for an X session:

Code:
 PID TT   CMD
...
   1 ?    /usr/lib/systemd/systemd --switched-root --system --deserialize 29
...
 820 ?      /usr/sbin/gdm
1305 ?        gdm-session-worker [pam/gdm-password]
1346 tty2       /usr/libexec/gdm-x-session --run-script /usr/bin/gnome-session
1348 tty2         /usr/libexec/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3
1444 tty2         /usr/libexec/gnome-session-binary
1465 ?              /usr/bin/ssh-agent /bin/sh -c exec -l /bin/bash -c "/usr/bin/gnome-session"
...
1316 ?      /usr/lib/systemd/systemd --user
1322 ?        (sd-pam)
...
1531 ?        /usr/bin/gnome-shell
...

for a Wayland session:

Code:
 PID TT   CMD
...
   1 ?    /usr/lib/systemd/systemd --switched-root --system --deserialize 29
...
 825 ?      /usr/sbin/gdm
1309 ?        gdm-session-worker [pam/gdm-password]
1351 tty2       /usr/libexec/gdm-wayland-session /usr/bin/gnome-session
1356 tty2         /usr/libexec/gnome-session-binary
...
1321 ?      /usr/lib/systemd/systemd --user
1327 ?        (sd-pam)
...
1492 ?        /usr/bin/gnome-shell
...

As I understand, graphical logins via a display manager like gdm executes an X/Wayland session directly after authenticating a user, instead of executing a login shell. I see that both X and Wayland sessions are started on a virtual terminal (tty2), and what the Xorg(1) says about the vt option is: 'This option applies only to platforms that have virtual terminal support, such as Linux, BSD, OpenSolaris, SVR3, and SVR4.' Is starting X/Wayland sessions with a controlling tty done merely to provide the ability to switch to other virtual terminals while running a graphical shell in one, or is it a constraint of X/Wayland? Is it possible to start an X/Wayland session without a controlling tty on Linux, and is this up to gdm, X/Wayland, or systemd? And what would be an example of a system that runs Xorg and doesn't have virtual terminals at all unlike the systems listed in Xorg(1)?
# 2  
Old 02-24-2020
I'm not quite sure I got your question, so please be "understanding" if I misunderstood you.

All *nix based systems have multiple TTY's, usualy 4 but can be 6 or 7 as well.
This includes Fedora Smilie

(Simplified)
Other than how they work (backend-under the hood) to provide the GUI, Wayland and Gnome are no different to each other, same for any other GUI/WM/etc....

At any given time - unless you somehow managed to freeze your system - you ALWAYS can press "CTRL+ALT+ {F1...F7}" to switch to the speficic TTY1 - 7.

If I remember correctly, most *nix based distributions use TTY2 or TTY4 as the default GUI-TTY, while the other TTY's could be used for other things - regular console usage, with the exception of TTY1.

And something to clarify, a GUI is not the OS (any *nix, incl BSD etc, Mac, heck, even Windows), this said, both, Gnome and Wayland have the same compatiblity to the underlying OS, this includes - but is not limited to - how they get started from a TTY, as they both rely on the same services and methods.

Hope this helps

If it does not, please wait for someone else to respond or rephrase your question.
Thank you and have fun! Smilie
# 3  
Old 02-24-2020
@sea I appreciate the effort Smilie Don't hesitate to ask for clarifications on the questions I asked.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

"rhgb quiet" controlling the display of commands in single user mode ?"rhgb quiet" controlling the d

Why does removing "rhgb quiet" from the kernel boot parameters control whether or not the commands I enter are displayed in single user mode ? For instance, if I do not remove "rhgb quiet", when I am in single user mode, whatever command I type will not be displayed on the screen. The... (0 Replies)
Discussion started by: Hijanoqu
0 Replies

2. UNIX for Dummies Questions & Answers

A terminal controlling a terminal...

Hi all... Consider me a dummy here... I do not want any code or for anyone to show me how to do it at this time, but here is the question:- I have had this brainstorm to be able to control the AudioScope.sh program in the "Shell Scripting And Programming" forum... Is it possible, by... (4 Replies)
Discussion started by: wisecracker
4 Replies

3. Windows & DOS: Issues & Discussions

Controlling AIX processes remotely using a NET app on a Windows server?

I have a .NET application that remotely starts, stops, and gets status of Windows services and scheduled tasks. I would like to add the capability of starting, stopping, and getting status of remote AIX applications also. Based on some preliminary research, one option may be to use 3rd party .NET... (0 Replies)
Discussion started by: auser1
0 Replies

4. Shell Programming and Scripting

How to display message when starting a terminal

Hello all, I would like a message to be displayed on the shell when someone opens up the terminal - something like a welcome msg with date and time. I know how to do this by running the shell commands but dont know how to display it when a user opens up the terminal? Thanks in advance (27 Replies)
Discussion started by: mrudula009
27 Replies

5. Shell Programming and Scripting

ksh script as a login shell return "no controlling terminal"

I have created a ksh shell script and used it as a login shell for a user. </etc/passwd> lramirev:x:111:200:Luis:/export/home/menush:/usr/local/menush/menush My shell script is like this: </usr/local/menush/menush> #!/bin/ksh # if ] then . $HOME/.profile fi ... (8 Replies)
Discussion started by: lramirev
8 Replies

6. Shell Programming and Scripting

ps: no controlling terminal

Any one know the below means : ps: no controlling terminal I had run a script in background : nohup ./benchmark.sh & and shutdown my windows system from where i connected through SSH I am using bash: The above script perfoms various tasks of Benchmarking Repositories Today the... (3 Replies)
Discussion started by: sriram003
3 Replies

7. Shell Programming and Scripting

date and time to display on the terminal

hi all, am trying to 'grep' some text from a log file and use the 'cut' command to read from that line i just grep'ed to extract date/time and response times. code sniplet i am using is : grep -i 'text to grep' Out.log | while read LINE; do ... (11 Replies)
Discussion started by: cesarNZ
11 Replies

8. Programming

controlling terminal

What is controlling terminal in the case of daemon process? (2 Replies)
Discussion started by: Madhu Babu
2 Replies

9. UNIX for Dummies Questions & Answers

terminal display

I want to display a system warning message at the prompt of every live terminal on a sun solaris 8 machine using CDE. I know this can be done on a console, but what about dtterm and xterm regular windows? Does anyone know how this is done? What about a single terminal? Clear skies,... (2 Replies)
Discussion started by: seismic_willy
2 Replies

10. Shell Programming and Scripting

controlling screen display

How can I control the screen output when trying to read a large file onto the screen x number of lines at a time. I'm trying to use this is a bourne shell script. I want to display 10 lines of a file, pause the screen so that a user can read the file, and then display the next 10 lines of the file,... (6 Replies)
Discussion started by: jrdnoland1
6 Replies
Login or Register to Ask a Question