linux

Show Process In Linux Using C++

Hello, I'm starting in C++, reading a good book of it and i want to build a program that show to the user all the process that the Linux of he is doing, using C++, someone can help me please. Thanks! ...

trying to understand the main disassembly first instructions

hi I have disassembled some programs (linux) I wrote to understand better how it works, and I noticed that the main function always begins with: lea ecx,[esp+0x4] ; I assume this is for getting the adress of the first argument of the main...why ? and esp,0xfffffff0 ; ??? is the compiler trying to align the stack pointer on 16 byte...

What are the pros and cons of using a Mac for web development?

I have been using Fedora Linux for quite some time now for web development (and for other dev stuff as well). But just recently, someone told me that since I'm doing web development, I might as well use a Mac. I feel like Macs are overrated. Why should I (or should I not) use a Mac? ...

size_t,key_t,time_t etc

i have encountered these "X_t" types many times in c programs,what does they really mean?where is the location of these definition? ...

Case-Insensitive ZSH Suffix Aliases

In my .zshrc I've set up suffix completion aliases like this so that I can open files more easily: alias -s -- txt='mate -w' Which allows me to open text files in my text editor without prepending the editor command. There is a problem, however, when I am attempting to open a file with a capitalized suffix. ZSH will recognize '.txt' ...

Hosting Java Web Start application for inclusion into Linux distros

I authored a Java freeware (closed source) product that I deploy on a web host and distribute via JNLP, inclusive Linux clients. I plan to suggest this product for inclusion into several Linux distro, if possible "as is" (JNLP-based). Can I already contact distros, or I need to reconfigure something (deploy on another host, convert J...

Want to get into the linux web dev world, book recomendations for o/s and apache primers.

Want to get into the linux web dev world, looking for book recomendations for o/s and apache primers. Something that steps me into the concepts slowly... ...

Setting up a NAS with Citrix XenServer

Hi, Just a quick query on anyone whos worked with XenServer, I want to setup a NAS at home but with virtualization (I've looked into VMWare Server and KVM, I quite like KVM!) but I was told about XenServer 5.5. I have comomodity hardware (ASUS board, dual core 2.66Ghz CPU with 8Gb RAM), I need to setup a fileserver to house about 2-3Tb...

Run crontab with user input

Hi, i created a crontab which will run a bash script test.sh. This test.sh file requires some input from the user, and saves the user input into a variable. How do i ensure that the user input will be saved to a variable in test.sh, and when crontab runs the script i can get the output i want? for e.g i have 2 files, file1.sh and file2....

What does it mean WCHAN 'finish' in ps -l <proc_id> output?

I'm running a number of ssh commands in a background. When the triggered-via-ssh command finishes to run, the appropriate background ssh process doesn't get terminated and its ps -l output shows 'finish' for WCHAN and T for 'state'. So why the triggering process is not terminated and what does it mean 'finish' value for WCHAN? Thanks a...

How to generate video screencaps of video files via linux commandline

Is there a command line program for linux (ubuntu) which can generate a large image containing say 6 caps from a given video (e.g. WMV) laid out storyboard style (I know on Windows media player classic can do this)? I need this for part of a script I am writing. ...

svn+apache per directory access control - disable root from modifying permissions file

Hi, I currently have an svn server running on a machine to which multiple users have root access. For the svn repository I want to use per-directory access control. So I user the mod_dav module with apache and specify permissions in /etc/svn-access-file The problem is that since multiple users have root access, then can potentially modi...

UNIX/Linux IPC : Reading from a pipe. How to know length of data at runtime?

I have a child process which generates some output of variable length and then sends it to the parent using a half duplex pipe. In the parent, how do I use the read() function? Since the data can be of different length each time, how can I at run time know the size of the data to do any malloc() for a buffer? Can the fstat() function be ...

Setting process affinity in kernel mode

How can the CPU affinity of a process be set in kernel module? In user mode there is a syscall sched_setaffinity, but I am looking for the kernel mode equivalent. In the Linux kernel code, there is also a function called sched_setaffinity. It's called from the sys_sched_setaffinity function which is called by system_call. From what i...

Getting Items on the Local Clipboard from a Remote SSH Session

Borderline ServerFault question, but I'm programming some shell scripts, so I'm trying here first :) Most *nixes have a command that will let you pipe/redirect output to the local clipboard/pasteboard, and retrieve from same. On OS X these commands are pbcopy, pbpaste Is there anyway to replicate this functionality while SSHed into ...

How to programmatically get the resolution of a window and that of the system in Linux?

I'm trying to get the resolution of the screen as well as the resolution of a specific window (in which a program is running) on Linux system. I don't need to modify the resolution, I only need the current values. As far as I know, we can call some system functions to do so on Windows, how can we do that on Linux, preferably using C/C++ ...

USB Communication API

Is there a decent USB communication API? Preferably cross-platform (Linux if not, I guess) I don't have a specific use in mind, I just want to learn about using the USB ports for future electronics projects. I realize this is very general, I'll try to refine the question as the answers point me in the right direction. Thanks. ...

Loading a C/C++ compiler in Linux.

Hi all, Recently i had installed the UBUNTU flavour of the Linux operating system.I had opened a terminal and just wrote a sample C programm to check if it is compiling.When i saved the sample file and compiled with cc a.c ,errors comes that the standard library is not loaded(i.e stdio.h>.When i went to help pages,it says that the...

Apache Webserver - How to write to dir/files with permissions set at 755 instead of 777

I just learned to install Apache 2 on my ubuntu linux localhost for the first time. I'm making it work with PHP5. I noticed that anytime I want to write to a file or directory, I have to chmod 777 the destination. But from my experience working on 3rd party hosting solutions, I am generally allowed to write to files and dirs that have...

Alternatives to TOAD (Linux)

I am looking for an alternative to TOAD on Linux. I have Oracle SQL Developer and a VM running TOAD but there are still too many features in TOAD that are not present in other tools. Is there any tool (price is not an issue) that is superior or equivalent to TOAD's features which runs on Linux and is not so damn buggy? I also tried squ...