Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How are environment variables defined in a Gnome terminal session? Post 303009877 by Don Cragun on Thursday 21st of December 2017 12:32:16 PM
Old 12-21-2017
In a macOS version 10.13.2 terminal window, if I type in the command:
Code:
who am i

it will reply with something like:
Code:
dwc      ttys006  Dec 17 12:52

If I then type in the command:
Code:
ps -t ttys006

it gives me something like:
Code:
  PID TTY           TIME CMD
  849 ttys006    0:00.02 login -pf dwc /bin/ksh
  850 ttys006    0:01.72 -ksh
81761 ttys006    0:00.00 ps -t ttys006

I would expect that running similar commands in your Gnome terminal window will produce similar results, but the first field in the output from who am i will be your login ID instead of mine and the 2nd field will be your terminal device ID instead of ttys006. If you then issue that ps command with your terminal device ID as the -t option option-argument, I would expect to see similar output on your screen with the -ksh in my output replaced by a -bash in your output. The login command shown in my output is what macOS uses to start a login session. There might or might not be a similar line in your ps output depending on how Centos starts a login session.
 

10 More Discussions You Might Find Interesting

1. Linux

environment variable is not defined

moved to correct thread (0 Replies)
Discussion started by: alien12
0 Replies

2. Shell Programming and Scripting

sqlplus session being able to see unix variables session within a script

Hi there. How do I make the DB connection see the parameter variables passed to the unix script ? The code snippet below isn't working properly. sqlplus << EOF user1@db1/pass1 BEGIN PACKAGE1.perform_updates($1,$2,$3); END; EOF Thanks in advance, Abrahao. (2 Replies)
Discussion started by: 435 Gavea
2 Replies

3. Linux

Launch application in gnome session of another user.

A gnome session is launched by UserA of System A, I am connected to userB of System B(or A) through PUTTY. I want to launch an application for eg: gedit through Putty in the display of system A. how can I achieve this. for eg:- root is logged in to System A, with gdm. DISPLAY=0.0, ip =... (4 Replies)
Discussion started by: Sivaswami
4 Replies

4. Shell Programming and Scripting

Problem with gnome-terminal

Hello everyone. This is my first post.:o Using Ubuntu 8.04 and bash 3.2.39 i'm trying to adapt my routine to this platform. So, this means forget xterm and use gnome-terminal (as default ubuntu terminal). EveryDay i need to connect to several servers, and i've made a Tcl'script to make this... (1 Reply)
Discussion started by: trutoman
1 Replies

5. Solaris

I am not able to login in gnome session and java session in Sun solaris 9& 10

I am not able to login in gnome session and java session in Sun solaris 9& 10 respectively through xmanager as a nis user, I am able to login in common desktop , but gnome session its not allowing , when I have given login credentials, its coming back to login screen, what shoul I do to allow nis... (0 Replies)
Discussion started by: durgaprasadr13
0 Replies

6. Debian

Gnome session reverts back to gdm on login.

Hi everyone. I just had a quick problem. I'm not too familiar with linux yet, otherwise I'd have this figured out by now. I recently did the Debian 5lenny7 update with the standard debian update manager. After getting all installed and rebooted, I tried to login to my account again. Every... (3 Replies)
Discussion started by: runfaj
3 Replies

7. UNIX for Dummies Questions & Answers

Finding WHERE an environment variable is defined.

HI. I had an environment variable defined in my .bash_profile file and I deleted it. I opened a new terminal and looked inside .bash_profile and it's not there but when I type printenv MYCONFIG it reutrns what the value used to be in my .bash_profile still!! I did a grep for MYCONFIG and... (6 Replies)
Discussion started by: dissectcode
6 Replies

8. UNIX for Dummies Questions & Answers

gnome-terminal questions

I have a couple questions regarding gnome-terminal. Basically I am trying to write an alias that will bring up several gnome-terminals that navigate to certain directories and run certain commands. I have it pretty well figured out, but the one I am having a problem with is simply running a... (2 Replies)
Discussion started by: Tennesseej
2 Replies

9. Shell Programming and Scripting

Issue with gnome terminal

Hi, I cant get this command to run in a new gnome terminal cd "$PRG" && gnome-terminal -x sh -c './prg -r testcommand' &>/dev/null & i can run just ./prg -r testcommand and it runs fine but in the command above it only runs ./prg Any ideas community Cheers in advance (0 Replies)
Discussion started by: digitalviking
0 Replies

10. Shell Programming and Scripting

Doing math using user defined input and system environment variables

Hi, I need some help to setup some environmental variables. for example...Get A -> userdefined/user input B -> a number. c -> system variable...for example $GETCONF PAGE_SIZE E = do some math using bc display a message "The value is E" setup the system/kernel paramter sysctl -p... (3 Replies)
Discussion started by: saravanapandi
3 Replies
GNOME-SESSION(1)					      General Commands Manual						  GNOME-SESSION(1)

NAME
gnome-session - Starts up the GNOME desktop environment SYNOPSIS
gnome-session [--autostart=DIR] [--default-session-key=KEY] [--failsafe|-f] [--debug] 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 saved 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). The default session is defined in the GConf keys under /desktop/gnome/session. When saving a session, gnome-session saves the currently running applications in the $XDG_CONFIG_HOME/gnome-session/saved-session directory. gnome-session is an X11R6 session manager. It can manage GNOME applications as well as any X11R6 SM compliant. OPTIONS
The following options are supported: --autostart=DIR Start all applications defined in DIR, instead of starting the applications defined in /desktop/gnome/session/default_session, or via the --default-session-key option. Multiple --autostart options can be passed. --default-session-key=KEY Sets the GConf key from which applications running a default session should be read to KEY. If not specificed, /desktop/gnome/ses- sion/default_session will be used. --failsafe gnome-session will run in fail-safe mode. User-specified applications will not be started. --debug Enable debugging code. ENVIRONMENT
gnome-session accepts all of the standard environment variables used by gnome programs, other than the SESSION_MANAGER environment vari- able. gnome-session also sets several environment variables for the use of its child processes. 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
gnome-session-properties(1) gnome-session-save(1) gnome-wm(1) BUGS
If you find bugs in the gnome-session program, please report these on http://bugzilla.gnome.org. GNOME GNOME-SESSION(1)
All times are GMT -4. The time now is 12:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy