Sponsored Content
Top Forums Shell Programming and Scripting How to display message when starting a terminal Post 302320068 by alberto on Wednesday 27th of May 2009 02:00:39 AM
Old 05-27-2009
I think this time it will work.
 

10 More Discussions You Might Find Interesting

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

2. Shell Programming and Scripting

sending message to terminal

hi all i have script #!/bin/bash cd /usr3/prod grep ERROR /usr3/prod/ind.log > /usr3/prod/ind_err.log if test -s /usr3/prod/ind_err.log then echo "error during process" else echo "process succeed" fi i want that this message(echo) will be display one time at the top of the screen... (5 Replies)
Discussion started by: naamas03
5 Replies

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

4. Shell Programming and Scripting

Write a message on specific user terminal

Hi All, Need urgent help!!! Can anyone tellme how can we send a message on specific user terminal and get a response from user in return. Thanks in advance. (3 Replies)
Discussion started by: Sadhana
3 Replies

5. UNIX for Dummies Questions & Answers

Starting terminal with shortcut key combination

How can the shortcut keys be defined that would open up a terminal window? When using a kvm switch, the mouse sometimes does not work, but the keyboard does, and by opening up a terminal window using a shortcut key combination, the mouse can be restarted by entering the predefined mouserestart... (0 Replies)
Discussion started by: figaro
0 Replies

6. OS X (Apple)

How to prompt for login on OSX when starting Terminal

I was wondering if anyone can tell me how to log back in to unix after logging out. I have a MBPro. If I don't have the window close after exiting, then there is the phrase 'process completed' in brackets with a blinking cursor, but I can't type anything in. Is it also possible to start the... (4 Replies)
Discussion started by: Straitsfan
4 Replies

7. Shell Programming and Scripting

When trying to open file Message:-Terminal too wide?

Hi, I am trying to open small size file only in vi editor on solaris or Linux machine but it giving message "Terminal too wide" and then I have to come out. As shown below:- -rwxr-x--- 1 rkycadm rkycprd 2445 Sep 12 04:06 $ vi file.txt Terminal too wide :q! ----------... (2 Replies)
Discussion started by: RahulJoshi
2 Replies

8. Windows & DOS: Issues & Discussions

Start X Server without starting a terminal

when I run C:\cygwin\bin\run C:\cygwin\bin\startxwin.exe it fires up a terminal by default. Can I eliminate that terminal and start the x server as a service silently and sits in my status bar just there? Thanks Jack (0 Replies)
Discussion started by: lucky7456969
0 Replies

9. Ubuntu

Error starting terminal in Ubuntu 14.04.3

I am unfamiliar with below error and how to fix it, it happens when I start the terminal in Ubuntu 14.04.3. I do not send any command only press crtl+alt+T. It seems to indicate that something is missing from PATH but I’m not really sure what. Thank you :). Command 'lesspipe' is... (24 Replies)
Discussion started by: cmccabe
24 Replies

10. UNIX for Beginners Questions & Answers

Colorful message is displayed in the terminal but not in the log file

Is there any way to print the colorful message in the terminal (which is the output of a simulation) to the log file with the same color. The colorful message at the terminal is obtained by the following codes: /////////////codes start here/////////////////////////////////////// ... (5 Replies)
Discussion started by: babunp114525
5 Replies
XtWorkProc()															      XtWorkProc()

Name
  XtWorkProc - interface definition for procedure called when the event loop is idle.

Synopsis
  typedef Boolean (*XtWorkProc)(XtPointer);
	 XtPointer client_data;

Inputs
  client_data
	    Specifies data registered with this procedure.

Returns
  True if the procedure should not be called again; False otherwise.

Description
  An XtWorkProc is registered with XtAppAddWorkProc() and is called by XtAppMainLoop() and XtAppProcessEvent() if there are no events pending
  and the application would otherwise block.

  The client_data argument is data of any type registered in the call to XtAppAddWorkProc().  It is generally cast to an XtPointer when  reg-
  istered  and cast back to the appropriate type within the XtWorkProc.  An XtWorkProc must get all of its context from this argument or from
  global variables.

  An XtWorkProc should perform a single short task and return.	If it does not return quickly then events that arrive  while  it  is  running
  will not be handled immediately, and the response time seen by the user will suffer.	If a work procedure has a lot of processing to do, it
  should perform a piece of it, save its state in static variables, and return False.  When an XtWorkProc returns False, the Intrinsics  will
  call	it again the next time the event loop is idle, and it can resume its processing where it left off.  When it completes all of its pro-
  cessing, it should return True, and the Intrinsics will automatically un-register it, so that it will not be called again.

Usage
  One possible use of work procedures is to create the widgets in dialog boxes which are not needed immediately when  an  application  starts
  up.	This will save start up time for the main application window, and will probably also mean that the dialog boxes will be fully created
  by the time the user requests that one is popped up.

  You can register multiple work procedures, and they will be performed one at a time.	The most recent work procedure added has the  highest
  priority.  Therefore, for example, if you want to create ten popup widgets during idle time, you might add ten work procedures.  The pop up
  that you expect to need first should be created by the last work procedure registered.  See the example below for  an  alternate  approach,
  however.

  You can explicitly remove a work procedure with XtRemoveWorkProc().

Example
  The  first  procedure below is an XtWorkProc that creates several dialog widgets.  Note that it returns after creating each dialog.  If the
  dialogs are needed before they are created by this procedure, they will have to be created explicitly as  shown  in  the  second  procedure
  below.   The	only  standard client in X11R5 that uses work procedures is xfontsel which performs sophisticated scheduling of all the back-
  ground work of parsing the names of all the fonts available from the server.

     Widget file_dialog = NULL;
     Widget print_dialog = NULL;
     Widget confirm_dialog = NULL;

     Boolean CreateDialogsInBackground(client_data)
     XtPointer client_data;
     {
	 Widget toplevel = (Widget) client_data;
	 static int num = 0;

	 num++;

	 switch(num) {
	 case 1:
	     if (file_dialog == NULL)
		 file_dialog = CreateFileDialog(toplevel);
	     return False;
	 case 2:
	     if (print_dialog == NULL)
		 print_dialog = CreatePrintDialog(toplevel);
	     return False;
	 case 3:
	     if (confirm_dialog == NULL)
		confirm_dialog = CreateConfirmDialog(toplevel);
	     return True;
	 }
	 return True;
     }

     void DoFileDialog(toplevel)
     Widget toplevel;
     {
	 if (file_dialog == NULL)
	     file_dialog = CreateFileDialog(toplevel);
	 XtPopup(file_dialog, XtGrabExclusive);
     }

  This work procedure could be registered with a call like the following:

	 toplevel = XtAppInitialize(...);
	 BuildInterface(toplevel);
	 XtRealizeWidget(toplevel);

	 XtAppAddWorkProcedure(app_context, CreateDialogsInBackground,
			       (XtPointer) toplevel);

	 XtAppMainLoop(app_context);

See Also
  XtAppAddWorkProc(1), XtRemoveWorkProc(1).

Xt - Event Handling														      XtWorkProc()
All times are GMT -4. The time now is 03:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy