solaris

how to display the output of kstat from a c program in solaris without using the system(" ") command

i need to display the output of commands like kstat -p -m cpu_stat -s bread kstat -p -m cpu_stat -s pgpgout etc on the terminal when a c program is executed. This must be done without using system(" ") command. Something using the kstat_open,kstat_read system calls. ...

Bash script on Solaris, using ":" on an array does not always work

I have a strange issue with array manipulation within a bash script on Solaris. I am using the syntax ${varName[@]:index} to obtain all of the elements in array varname after the specified index. However, if there is only one element after the specified index, nothing is returned. This can be easily demonstrated by example: #!/bin/bash...

How to create installer for solaris

Hi, I have already createdrpm file for my application. It works fine for Fedora linux. also the same worked fine for linux mint. But Solaris does not support rpm. So how to create installer package for solaris OS. I have solaris 10 linux as OS. Thanks Sunil Kumar Sahoo ...

Porting application written in C from Solaris to Windows XP

I have an application written in C on Solaris that I have to port to Windows XP. I would like to know that what are the libraries availabe to achieve this task. Also what is the best GUI development tool for the same and what are the steps to follow to achieve this all. ...

Portable way to get file size (in bytes) in shell?

On Linux, I use stat --format="%s" FILE, but Solaris I have access to doesn't have stat command. What should I use then? I'm writing Bash scripts, and can't really install any new software on the system. I've considered already using: perl -e '@x=stat(shift);print $x[7]' FILE or even: ls -nl FILE | awk '{print $5}' But neither of...

Command Line XML Diff Utility for Solaris

Can anyone suggest a command line xml differencing tool for Solaris? I want to call one in a regression test script, so it's important that the tool can be called from the command line and return a status to indicate whether the files contain any differences. The tool must have an option to ignore attribute order. Thanks, Dave ...

Porting X/Motif GUI application to Windows using wxWidgets

Is it possible to port an application built in X/Motif GUI on Solaris platform to Windows using wxWidgets? If so, is it easier to port to wxWidgets than other GUI builders like QT or Visual Studio? ...

How to add my application autostart in Solaris10

Hi All, I have created my application using java. Also I created RPM which works fine in redhat. In that case I have to put my application.desktop file in startup directory to make my application autostart. The folder structure is /etc/xdg/Startup But in solaris this folder structure doesnot exist. So what I have to do to make my appli...

How to create menu file in solaris

Hi I want to create Menu inside Application. Means I want my application should be visible in Application. To achieve this in linux we have to create a menu file. so how to achieve the same in solaris10 Thanks Sunil Kumar Sahoo ...

Help regarding Solaris find command

Hi There In Solaris, what is the syntax of find command to find files having multiple file name formats? Eg: In my current directory and in its sub-directories if I have files like test.log, sample.out, demo.buf and some other files, how can I write single find command to find these 3 files. Thank you Chaitanya ...

How can I compile 64-bit Postgres bindings for Perl on Solaris?

I'm running 64-bit Solaris 10, and I have self-compiled Perl 5.10 and Postgresql 8.4.1 installed in /usr/local, both 64 bits. Solaris came with 32-bit Postgresql 8.1.4 installed in /usr, but it is not running. When I attempt to install DBD::Pg, it hits a problem because the libpq.so it finds is the 32-bit one in /usr/lib rather than the ...

How do I find what GTK version is installed on Solaris?

How do I find what version of GTK I have installed on a Solaris box? ...

How to identify if currently logged in user is an LDAP user in Solaris

Hi I am new to LDAP. I want to know how to identify if the currently logged in user in Solaris is a LDAP user or local user. Any command? or any C Run time functions like getspname, getpwnam which returns an attribute saying it is an LDAP user or local user after user logged in. I am looking for Solaris. ...

Query ragarding Solaris find command with -exec option

I want to create tar file with all the output files resulting from executing find command. I tried the following command: find . \(-name "*.log" -o -name "*.log.*" \) -mtime +7 -exec tar cvf test.tar.gz {} \; But it is including only the last found file in the test.tar file. How to include all files in test.tar file? Regards Chaita...

Does Solaris have a problem with popen?

Please have a look on this code: #include <unistd.h> #include <stdlib.h> #include <stdio.h> int main() { FILE *process_fp = popen("make -f -", "w"); if (process_fp == NULL) { printf("[ERR] make not found!\n"); } else { char txt[1024] = "all:\n\t@echo Hello World!\n"; fwrite(txt, sizeof(char), strl...

Cross-compile from (open)Solaris to Windows?

Is there any way I can cross-compile C/C++ code for Windows (XP, Vista, Win7), ideally in 64-bit as well as 32-bit (for Vista and Win7), from a Solaris or OpenSolaris setup? My codebase is already cross-platform, I would like to cross-compile it (generate windows DLLs and EXEs) from Solaris or Linux as part of an automated process. I w...

difference between -h <name> and -o <outputfile> options in cc (C++)

I am building .so library and was wondering - what is the difference b/w -h and -o cc complier option (using the Sun Studio C++) ? Aren't they are referring to the same thing - the name of the output file? ...

gnome system monitor for solaris

is there any gui tools like gnome system monitor in solaris for monitoring processes? or is it possible to get the gnome system monitor binary pkg for solaris os ? ...

Locate bad memory access on Solaris

On Linux, FreeBSD and other systems I have valgrind for checking for memory errors like invalid reads and similar. I really love valgrind. Now I have to test code on Solaris/OpenSolaris and can't find a way to get information on invalid reads/writes in an as nice way (or better ;-)) as valgrind there. When searching for this on the net ...

how to create .desktop file for Solaris 10

Hi I have created jar of my application. also i have created .desktop file for fedora it worked fine. but that .desktop file did not work fine for solaris 10. How to create desktop file for mac OS for my jar. Also I want to set icon in that desktop file Is there any example? Thanks Sunil Kumar Sahoo. ...