I am trying to detect whether I am running on a Gnome or KDE desktop environment.
I know I can check via a ps -aux and grepping either gnome or KDE but that's not good: 1) what if I am on a gnome desktop but I have the KDE libs loaded? 2) I need to do it from code without using system() or popen() or other fork/exec combination.
I can ...
Is there a way to overcome the port limit on a linux system? We have a server running that accepts incoming connection and it uses very little memory and cpu. It's rather silly that we have to build a cluster of small linux boxes just to overcome a software limit (number of points of around 60k). Any ideas?
...
Hi,
I have a User1 belonging to primarygroup Group1 in linux. I want to execute the command
in the context of User1 and Group2 (not Group1) in one line. Any way to do that ?
One way to do that in multiple steps is to
1) First get into User1 context by running "su user1"
2) Then from User1 context execute command by running "sg group...
I have a simple python script that just takes in a filename, and spits out a modified version of that file. I would like to redirect stdout (using '>' from the command line) so that I can use my script to overwrite a file with my modifications, e.g. python myScript.py test.txt > test.txt
When I do this, the resulting test.txt does not c...
I'd like to prevent would-be hackers from attaching to my binary on Linux systems. I see that ptrace DENY_ATTACH can be used on OSX. Is there such option that can be used on linux? How about on Windows?
Thanks for any info!
...
I noticed there is LWIP, a light weight TCP/IP stack for embedded systems. So I am wondering are there any other network stacks, which can replace the default Linux stack? And how do they perform? What's the pros and cons of them?
THX!
--wbsun
...
I have recently found myself on a Linux computer and am liking it so far.
However, I have been having an issue and dont really know the source. I am trying to make a java project that uses lwjgl in eclipse (something I have done in windows) but when I run the code my display window comes up black and blinking and I get this error report...
Hi all,
I am working on a project that sets up packages on the cloud.
For example, If i want to setup Drupal, i need seperate machines to maintain separate tasks, like mysql in one machine(cloud instance/node 1), apache server in another machine(cloud instance/node 2), etc.
So if drupal.rpm has dependencies apache.rpm(has deps too) an...
Hi,
I am writing a program to leak memory( main memory ) to test how the system behaves with low system memory and swap memory. We are using the following loop which runs periodically and leaks memory
main(int argc, char* argv[] )
{
int arg_mem = argv[1];
while(1)
{
u_int_ptr =(unsigned int*) malloc(arg...
I wrote a Perl program to capture a live data stream from a tail command on a Linux machine using the following command in the console:
tail -f xyz.log | myperl.pl
It works fine. But now I have to execute this Perl program on a different machine because the log file is on that different machine. Can anyone tell me how I can do it?
...
Is it possible to set environment variable with maven (OS: Linux)?
I already have user-defined properties (in the pom and in profiles.xml)....my problem is, how to execute following from Maven
export GGA_FRE=/path
So will be possible, that every developer can set his own path for the GGA_FRE.
...
Hi all,
I'm trying to setup CutyCapt on my Ubuntu 10.4 server.
I generate a thumbnail using the following command in SSH:
xvfb-run --server-args="-screen 1, 1280x1200x24" ./CutyCapt --url=http://www.google.dk
--out=/var/www/user/data/www/domain.com/test.png --min-width=1280 --min-height=1200
... and it's working great!
Though when...
Hi everyone,
I am using CMake to manage a build of a collection of projects on Linux, not a single project but the principle is the same. Each project has its own collection of options, for example DEVEL switches and custom code to be included. These are added in the standard CMake way:
OPTION(NAME "Helpstring" VALUE)
I am looking fo...
what is the practical difference between message queues and a pipe in Linux?
...
I have to retrieve process status(whether process is running or stopped) whose procees id is given from my c program(i am using linux). i planned to use exec command
and written below statement
execv("ps -el|grep |awk '{print $2}'",NULL);
But it is not giving me desired output.
Please let me know where i am wrong.
...
When some one sends invitation I can see the invitation but the accept/decline button doesn't appear.
I am using Thunderbird-3.1.2 with Lightning-1.0b2 on ubuntu 9.10. Would be really thankful if someone could give the soln.
...
I've got a proprietary program that I'm trying to use on a 64 bit system.
When I launch the setup it works ok, but after it tries to update itself and compile some modules and it fails to load them.
I'm suspecting it's because it's using gcc and gcc tries to compile them for a 64 bit system and therefore this program cannot use these...
I have a text file with a large amount of data which is tab delimited. I want to have a look at the data such that I can see the unique values in a column. For example,
Red Ball 1 Sold
Blue Bat 5 OnSale
...............
So, its like the first column has colors, so I want to know how many different unique values are there in th...
Tests :
[1] creating divide of 0 in executable hat was compiled with optimization (O2) and debugging symbols , thus a core was generated.
[2] creating divide of 0 in shared object hat was compiled with optimization (O2) and debugging symbols , thus a core was generated.
Results:
[First] analysing the core generated by [1] was succeed...
Hi all,
I am running Eclipse CDT on Windows to develop C code that is built & tested on remote Linux systems. Currently, the code is never compiled on Windows.
I am able to use CDT to begin the remote process on the Linux target under gdbserver, and then attach gdb from the Windows host. However, gdb immediately fails with errors like:...