linux

VirtualBox from an existing partition

I installed VirtualBox on my Ubuntu Hardy Heron installation, and I would like to use it to virtualize Windows for those rare occasions that I actually need to do something there. Unfortunately, I don't have an installation disk at the moment, but I do have Vista already installed on a partition (it came with the machine). Is there a w...

Combining values from different files into one CSV file

I have a couple of files containing a value in each line EDIT: Oops... I figured out the answer to this question while in the midst of writing the post and didn't realize I had posted it by mistake in its incomplete state. I was trying to do: paste -d ',' file1 file2 file 3 file 4 > file5.csv and was getting a weird output. I later ...

How can I set LANG to ascii?

I'm accessing an ubuntu machine using PuTTY, and using gcc. The default LANG environment variable on this machine is set to en_NZ.UTF-8, which causes GCC to think PuTTY is capable of displaying UTF-8 text, which it doesn't seem to be. Maybe it's my font, I don't know - it does this: foo.c:1: error: expected â=â, â,â, â;â, âasmâ or â__...

Could you recommend some guides about Epoll on Linux

I need to know about Epoll On linux System. Could you recommend manual or guides about epoll library? need more detailed guides. it's better to have some examples. help me. and Thank you for reading. ...

Avoid traffic shaping by using ssh on port 443

I heard that if you use port 443 (the port usually used for https) for ssh, the encrypted packets look the same to your isp. Could this be a way to avoid traffic shaping/throttling? ...

Does Mono support System.Drawing and System.Drawing.Printing?

I'm attempting to use Mono to load a bitmap and print it on Linux but I'm getting an exception. Does Mono support printing on Linux? The code/exception are below: EDIT: No longer getting the exception, but I'm still curious what kind of support there is. Leaving the code for posterity or something. private void btnPrintTest_Click(ob...

C++ : Opening a file in non exclusive mode

I have to develop an application which parses a log file and sends specific data to a server. It has to run on both Linux and Windows. The problem appears when I want to test the log rolling system (which appends .1 to the name of the creates a new one with the same name). On Windows (haven't tested yet on Linux) I can't rename a file ...

How do you choose a Linux/Unix/BSD distribution?

I am attempting to choose a Linux, Unix, and/or BSD distribution for development purposes. I want to be able to do things like write shell scripts, develop C, C++, Java, Ruby, Python, etc. apps in a *nix environment, and see things from a different perspective. I'm planning on using a Virtual Machine to do all of this. My first stop was ...

How do you set up an OpenID provider (server) in Ubuntu?

I want to log onto Stack Overflow using OpenID, but I thought I'd set up my own OpenID provider, just because it's harder :) How do you do this in Ubuntu? Edit: Replacing 'server' with the correct term OpenID provider (Identity provider would also be correct according to wikipedia). ...

Best way to extract data from a FileMaker Pro database in a script?

My job would be easier, or at least less tedious if I could come up with an automated way (preferably in a Python script) to extract useful information from a FileMaker Pro database. I am working on Linux machine and the FileMaker database is on the same LAN running on an OS X machine. I can log into the webby interface from my machine. ...

Eclipse 3.2.2 content assist not finding classes in the project

In Eclipse 3.2.2 on Linux content assist is not finding classes within the same project. Upgrading above 3.2 is not an option as SWT is not available above 3.2 for Solaris. I have seen suggestions to clean the workspace, reopen the workspace, run eclipse with the -clean command, none of which has worked. ...

Python distutils - does anyone know how to use it?

Hello, I wrote a quick program in python to add a gtk GUI to a cli program. I was wondering how I can create an installer using distutils. Since it's just a GUI frontend for a command line app it only works in *nix anyway so I'm not worried about it being cross platform. my main goal is to create a .deb package for debian/ubuntu users,...

How do you get the filename of a tempfile to use in Linux?

Let's say I'm creating a program in C that needs to use a tempfile. Creating an ad hoc tempfile in /tmp is probably not a good idea. Is there a function or OS call to supply me with a tempfile name so that I can begin to write and read from it? ...

How to redirect all stderr in bash?

Hey! I'm looking for a way to redirect all the stderr streams in interactive bash (ideally to its calling parent process). I don't want to redirect stderr stream from each individual command, which I could do by appending 2> a_file to each command. By default, these stderr streams are redirected to the stdout of an interactive bash. I...

How should I configure grub for booting linux kernel from a USB hard drive?

I have a laptop hard drive in an external enclosure which I use as a large pendrive. For an added twist, I have installed Linux on it, so I can boot any machine with my distribution of choice (e.g. for data recovery or repairing a b0rked system or just using a borrowed laptop without destroying the preinstalled Windows). The problem is t...

Register file extensions / mime types in Linux

I'm developing a Linux application that has its own file format. I want my app to open when you double-click on those files. How can I register a file extension and associate it with my application on Linux? I'm looking for a way that that is standard (works with GNOME and KDE based systems) and can be done automatic when my program is ...

How do I find the 'temp' directory in Linux?

How do I find the 'temp' directory in Linux? I am writing a platform neutral C++ function that returns the temp directory. In Mac an Windows, there is an API that returns these results. In Linux, I'm stomped. ...

NAnt and dual platform build - best way to build on Windows AND Mono/Linux

I'm new to NAnt but have some experience with Ant and CruiseControl. What I want to do is have my SVN project include all tools needed (like NUnit and Mocks etc) so I can check out onto a fresh machine and build. This strategy is outlined by J.P Boodhoo here. So far so good if I only want to run on Windows, but I want to be able to che...

Tracking down where disk space has gone on Linux?

When administering Linux systems I often find myself struggling to track down the culprit after a partition goes full. I normally use du / | sort -nr but on a large filesystem this takes a long time before any results are returned. Also, this is usually successful in highlighting the worst offender but I've often found myself resorti...

"ypcat" and "ypmatch username passwd" don't agree after change on server

I'm trying to use NIS for authentication on a st of machines. I had to change one of the user ID numbers for a user account on the NIS server (I changed the userid for username from 500 to 509 to avoid a conflict with a local user account with id 500 on the clients). The problem is that it has not updated properly on the client. In par...