linux

ALSA: How can I find a device in the device list and still I get "No such file or directory" when opening it?

It seems I don't understand the ALSA architecture, even after reading most of the documentation on offer: I list all the available ALSA devices using snd_device_name_hint() and snd_device_name_get_hint(). This lists, among others "pulse" under hwdep class so it looks like PulseAudio is available in my system. But when I try to open it w...

How to grep all the data in a specified col from standard output?

Now i have a standard output which is printed by my program and displayed on the screen. The outputs looks like the following part: Parsing command line string 'InputFile = foreman.qcif'. Parsing command line string 'NumberReferenceFrames = 1'. Parsing command line string 'QPISlice = 24'. Parsing command line string 'QPPSlice = 24'. --...

Can I ungarble GCC's RTTI names?

On my Ubuntu computer, when I ask for an object/variable's type using typeid, I get a weird-looking name using the type_info::name method. (By "weird" I mean that it's different from what I'd expect to get on Windows.) I Googled around a bit, and found out that RTTI names are implementation-specific. Problem is, I want to get a type's n...

Link with an older version of libstdc++

After installing a new build machine, I found out it came with 6.0.10 of the standard C++ library -rw-r--r-- 1 root root 1019216 2009-01-02 12:15 libstdc++.so.6.0.10 Many of our target machines, however, still use an older version of libstdc++, for example: -rwxr-xr-x 1 root root 985888 Aug 19 21:14 libstdc++.so.6.0.8 Apparently ...

my C program has a char, and I want it to hold more data, what data type do I substitute for it?

I want to modify a program that grabs images from a camera capture board, now its using a char and says its limited to 1000 images, its early/late and I need sleep, so maybe there is a better way to go about this, but I am thinking maybe I could just substitute all the related data variables with higher capacity data types... right now i...

How to read using "read" from file descriptor 3 in bash script?

http://bash.cyberciti.biz/file-management/shell-script-to-simulate-unix-more-command/ #!/bin/bash # Write a shell script like a more command. It asks the user name, the # name of the file on command prompt and displays only the 15 lines of # the file at a time. # ------------------------------------------------------------------------- ...

Some question about Cygwin[linux in windows] (socket,thread,other programming and shell issues)

I have some question about cygwin : Can I use Cygwin develop socket based code? Does Cygwin have read() and write() functions that work with file descriptors? Can I use Pthread library in Cygwin? Does code that compiles in Cygwin also compile in Linux without any change or with little change? Will an executable file that built by Cyg...

Am unable to perform an SVN update on a working copy in Linux getting "Unable to open an ra_local session to URL" error.

I have a Linux server which contains 10 repositories. I have setup a samba share to allow easy access to the repository directory so that I can create repositories via Windows using tortoisesvn's Create repository here command.... The problem is that the repositories were setup using the Windows file:/// paths and not the HTTP ones usin...

epoll performance

Hi there... Can anyone please help me to answer the questions about epoll_wait. Is it overkill to use many threads that call epoll_wait on the same fds set to serve at about 100K active sockets? or will it just be enough to create only 1 thread to perform epoll_wait? How many threads will wake up from epoll_wait when for example only ...

Can I change write access for root directory? Sygic Navigation and their API...

I need to be able to write textfiles to the root directory of my Android device (as this related questions explains). Can I change write permissions for root directory / and if so, how? I tried pushing a file using adb, but it said file system was read-only =( Its pretty annoying that I cannot control my own device, that everything is...

Stripping linux shared libraries

We've recently been asked to ship a Linux version of one of our libraries, previously we've developed under Linux and shipped for Windows where deploying libraries is generally a lot easier. The problem we've hit upon is in stripping the exported symbols down to only those in the exposed interface. There are three good reasons for wantin...

When SSHing into system, is there a way to launch netbeans from command-line like I do VIM?

VIM seems integrated to the terminal. Can I open a remote file from the command-line with netbeans? Does it have shell integration? Any further explanation on this so I can better conceptually understand it would be very appreciated. ...

Java exec() does not return expected result of pipes' connected commands

I'm calling command line programs connected by pipes. All this works on Linux for sure. My method: protected String execCommand(String command) throws IOException { String line = null; if (command.length() > 0) { Process child = Runtime.getRuntime().exec(command); InputStream lsOut = child.getInputStream(); ...

Debugging SIGBUS on x86 Linux

What can cause SIGBUS (bus error) on a generic x86 userland application in Linux? All of the discussion I've been able to find online is regarding memory alignment errors, which from what I understand doesn't really apply to x86. (My code is running on a Geode, in case there are any relevant processor-specific quirks there.) ...

Android development tools

I'd like to hack on my new Android phone using a Linux development environment. What tools would you recommend? ...

Weird pynotify behaviour in Ubuntu 9.10

Hi, I wrote a small app and I am using pynotify to show some messages to the user. It all works fine here in arch, but when I tested it in Ubuntu, the behaviour was very weird. Because of the way Ubuntu shows notifications (as what seems to be a rip of of growl), I can't click on them, or interact with them in any way, for that matter....

Using diff and supressing entirely different files

I have two copies of an application source code. One copy is encoded, while the other is not. There are config files scattered through-out the application's directory structure, and this is what I would like to compare. Is there a way to use diff where-by I can ignore the wildly different files (ie: An encrypted file and an unencrypted ...

Specifying UDP receive buffer size at runtime in Linux

Hello, In Linux, one can specify the system's default receive buffer size for network packets, say UDP, using the following commands: sysctl -w net.core.rmem_max=<value> sysctl -w net.core.rmem_default=<value> But I wonder, is it possible for an application (say, in c) to override system's defaults by specifying the receive buffer si...

UML Linux - vmlinux.o Error 1 - final close failed: Input/output error

I'm trying to install UML linux. Kernel is 2.6.28. I link to Linux files so that I have a read-only copy that I can revert back to. I then run the commands: make defconfig ARCH=um # works make ARCH=um # errors out at the very end: final close failed: Input/output error make: *** [vmlinux.o] Error 1 Because of this error,...

Can't find a decent git gui for windows. Anyone know of one?

I'm running win7 and need a good git client with a GUI. I like bash but it feels clunky in windows. the GUI that comes with the windows package at git's website is missing a lot of stuff too. I'm considering switching to Ubuntu and using Gedit + git instead. What should I do? stay in windows and use Aptana or Komodo with another git clie...