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-session(1)						   User Commands						  gnome-session(1)

NAME
gnome-session - starts up the GNOME desktop environment SYNOPSIS
gnome-session [--choosesession] [--failsafe] [--purge-delay=delay] [--warn-delay=delay] [--suicide-delay=delay] [session-name] [gnome-std- options] 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 either load your last session, or 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 sessions. If the user has previously saved a session, the session is loaded from the ~.gnome2/session file. Otherwise, the session is loaded from the /usr/share/gnome/default.session file. Any programs specified in the ~/.gnome2/session/.session-manual will also be started. gnome-session also exports an X Atom called GNOME_SM_DESKTOP on the root window, to indicate that gnome-session has started. Some applica- tions may require such information to proceed correctly. OPTIONS
The following options are supported: --choosesession 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 does not exist), gnome-session will use the default ses- sion, and all saves to that session will be to the new session name. --failsafe Fail-safe operations mode: gnome-session only reads saved sessions from the default.session file. --purge-delay=deThe number of milliseconds that gnome-session will wait for clients to register. If delay is 0, gnome-session will wait forever. The default value is 30,000 milliseconds. --suicide-delay=Theanumber of milliseconds that gnome-session will wait for clients to die. If delay is 0, gnome-session will wait forever. The default value is 10,000 milliseconds. --warn-delay=delThe number of milliseconds that gnome-session will wait for clients to respond. If delay is 0, gnome-session will wait for- ever. The default value is 10,000 milliseconds. gnome-std-optionStandard options available for use with most GNOME applications. See gnome-std-options(5) for more information. OPERANDS
The following operands are supported: session-name The name of the session to be loaded. EXAMPLES
Example 1: Starting a session named "MySession" example% gnome-session --choose-session=MySession Example 2: Starting the system default session, ignoring the user's session example% gnome-session --failsafe Example 3: Setting the purge delay to 50000ms example% gnome-session --purge-delay=50000 Example 4: Setting the suicide delay to 50000ms example% gnome-session --suicide-delay=50000 Example 5: Setting the warning delay to 50000ms example% gnome-session --warn-delay=50000 ENVIRONMENT VARIABLES
gnome-session accepts all of the standard environment variables used by GNOME programs, as well as the SESSION_MANAGER environment vari- able. gnome-session also sets several environment variables for the use of its child processes. See environ(5) for descriptions of the following environment variables: SESSION_MANAGER Used by session-manager-aware clients to contact gnome-session. DISPLAY Set to the X display being used by gnome-session. Note that the --display option, if specified, overrides the set- ting of the DISPLAY environment variable. EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/gnome-session The command-line executable for the application. /usr/share/gnome/defaultDefaultnsystem session file. ~/.gnome2/session User session file. ~/.gnome2/session/.sessiSpecifies programs to start that do not support session management. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-session | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
gnome-std-options(5), default.session(5), gnome-smproxy(1), gnome-session-save(1) NOTES
Written by Brian Cameron, Sun Microsystems Inc., 2003. SunOS 5.10 13 Jan 2003 gnome-session(1)
All times are GMT -4. The time now is 08:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy