Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Controlling terminal of a display server Post 303044468 by yavuzileri on Saturday 22nd of February 2020 10:45:05 AM
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)?
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. Programming

controlling terminal

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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
GNOME(1)						      General Commands Manual							  GNOME(1)

gnome-session - Starts up the GNOME desktop environment

SYNOPSIS
gnome-session [--choosesession] [--failsafe] [--purge-delay=DELAY] [--warn-delay=DELAY] [--suicide-delay=DELAY] [session-name] DESCRIPTION
The gnome-session program starts up the GNOME desktop environment. This command is typically executed by your login manager (either gdm, xdm, or from your X startup scripts). It will load either your last session, or it will provide a default session for the user as defined by the system administrator (or the default GNOME installation on your system). You can optionally specify a specific session name to restore. gnome-session is an X11R6 session manager. It can manage GNOME applications as well as any X11R6 SM compliant. gnome-session uses the contents of the ~/.gnome/session file for starting up as specified by the "Current Sesssion" key in the ~/.gnome/session-options file. Various default values are provided in case the file entry does not exist. If the session file does not exist, gnome-session will use the contents of the /usr/share/gnome/default.session file. OPTIONS
The following options are supported: --choose-session=ARG User can specify a session to load, as opposed to the session specified in the ~/.gnome/session-options file. If that entry does not exist in the ~/.gnome/session file (or if that file doesn't exist), it will use the default session and all saves to that session will be to the new session name. --failsafe Fail safe operations mode: only reads saved sessions from the default.session file. --purge-delay=ARG The number of millisecond that gnome-session will wait for clients to register, if you use 0 it will wait forever (default value: 30,000 milliseconds). --warn-delay=ARG The number of millisecond that gnome-session will wait for clients to respond, if you use 0 it will wait forever (default value: 10,000 milliseconds). --suicide-delay=ARG The number of millisecond that gnome-session will wait for clients to die, if you use 0 it will wait forever (default value: 10,000 milliseconds). ENVIRONMENT
gnome-session accepts all of the standard environment variables used by gnome programs, other than the SESSION_MANAGER environment vari- able. [ xref to a manpage where this is documented. ] gnome-session also sets several environment variables for the use of its child pro- cesses. SESSION_MANAGER This variable is used by session-manager aware clients to contact gnome-session. DISPLAY This variable is set to the X display being used by gnome-session. Note that if the --display option is used this might be different from the setting of the environment variable when gnome-session is invoked. SEE ALSO
default.session(5),gnome-session-save(1) BUGS
If you find bugs in the gnome-session program, please report these using bug-buddy or the gnome-bug script included with the GNOME libraries distribution. GNOME 1.0 GNOME(1)
All times are GMT -4. The time now is 09:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy