Skip to main content

Questions tagged [linux]

NOTICE: All Linux questions must be related to programming; those that aren't will be closed. Use this tag only if your question relates to programming using Linux APIs or Linux-specific behavior, not just because you happen to run your code on Linux. If you need Linux support, you can try https://unix.stackexchange.com or the specific Linux distribution's Stack Exchange site like https://askubuntu.com or https://elementaryos.stackexchange.com/

linux
3 votes
6 answers
8k views

Linux-based solution for domain management?

Using any member of the Windows Server family, I can set up an active directory, and have a single pool of users for a large scale of computers; access can be given / removed for any shared resources ...
Silver Dragon's user avatar
6 votes
7 answers
1k views

How to package a Linux binary for my Open Source application?

I have an Open Source app and I currently only post the binary for the Windows build. At this point Linux users have to get the source and compile it. Is there a standard way for posting a Linux ...
KPexEA's user avatar
  • 16.7k
2 votes
8 answers
7k views

What's the best way to keep multiple Linux servers synced?

I have several different locations in a fairly wide area, each with a Linux server storing company data. This data changes every day in different ways at each different location. I need a way to keep ...
Jaearess's user avatar
  • 676
4 votes
2 answers
3k views

Automatically resizing X11 display when connecting an external monitor

I have a laptop running Ubuntu to which I connect an external monitor when I'm at the office. Usually this requires me to run xrandr --auto in order for the laptop to re-size the display to match the ...
JesperE's user avatar
  • 64k
19 votes
8 answers
22k views

How do I run a command in a loop until I see some string in stdout?

I'm sure there's some trivial one-liner with perl, ruby, bash whatever that would let me run a command in a loop until I observe some string in stdout, then stop. Ideally, I'd like to capture stdout ...
Alex Miller's user avatar
  • 69.8k
115 votes
14 answers
228k views

How do you find out which version of GTK+ is installed on Ubuntu?

I need to determine which version of GTK+ is installed on Ubuntu Man does not seem to help
Craig Angus's user avatar
6 votes
5 answers
12k views

Linux commands from Java

Is it possbile to execute linux commands with java? I am trying to create a web servlet to allow ftp users to change their passwords without ssh login access. I would like to execute the next commands:...
Sergio del Amo's user avatar
68 votes
10 answers
99k views

Command line program to create website screenshots (on Linux) [closed]

What is a good command line tool to create screenshots of websites on Linux? I need to automatically generate screenshots of websites without human interaction. The only tool that I found was ...
ujh's user avatar
  • 4,063
5 votes
5 answers
7k views

Capturing Input in Linux

First, yes I know about this question, but I'm looking for a bit more information that that. I have actually, a fairly similar problem, in that I need to be able to capture input for mouse/keyboard/...
f4nt's user avatar
  • 2,651
32 votes
15 answers
71k views

extracting text from MS word files in python

for working with MS word files in python, there is python win32 extensions, which can be used in windows. How do I do the same in linux? Is there any library?
Badri's user avatar
  • 2,252
60 votes
10 answers
105k views

Create Word Document using PHP in Linux [closed]

Whats the available solutions for PHP to create word document in linux environment?
user avatar
10 votes
11 answers
6k views

Problem with Bash output redirection [duplicate]

I was trying to remove all the lines of a file except the last line but the following command did not work, although file.txt is not empty. $cat file.txt |tail -1 > file.txt $cat file.txt Why is ...
user avatar
15 votes
4 answers
18k views

Handling file paths cross platform

Do any C++ GNU standalone classes exist which handle paths cross platform? My applications build on Windows and LInux. Our configuration files refer to another file in a seperate directory. I'd ...
Superpolock's user avatar
  • 3,605
0 votes
4 answers
224 views

For list controls, should find-as-you-type match at the start of an entry, or anywhere in an entry?

I have a list control in GTK+ (a gtk.TreeView with one column), with "find-as-you type" enabled (so typing any text will open a small search field for searching through the list entries). Now, if the ...
oliver's user avatar
  • 6,438
22 votes
6 answers
9k views

Why do my keystrokes turn into crazy characters after I dump a bunch of binary data into my terminal?

If I do something like: $ cat /bin/ls into my terminal, I understand why I see a bunch of binary data, representing the ls executable. But afterwards, when I get my prompt back, my own keystrokes ...
raldi's user avatar
  • 21.8k
23 votes
11 answers
41k views

Used Ctrl-Alt-F6 in Linux, and can't get my screen back

This is obviously a stupid question. I am coding in Eclipse both on Mac and Linux, but I mixed up and used the Mac shortcut to window tabbing (Ctrl-Cmd-F6), but I was using the Linux on uni and screen ...
Vargen's user avatar
  • 716
3 votes
3 answers
2k views

What is the best replacement for Windows' rand_s in Linux/POSIX?

The problem is not about randomness itself (we have rand), but in cryptographically secure PRNG. What can be used on Linux, or ideally POSIX? Does NSS have something useful? Clarification: I know ...
Paweł Hajdan's user avatar
2 votes
3 answers
1k views

How can you get more information about processes when Linux runs out of memory?

I had recently a problem with oom-killer starting to kill processes after some time. I could see that the memory was consumed, but by the time I got to the server it wasn't clear anymore what consumed ...
Jevgeni Kabanov's user avatar
0 votes
3 answers
1k views

Manualy choose an interface on TCP to send data

I have a TCP server that is listening on a particular interface only. I want that after the accept() call if the incoming connection was from xxx.xxx.xxx.0 subnet then the data should go through intf1 ...
0 votes
3 answers
2k views

How to route in linux

I have 20 ips from my isp. I have them bound to a router box running centos. What commands, and in what order, do I set up so that the other boxes on my lan, based either on their mac addresses or 192 ...
user8456's user avatar
  • 346
75 votes
15 answers
226k views

Specify the from user when sending email using the mail command

Does anyone know how to change the from user when sending email using the mail command? I have looked through the man page and can not see how to do this. We are running Redhat Linux 5.
Joel Cunningham's user avatar
13 votes
3 answers
17k views

How to set my application's desktop icon for Linux: KDE, Gnome etc?

I have a cross platform program that runs on Windows, Linux and Macintosh. My windows version has an Icon but I don't know how to make have one for my Linux build. Is there a standard format for KDE, ...
KPexEA's user avatar
  • 16.7k
25 votes
11 answers
15k views

Know of an OCaml IDE? [closed]

Know of an OCAML/CAML IDE? Especially one that runs on Linux?
DustinB's user avatar
  • 11.2k
64 votes
10 answers
83k views

A way to determine a process's "real" memory usage, i.e. private dirty RSS?

Tools like 'ps' and 'top' report various kinds of memory usages, such as the VM size and the Resident Set Size. However, none of those are the "real" memory usage: Program code is shared between ...
Hongli's user avatar
  • 18.8k
4 votes
6 answers
2k views

Best text search engine for integrating with custom web app?

We have a web app that allows users to upload documents, create their own documents, and so on. Uploaded files are stored on Amazon S3, created information is stored in a MySQL database. What I'm ...
davr's user avatar
  • 19.1k
17 votes
7 answers
1k views

Best practices for withstanding launch day traffic burst

We are working on a website for a client that (for once) is expected to get a fair amount of traffic on day one. There are press releases, people are blogging about it, etc. I am a little concerned ...
Sam McAfee's user avatar
  • 10.1k
4 votes
12 answers
6k views

Licensing and using the Linux kernel [closed]

I would like to write my own OS, and would like to temporarily jump over the complicated task of writing the kernel and come back to it later by using the Linux kernel in the mean time. However, I ...
Cristián Romo's user avatar
14 votes
20 answers
23k views

How can a C/C++ program put itself into background?

What's the best way for a running C or C++ program that's been launched from the command line to put itself into the background, equivalent to if the user had launched from the unix shell with '&' ...
Larry Gritz's user avatar
  • 13.6k
8 votes
5 answers
19k views

Low Java single process thread limit in Red Hat Linux

I'm experiencing an issue on a test machine running Red Hat Linux (kernel version is 2.4.21-37.ELsmp) using Java 1.6 (1.6.0_02 or 1.6.0_04). The problem is, once a certain number of threads are ...
ColinD's user avatar
  • 110k
3 votes
4 answers
9k views

How to add /usr/share/java libs to webapp's classpath?

Summary Is that possible for webapps deployed on linux + tomcat5.5 to use/see all /usr/share/java/ jars automatically? Details I'm packaging my java webapp for Ubuntu (yet the question is related ...
Yurii Soldak's user avatar
  • 1,488
11 votes
5 answers
16k views

Reading from a promiscuous network device

I want to write a real-time analysis tool for wireless traffic. Does anyone know how to read from a promiscuous (or sniffing) device in C? I know that you need to have root access to do it. I was ...
jbleners's user avatar
  • 1,043
5 votes
4 answers
4k views

reinitialize system wide environment variable in linux

I just want my apache to register some of my predefined environment so that i can retrieve it using getenv function in php. How can i do this? I tried adding /etc/profile.d/foo.sh with export FOO=/bar/...
ken's user avatar
  • 4,936
3 votes
8 answers
18k views

Common Causes of Operating System Crashes [closed]

I am interested to learn: what are the most common technical causes (from the perspective of operating system programming) of an operating system crash (not limited to Windows crashes)? I'm looking ...
devinmoore's user avatar
  • 2,756
347 votes
12 answers
598k views

How to recursively download a folder via FTP on Linux [closed]

I'm trying to ftp a folder using the command line ftp client, but so far I've only been able to use 'get' to get individual files.
Charles Ma's user avatar
  • 48.5k
3 votes
1 answer
4k views

How do I run a script when ip-address changes (most likely using a dhclient hook) on a (Ubuntu) Linux machine?

I have a script which contacts a few sources and tell them "the IP-address XXX.XXX.XXX.XXX is my current one". My test web server has a dynamic IP-address through DHCP and amongst other things it ...
-2 votes
2 answers
6k views

What is the best Linux distribution for Vmware server? [closed]

In terms of Webserver and low package size installation.
user avatar
0 votes
3 answers
1k views

Windows Performance Counter Port to Linux, HP-UX and AIX

We implemented a server application available on Windows only. Now we like to port it to Linux, HP-UX and AIX, too. This application provides internal statistics through performance counters into the ...
user avatar
36 votes
7 answers
33k views

How to clear the scrollback in the screen command?

I use the screen command for command-line multitasking in Linux and I set my scrollback buffer length to a very large value. Is there a key combination to clear the buffer for a certain tab when I don'...
user avatar
1 vote
2 answers
397 views

Maintaining Multiple Databases Across Several Platforms

What's the best way to maintain a multiple databases across several platforms (Windows, Linux, Mac OS X and Solaris) and keep them in sync with one another? I've tried several different programs and ...
Iwasakabukiman's user avatar
3 votes
9 answers
2k views

Create a small 'window-form' application that runs anywhere

I work in the embedded world, using mainly C and no GUI at all (because there is no display screen). Moving over to the non-embedded world, in which I have nearly no experience, what is the best ...
Eden's user avatar
  • 1,120
243 votes
13 answers
264k views

Graphical DIFF programs for linux [closed]

I really like Araxis Merge for a graphical DIFF program for the PC. I have no idea what's available for linux, though. We're running SUSE linux on our z800 mainframe. I'd be most grateful if I could ...
scottb2's user avatar
  • 2,447
6 votes
2 answers
2k views

MD5 routines that are GLib friendly?

Does anyone know of an MD5/SHA1/etc routine that is easily used with GLib (i.e. you can give it a GIOChannel, etc)?
Ana Betts's user avatar
  • 74.4k
0 votes
6 answers
2k views

VMware server 1.0.7 modules incompatible with kernel 2.6.26 -- patched, where to submit?

VMware server 1.0.7 installed with vmware-package Debian GNU/Linux testing (lenny) Kernel 2.6.26-1-686 There were several compile problems when trying to build the binary kernel modules from the ...
Alexey Feldgendler's user avatar
20 votes
7 answers
16k views

TCP handshake with SOCK_RAW socket

Ok, I realize this situation is somewhat unusual, but I need to establish a TCP connection (the 3-way handshake) using only raw sockets (in C, in linux) -- i.e. I need to construct the IP headers and ...
azure's user avatar
  • 201
0 votes
7 answers
658 views

Windows Licensing Question [closed]

This is slightly off topic of programming but still has to do with my programming project. I'm writing an app that uses a custom proxy server. I would like to write the server in C# since it would ...
NotDan's user avatar
  • 32.1k
6 votes
6 answers
7k views

Programmatically determine video file format?

Ok, I get the basics of video format - there are some container formats and then you have core video/audio formats. I would like to write a web based application that determines what video/audio codec ...
Jared's user avatar
  • 61
3 votes
3 answers
1k views

What is the current state of art in Linux virtualization technology? [closed]

What VM technologies exist for Linux, their pros and cons, and which is recommended for which application? Since this kind of question can be asked for X other than "VM technologies for Linux", and ...
48 votes
9 answers
58k views

How can I programmatically manage iptables rules on the fly?

I need to query existing rules, as well as being able to easily add and delete rules. I haven't found any API's for doing this. Is there something that I'm missing? The closest I've come to a ...
Ycros's user avatar
  • 1,740
24 votes
11 answers
9k views

How to simulate memory allocation errors

My C application uses 3rd libraries, which do their own memory management. In order to be robust, my application has code to deal with failures of library functions due to lack of free memory. I ...
Omer Zak's user avatar
  • 1,157
4 votes
4 answers
2k views

How do I use (require :PACKAGE) in clisp under Ubuntu Hardy?

I am trying to evaluate the answer provided here, and am getting the error: "A file with name ASDF-INSTALL does not exist" when using clisp: dsm@localhost:~$ clisp -q [1]> (require :asdf-install) ...
dsm's user avatar
  • 10.3k

15 30 50 per page