In a macOS version 10.13.2 terminal window, if I type in the command:
it will reply with something like:
If I then type in the command:
it gives me something like:
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.
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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT HPUX
getlogin
getlogin(3C)getlogin(3C)NAME
getlogin(), getlogin_r() - get name of user logged in on this terminal
SYNOPSIS DESCRIPTION
The function retrieves the name of the user currently logged in on a terminal associated with the calling process, as found in user-
accounting database maintained by utmpd(1M).
At least one of the standard input, standard output, or standard error must be a terminal. For the first of these found that is a termi-
nal, a user must have logged in on that terminal, and that terminal must be the controlling terminal of the session leader process of the
calling process's session.
The function can be used in conjunction with to locate the correct password file entry when the same user ID is shared by several login
names.
The recommended procedure to obtain the user name associated with the real user ID of the calling process is to call and if that fails, to
call
To get the user name associated with the effective user ID, call
performs the same operations as but returns the login name in the buffer to which buf points, whose size in bytes should be passed in
buflen. buf should have space for the name and the terminating null character. The maximum size of the login name can be obtained using
the API with as the argument.
APPLICATION USAGE
The return value from points to static data whose content is overwritten by each call.
RETURN VALUE
Upon successfully finding and validating the login name of the user logged in on the terminal, returns a pointer to the name. Otherwise,
it returns a null pointer, and sets to indicate the error.
Upon successfully finding, validating, and copying to the buffer the login name of the user logged in on the terminal, returns 0 upon suc-
cess and returns an error number upon failure.
ERRORS
and fail if any of the following is true:
[EACCES] Access permission to get the status of the terminal device file, was denied.
[EMFILE] Too many file descriptors are in use by this process.
[ENFILE] Too many file descriptors are in use on the system.
[ENOENT] The terminal device file cannot be found.
[ENOTTY] None of the standard input, standard output, or standard error is a terminal, or for the first of these that is a
terminal, no current login is registered on that terminal, or the session leader process of the calling process has
no controlling terminal.
[EPERM] One of the standard input, standard output, or standard error is a terminal, and a current login was found on that
terminal, but that terminal is not the same as the controlling terminal of the session of the calling process.
[ESRCH] The session leader process of the calling process is no longer running.
The error condition associated with [EPERM] prevents processes that have access to some other user's terminal from believing that they are
related to that other user's login session.
also fails if the following is true:
[ERANGE] The length of the name to be returned, including the terminating null byte, exceeds buflen.
WARNINGS
Users of should note now conforms with the POSIX.1c Threads standard. The old prototype of is supported for compatibility with existing
DCE applications only.
SEE ALSO utmpd(1M), getuid(2), sysconf(2), getgrent(3C), getpwent(3C), thread_safety(5).
STANDARDS CONFORMANCE getlogin(3C)