thanks for the reply. yes this is what i am trying to do. for the script to allow the user to define the file they wish to watch, then the script takes it in, and loads the monitor with their selected file. iv implemented your code and im getting an error message. this is a section of my code so far:
the error message im gettin is [: missing `]'
its from the line:
I have launched telnet on nt and have connected to a unix server,
I'm trying to run a program on the unix server which will launch a gui, but when I try to launch it
I get the message
"display not set\n"
"By default set it to 0.0"
I can sit down at the unix machine and launch the program with... (3 Replies)
Hi all. I need to use excel macro at my desktop to launch a csh script which is in a solaris environment. What is the code that i can use in macro to help me with that ? Basically, the code need to telnet or ftp to the solaris environment and just run the script and the macro will output in an... (1 Reply)
Greetings all,
I'll just like to know if it is possible to launch a shell script automatically upon a user's successful login into ssh from a remote host, without adding a command parameter to the ssh command...
ie. after keying in ssh username@host (not ssh username@host "command") and upon... (1 Reply)
Hello,
in the application i'm writing i need to launch "recordmydesktop" to capture the screen,but i'm having a problem: when the recording stops,and the encoding of the saved file starts,the entire system hangs until the completion of the encoding.This happens if i launch recordmydesktop from my... (7 Replies)
Hi All,
OS:AIX 64 bits
Would like to know what is the command to launch vnc session from unix shell script so that Reports server is started from vnc session which should be launched from within the shell script.
Thanks for your time!
Regards, (0 Replies)
Hi i wanted to know if any one can give me an example on how to launch a windows program in a perl script. I wanted to open the nmap software on my computer with a perl script, i heard this can be done with the system function. Would the function be in this format:
$text =... (1 Reply)
So I am attempting to get a short but complex perl script to be able to time out an application that I will launch from a command line. The terminal I use is MKS C SHELL and I am having trouble doing the a job spawn that will launch the application and keep time on it.
I know you could do this... (1 Reply)
I'm trying to write a simple shell script that looks at a given text file and if the only word in the file is 'completed', it launches another shell script.
So far I have this almost working...
if grep 'completed' $datafile
then...
however, using this logic the secondary shell script... (3 Replies)
I want to create a simple html page that should contain 2 fields in which the user can write the input. Then I want to have a button that should launch a shell script with the parameters inserted by user in the fields from the webpage.
This is the code behind my webpage:
<html>
<form... (2 Replies)
Discussion started by: black_fender
2 Replies
LEARN ABOUT NETBSD
getlastlogx
GETLASTLOGX(3) BSD Library Functions Manual GETLASTLOGX(3)NAME
getlastlogx, getutmp, getutmpx, updlastlogx, updwtmpx, utmpxname -- user accounting database functions
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <utmpx.h>
struct lastlogx *
getlastlogx(const char *fname, uid_t uid, struct lastlogx *ll);
void
getutmp(const struct utmpx *ux, struct utmp *u);
void
getutmpx(const struct utmp *u, struct utmpx *ux);
int
updlastlogx(const char *fname, uid_t uid, struct lastlogx *ll);
int
updwtmpx(const char *file, const struct utmpx *utx);
int
utmpxname(const char *fname);
DESCRIPTION
The getlastlogx() function looks up the entry for the user with user id uid in the lastlogx(5) file given by fname and returns it in ll. If
the provided ll is NULL, the necessary space will be allocated by getlastlogx() and should be free()d by the caller.
The getutmp() function fills out the entries in the struct utmp u with the data provided in the struct utmpx ux. getutmpx() does the oppo-
site, filling out the entries in the struct utmpx ux with the data provided in the struct utmp u, and initializing all the unknown fields to
0. The sole exception is the ut_type field, which will be initialized to USER_PROCESS.
The updlastlogx() function tries to update the information for the user with the user id uid in the lastlogx(5) file given by fname with the
data supplied in ll. A struct lastlogx is defined like this:
struct lastlogx {
struct timeval ll_tv; /* time entry was created */
char ll_line[_UTX_LINESIZE]; /* tty name */
char ll_host[_UTX_HOSTSIZE]; /* host name */
struct sockaddr_storage ll_ss; /* address where entry was made from */
};
All the fields should be filled out by the caller.
The updwtmpx() function updates the wtmpx(5) file file with the utmpx(5) entry utx.
The utmpxname() function sets the default utmpx(5) database file name to fname.
RETURN VALUES
getlastlogx() returns the found entry on success, or NULL if it could not open the database, could not find an entry matching uid in there,
or could not allocate the necessary space (in case ll was NULL).
utmpxname() returns 1 on success, or 0 if the supplied file name was too long or did not end with 'x'.
updlastlogx() and updwtmpx() return 0 on success, or -1 in case the database or file respectively could not be opened or the data not written
into it.
SEE ALSO endutxent(3), loginx(3), utmpx(5)HISTORY
The functions getutmp(), getutmpx(), updwtmpx(), and utmpxname() first appeared in Solaris. getlastlogx and updlastlogx first appeared in
NetBSD 2.0.
BSD August 26, 2003 BSD