linux

Can you manually set resolution (pixel height/width) for Firefox 3 on Linux?

Trying to get my 800px width swf to take up the full width of the browser, but Firefox always shrinks it to about 2/3 size. Wondering if I can manually set the width FF opens up to, so that my swf will display at full resolution. Running Fedora 10. Any advice is much appreciated. ...

Embedded linux child process creation problem

Hi All, I am using linux kernel 2.6.30 on my board. It has 128MB of DDR2. My main application occupies almost 80MB of system memory. After executing all applications, only 25MB is left. I want to execute system commands from my main application (which uses 80MB). But it is not executed. As per my understanding, each child process requir...

Update an external MYSQL database every..2mines from an internal one.

How can I update a MYSQL database ever few minutes to an external database? I was thinking of doing a database dump every 2 minutes to the other server, then the other server could have a cron job to apply the new data to it's database, good idea? The reason I want to do this is because I have 2 servers, one which doesn't pretty much a...

Squid configuration for proxy server

I have a server with 10 ip's that I want to give access to some friends via authentication but I'm stuck on squid's config file. Let's say I have these ip's available on my server: 212.77.23.10 212.77.1.10 68.44.82.112 And I want to allocate each one of them to a different user like so: 212.77.23.10 goes to user manilodisan using pas...

Simulate a device driver crash in linux. Have python reload it.

I have a web camera running in Linux using the uvcvideo module. And I'm using a python application to access the web camera and display the image. I want the python program to handle it if the web camera for some reason don't work anymore. Have tested with just unloading the module. Works fine if i just unload the module before I run th...

general purpose file preview component

Is anyone aware of a good, general purpose file preview component for linux/Qt/GTK/c/C++ applications? Specifically, I'm looking for a component that I could embed in my application that would allow a broad range of file types (text files, multimedia, etc.) to be previewed without the need for original applications to be installed. The ...

Linux Serial Port Communications Timeouts - VirtualBox passthrough

I am using Virtual Box USB passthrough features to attach a serial port to Ubuntu (/dev/ttyUSB0). This port is used to communicate with a 3dm-gx2 IMU. The same port works with the vendor supplied Windows code where they set specifically send/receive buffers and timeouts. I can't get the serial port to function from Linux (Need it for dep...

Interrupting epoll_wait with a non-IO event, no signals

Current scenario is epoll_wait over a couple of fds and a queue of possible incoming messages, I'd like the loop below epoll_wait to be executed on IO event or on new message. Ways I know: Use a time msec timeout and check the queue first thing in the loop Use the self-pipe trick from the queue code when messages become available Int...

How to call shell script from net assembly

Need to call unix shell script from a Net assembley, how would I do it.. and return tabular result(key value pair(s)) to the caller. ...

Automating Inline::Java Installation on Linux (Centos/Redhat)

I'm maintaining a perl script which runs an automated install of our base server software. One of the new requirements is to install the Inline::Java module. Our usual strategy of installing using Yum seems to fall down as there's no Inline::Java available in yum. I can't find an RPM release for it so can't install as an RPM. The only...

Assembly/Linking problem with nasm and ld

I have a sample assembly file that I compile with nasm: nasm -f elf syscall.asm This generates a syscall.o file. I try to link it with ld: ld -o syscall syscall.o The ld command fails with the following error: ld: i386 architecture of input file `syscall.o' is incompatible with i386:x86-64 output However, if I do ld -o syscall...

Which platform is more convenient for web-development (OS X or Linux)?

Disclaimer: This question doesn't aim to start another controversy between Apple fans and Linux fans, it just explicitly asks for actual information and facts. By saying "tired of system freezes in Ubuntu" I do not intend to say that Linux is bad. I understand that cheap hardware with open source OS can result buggy performance. Please...

How to remove the filename from the end of the du -h output

Hi, take the example: $ du -h file_size.txt 112K file_size.txt How would i remove the filename from the output of du -h I have tried to use sed to search for a string (the filename) and replace it with nothing, but it hasnt worked (command below) du -h file_size.txt | sed 's/ 'file_size.txt'//' Could someone please point out why...

What are secure approaches to handling a script that requires a database (MySQL) password?

Obviously, we don't want to hardcode the plaintext password in each script. This would make cycling the password difficult since a ton of scripts would need to be changed in addition to the password being in plaintext in the first place. If the scripts takes the password as a parameter, then we need to worry about modifying the 'ps' out...

Variable name conflict with GDB debugger

I'm debugging a C++ program with GDB on Linux, and I need to see the value of a member variable while the program is running. The member variable, unfortunately, is named list, which happens to be a GDB keyword. So when I try: print m_operations.m_data[10].m_data.list I get... A syntax error in expression, near list'. I tried all s...

Working program gets an Illegal instruction fault on 'clean machine' ?

I have a program that works correctly on my development machine but produces an Illegal instruction fault when tested on a 'clean machine' where only the necessary files have been copied. The program consists of my shared library, built from C++ sources and a C wrapper sample program that demonstrates the libraries usage. On the develop...

Elementary Linux scripting question

I'm trying to figure out how to work git filter-branch and I need help with some basic Linux scripting commands. 'git ls-files -s | sed "s-\t-&newsubdir/-" | GIT_INDEX_FILE=$GIT_INDEX_FILE.new \ git update-index --index-info && mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD Can anyone bre...

Information To Be Built Into Linux Shared Library

I have two shared libraries in Linux that when built are identical in all ways except that the one function that each exposes has a different interface (one takes in some 3rd-party array types and the other takes in strings). I can build both shared library versions, and I was wondering if there was a way that I can insert meta-informat...

How do I install the Mono Winforms Designer on Mac OS X?

I've searched around but was unable to find a good, clear, answer. Can someone please explain to me how I can install the Mono Winforms Designer on Mac OS X? If it's not possible on OS X, can it be done on Linux? And if so, how? Any and all help is appreciated! Thanks. ...

How do you append to an already existing string?

I want append to a string so that every time I loop over it will add say "test" to the string. Like in PHP you would do: $teststr = "test1\n" $teststr .= "test2\n" echo = "$teststr" echos: test1 test2 But I need to do this in a shell script ...