02-19-2005
Re
here is the program
main.c
1 #include <X11/Intrinsic.h>
2 #include <Xm/Xm.h>
3 #include <Xm/Label.h>
4
5 XtAppContext context;
6 XmStringCharSet char_set = XmSTRING_DEFAULT_CHARSET;
7 Widget toplevel,label;
8
9 main(argc,argv)
10 int argc;
11 char* argv[];
12 {
13 Arg a1[10];
14 int ac = 0;
15 toplevel = XtAppInitialize(&context,"",NULL,0,&argc,argv,NULL,NULL,0);
16 label = XmCreateLabel(toplevel,"label",a1,ac);
17 XtmanageChild(label);
18 XtrealizeWidget(toplevel);
19 Xtmainloop();
20 }
after this:
cc -c main.c
cc -o main main.o -lXt -lX11 -L$pathtoXt -L$pathtoX11
Last edited by wojtyla; 02-19-2005 at 02:31 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have Oracle 8i, running Slackware...I have "X-win32" on my Win2k box, but when I installed Slackware I didn't install the GUI's... Isn't there a xdaemon or something of the sort that I must install first ? So when my Win2K box queries the UNIX box it picks up and says "Hi, gimme GUI" heh.. Any... (4 Replies)
Discussion started by: ComTec
4 Replies
2. IP Networking
Is there a way to find out who is logged in to the system using Xwindows ( hummingbird)..
I tried using
finger
and last
it doesn't show the person logged in ..
but when i run ps -ef | grep "ip address' it show various process running on the system..
Moreover is there a way to log off the... (2 Replies)
Discussion started by: ajnabi
2 Replies
3. UNIX for Dummies Questions & Answers
I have a pretty basic XWindows question. I'm using Linux and the BASH shell. I want to connect to a machine that is running a Java IDE (we currently have I think "SlickEdit" but we're probably going to download Netbeans, Eclipse) and view the IDE on the client machine. I tried "xhost +" on the... (5 Replies)
Discussion started by: doublek321
5 Replies
4. AIX
I have a HMC version 5.2, The HMC controls 4 lpars. I would like to install the powerchute on the HMC and have it be the master control to shutdown each of the lpars and the VIO server in order so no harm is done to the VIO server.
AIX version 5.3 64bit
My problem is i have to install... (5 Replies)
Discussion started by: pagink
5 Replies
5. UNIX for Advanced & Expert Users
I have one machince where X crashes with some weird error on boot...
Fatal server error:
Cannot move old logfile "/var/log/XFree86.0.log.old"
This is running redhat enterprise ES 3, I cant figure out how to get past this error. I have tried deleting the logfiles and recreating them, however... (1 Reply)
Discussion started by: frankkahle
1 Replies
6. Linux
i m working on a project of making linux boot and run from a pendrive.
I have got a minimal root filesystem with busybox.
I wish to install X Server now. I downloaded the source tar balls, untarred them on the host system, used the default host.def issued commands
$make WORLDOPTS=-k World >&... (0 Replies)
Discussion started by: amu
0 Replies
7. UNIX Desktop Questions & Answers
i m working on a project of making linux boot and run from a pendrive.
I have got a minimal root filesystem with busybox.
I wish to install X Server now. I downloaded the source tar balls, untarred them on the host system, used the default host.def issued commands
$make WORLDOPTS=-k World >&... (0 Replies)
Discussion started by: amu
0 Replies
8. UNIX for Dummies Questions & Answers
Hi
I am trying to run a program on a solaris bx that requires an xwindow. I have exceed running and X11 forwarding enabled in putty I sent my display but the output is can't open display.
To connect to the server I ssh to a jump host and ssh to the server and then su to root. Could this have... (4 Replies)
Discussion started by: naddy
4 Replies
9. UNIX for Dummies Questions & Answers
the question i have is why Xwindows(GUI) is not part of kernel level but part of user level in unix while in windows the GUI (Windows manager) it is part of kernel level.
For one thing is when GUI hangs it does not crash the whole system as in Windows
But windows avoids context... (0 Replies)
Discussion started by: sandesh.syr
0 Replies
10. Solaris
Hi everyone, I have an xwindow problem I could use a hand with.
I have a solaris 8 installation (a container actually, within solaris 10). I seem to not be able to open any xwindows over ssh.
It comes about when trying to install oracle. When ssh'd to the solaris 8, Oracle's runInstaller... (3 Replies)
Discussion started by: goodvikings
3 Replies
LEARN ABOUT OPENSOLARIS
tk_main
Tk_Main(3TK) Tk Library Procedures Tk_Main(3TK)
__________________________________________________________________________________________________________________________________________________
NAME
Tk_Main - main program for Tk-based applications
SYNOPSIS
#include <tk.h>
Tk_Main(argc, argv, appInitProc)
ARGUMENTS
int argc (in) Number of elements in argv.
char *argv[] (in) Array of strings containing command-line arguments.
Tcl_AppInitProc *appInitProc (in) Address of an application-specific initialization procedure. The value for this argument is
usually Tcl_AppInit.
_________________________________________________________________
DESCRIPTION
Tk_Main acts as the main program for most Tk-based applications. Starting with Tk 4.0 it is not called main anymore because it is part of
the Tk library and having a function main in a library (particularly a shared library) causes problems on many systems. Having main in the
Tk library would also make it hard to use Tk in C++ programs, since C++ programs must have special C++ main functions.
Normally each application contains a small main function that does nothing but invoke Tk_Main. Tk_Main then does all the work of creating
and running a wish-like application.
When it is has finished its own initialization, but before it processes commands, Tk_Main calls the procedure given by the appInitProc
argument. This procedure provides a ``hook'' for the application to perform its own initialization, such as defining application-specific
commands. The procedure must have an interface that matches the type Tcl_AppInitProc:
typedef int Tcl_AppInitProc(Tcl_Interp *interp);
AppInitProc is almost always a pointer to Tcl_AppInit; for more details on this procedure, see the documentation for Tcl_AppInit.
KEYWORDS
application-specific initialization, command-line arguments, main program
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+--------------------+-----------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+-----------------+
|Availability | SUNWTk |
+--------------------+-----------------+
|Interface Stability | Uncommitted |
+--------------------+-----------------+
NOTES
Source for Tk is available on http://opensolaris.org.
Tk 4.0 Tk_Main(3TK)