linux

BusyBox Help, ip Command

I'm using a Google phone running Android, and I need to figure out how to use the terminal's 'ip' command. I found out that Android uses BusyBox in its terminal, but I can't find any help or tutorials or any information regarding it other than the basic information given in the terminal help. Can anyone point me to a site that would g...

OpenGL / X-Window program hangs during Window creation

Hi! I've got a C/C++ app using the GLFW Library on a netbook-like device running Ubuntu 8.10. As far as I understand the source the GLFW lib, it creates its window using calls to the X-Window library. We do not use any desktop on the machine but login to a tty and start a X-server in the background. When running the compiled applicat...

Running ASP.NET MVC under Mono/Linux with xsp

I am porting an existing ASP.NET MVC applicationto Mono. I am actually trying to make it run under Fedora Linux 11. After a few tweaks, I have managed to make the solution compile in MonoDevelop. While trying to execute it with xsp web server, I get the following output: Handling exception type ConfigurationErrorsException Messag...

Porting shell functions to cmd.exe: Is it possible to automatically source scripts on startup?

I'm porting a Linux tool-set that makes frequent use of shell functions to provide certain functionality. These functions are automatically sourced when you start a new shell and include things like changing the working directory, which is nigh impossible with stand-alone programs because child processes can't change their parent's envir...

Hour difference between Linux and Windows from Java date.getHour().

I have some java code that parses a string and creates a Date object. On Linux, everything works fine, but on Windows it continuously starts at 19:00:00 rather than 00:00:00. Here is the code: if(currTask != null) { if((m = p0.matcher(currTask)).matches()) { date = new Date(Long.valueOf(m.group(2)) - Long.valueOf(m.group(1))); ...

xampp server (How to get up and running)

Hello all. I've been developing locally on a little ubuntu netbook with xampp for about 7 months. Two weeks ago I got a computer I'd like to use as a server. I've installed the latest Ubuntu distribution and xampp, moved all my files over, and forwarded port 80. I've also got a domain name from dyndns.com which is being updated by a clie...

Shared Libraries in Same Folder with App in TCSH

Hi, I am deploying a locally-compiled app to a remote Linux server. Since I don't have root account I cannot put needed shared libraries to /usr/lib Is there a way to overcome this? I put libraries in same folder and changed "path" variable but did not work. ...

Using Mono to recognize executable files in Linux?

Can we recognize which file is executable (i.e. chmod +x) using Mono under Linux? Is there any method in common .Net/Mono base class libraries? Edit: native Linux executables ...

SSL_accept hangs after calling fork()

Hi I'm writing an app in C++ using openssl, and I can't seem to get the ssl socket connection to work. I have an abstract class, with multiple functions implemented using various protocols by the inheriting classes and simple TCP and UDP ( posix sockets ) work fine. I could not get the ssl working though and after some code browsing ...

Which user should the embedded application run as?

We have an embedded linux product with an application which lets the user change different settings through the menu system. These settings include IP address/DHCP and time. We now run this application as root but this feels wrong, letting the user directly interact with a process run as root. Which user should we use? If not root, h...

How do you enable 32 binary compatability in JDK?

Is there a vm option option to enable 32bit compatibility mode? I've googled but couldn't find how to do it anywhere! The reason I am doing it is I'm trying to run the GWT on Linux Ubuntu 64 as the link below indicates is possible. Issue 134: GWT hosted web browser does not work in 64-bit Linux ...

Creating a couchdb standalone attachment using cURL.

I am currently playing with couchdb and testing out the 'standalone attachments' feature, which is described near the bottom of this page. I am trying to use curl's --data-urlencode feature to send the creation request, which only half works. I can create the attachment and retrieve it, but the Content-Type field is wrong, so the im...

How do i change from unix to linux for connecting via c# (With telnet)?

Hola, I have code which has connection to a unix server: sample below: UnixTelnetConnection.Login(_server, _username, _password, FCART.Properties.Settings.Default.CleartoolPrompt.ToString()); However, what needs to be different if its for linux? Does it have to be different? Vidu ...

How can I get the source code for the linux utility tail ?

Hi, this command is really very useful but where I can get the source code to see what is going on inside . thanks . ...

Looking for a way to trap CPUID instructions

I am looking for a neat way to trap and fiddle with the CPUID instruction of Linux processes. Played around with ptrace() and patching all cpuid opcodes in all executable mmap'ed regions that are created by a process, replacing them by int3's. Didn't work that well since the CPUID opcode bytes appears quite often as parts of other longer...

Finding the command for a specific PID in Linux from Python

I'd like to know if it's possible to find out the "command" that a PID is set to. When I say command, I mean what you see in the last column when you run the command "top" in a linux shell. I'd like to get this information from Python somehow when I have a specific PID. Any help would be great. Thanks. ...

Less gets keyboard input from stderr?

Hello! I'm taking a look at the code to the 'less' utility, specifically how it gets keyboard input. Interestingly, on line 80 of ttyin.c, it sets the file descriptor to read from: /* * Try /dev/tty. * If that doesn't work, use file descriptor 2, * which in Unix is usually attached to the screen, * but also...

PTE structure in the linux kernel

I have been trying to look around in the linux source code for a structure/union that'd correspond to the PTE on x86 system with PAE disabled. So far I've found only the following in arch/x86/include/asm/page_32.h typedef union { pteval_t pte; pteval_t pte_low; } pte_t; I'm a bit confused right now since I have the Int...

how to get date and time value in C program

I have something like this char *current_day, *current_time; system("date +%F); system("date +%T); It prints the current day and time in the stdout, but I want to get this output or assign them in current_day and current_time variables, so that I can do some processing with those values later on. current_day ==> current day current_t...

Explain whats different between ImageMagick on Windows and on CentOS linux?

I have been using ImageMagick running on a Windows 2003 server that is called in a PHP script to create a thumbnail of an image using the following command: $cmd = "convert.exe \"". $fullpath . "\" -resize \"" . res_image_width ."x" . res_image_height . ">\" \"". $fullpath. "\" 2>&1"; passthru($cmd); I have now moved this functionalit...