linux

Java application installer for linux

How can I create a linux installer for java desktop application? for an instance if we want to install netbeans on ubuntu there is a download which is named as "netbeans-6.8-ml-java-linux.sh" so how can i create "mydesktopapp-linux.sh" i have the properly working .jar file i want to distribute my java desktop app. Can anyone help me? ...

Can I print UTF-8 encoded files from Linux command-line?

enscript doesn't support utf-8 and the only other suggestion I've seen is to use lpr: lpr -o document-format=text/utf8 file_to_print but that gives an "Unsupported format" error. (Ubuntu 9.04 / GNOME Terminal 2.26.0) ...

How to run infinitely script in background on Linux?

I have a PHP script with infinite loop. I need this script running forever. So, I run php /path/to/script.php > /dev/null & And it works in background in my current user's security context. But when I close terminal window (log off), of course, CentOS Linux kills my program. I see two guesses: run from a different user in backgroun...

Create a thumbnail of a dwg in in a linux environment

Creating a ruby on rails site that uses RMagick to create thumbnails for many types of images. RMagick cannot read dwg files however. I've tried a few things, looked into the Java library JDWGLib, which would probably allow me to write a converter, but it would be a total from the ground up solution, where I just need a thumbnail. Als...

forkpty - socket

Hi, I'm trying to develop a simple "telnet/server" daemon which have to run a program on a new socket connection. This part working fine. But I have to associate my new process to a pty, because this process have some terminal capabilities (like a readline). The code I've developped is (where socketfd is the new socket file descriptor...

Running 32 bit assembly code on a 64 bit Linux & 64 bit Processor : Explain the anomaly.

Hello, I'm in an interesting problem.I forgot I'm using 64bit machine & OS and wrote a 32 bit assembly code. I don't know how to write 64 bit code. This is the x86 32-bit assembly code for Gnu Assembler (AT&T syntax) on Linux. //hello.S #include <asm/unistd.h> #include <syscall.h> #define STDOUT 1 .data hellostr: .ascii "hello w...

Fake serial communication under Linux

I have an application where I want to simulate the connection between a device and a "modem". The device will be connected to a serial port and will talk to the software modem through that. For testing purposes I want to be able to use a mock software device to test send and receive data. Example Python code device = Device() modem =...

how does ` cat << EOF` work in bash?

I needed to write a script to enter multi-line input to a program (psql) After a bit of googling, I found the following syntax works: cat << EOF | psql ---params BEGIN; `pg_dump ----something` update table .... statement ...; END; EOF This correctly constructs the multi-line string (from BEGIN; to END;, inclusive) and pipes it as ...

Convert Maildir to mbox

Hi, Im changing hosts and i need to convert my maildir accounts on my old server to mbox on my new server. Any ideas on the best way to do this? I found this: for i in new/* cur/*;do formail <”$i” >> ../mbox;done But i dont really understand it. I have a basic knowledge of linux and I have root access to my server via ssh. most of t...

Execute shell command in PHP on the desktop of another logged in user

The Setup: I have a LAMP server (Ubuntu 9.10) which is also hooked up to my HDTV. Upon boot, one user is automatically logged in so as to have a desktop environment on screen. What I want: I've been developing a remote, web interface in PHP for various things (play music, for example). However, I've hit a snag in that I would like to ru...

undefined reference linker error

Hi, I've stuck myself in a c++ project under linux ,for which I get an undefined reference when I try to create an object of a class that I just wrote.I believe this is an linker error caused by the fact that somewhere , somehow I should tell the linker to take into account the new class. I looked at the project properties and at the r...

How do I move a Java JFrame partially off my Linux desktop?

I'm writing a Java application with movable frames, and I've come across a quirk in Linux. I'm running GNOME 2.16.0 under CentOS. When I use JFrame.setBounds to set the bounds to any location that's half off the screen, it actually sets the location of the frame to be as close as possible to the bounds specified while still staying com...

Framebuffer Documentation...

Is there any documentation on how to write software that uses the framebuffer device in Linux? I've seen a couple simple examples that basically say: "open it, mmap it, write pixels to mapped area." But no comprehensive documentation on how to use the different IOCTLS for it anything. I've seen references to "panning" and other capabi...

How do I do multiple processes for Django, on my WSGI apache?

My friend says that Django only has 1 thread or something? And I have to edit my 000-default in order to add more processes? He suggests 4 or 5. What exactly is this, and what do I have to do? Thanks, I'm a noob. ...

Consideration of cron job with respect to time

Hi all, Is it possible to run my cron job according to the GMT where as, my server is cosidering IST time formats. In future is it possible to use different time zones...? To do this can anyone suggest what all steps i need to follow as i am working on linux. Thanks in advance.... ...

Detect block size for quota in Linux

The limit placed on disk quota in Linux is counted in blocks. However, I found no reliable way to determine the block size. Tutorials I found refer to block size as 512 bytes, and sometimes as 1024 bytes. I got confused reading a post on LinuxForum.org for what a block size really means. So I tried to find that meaning in the context of...

Linux program in FreeBSD

...

Why can't my Apache see my media folder?

Alias /media/ /home/matt/repos/hello/media <Directory /home/matt/repos/hello/media> Options -Indexes Order deny,allow Allow from all </Directory> WSGIScriptAlias / /home/matt/repos/hello/wsgi/django.wsgi /media is my directory. When I go to mydomain.com/media/, it says 403 Forbidden. And, the rest of my site doesn't work because all st...

How can I make this if's work in Bash ?

In bash how can I make a construction like this to work: if (cp /folder/path /to/path) && (cp /anotherfolder/path /to/anotherpath) then echo "Succeeded" else echo "Failed" fi The if should test for the $? return code of each command and tie them with &&. How can I make this in Bash ? ...

linux piping ( convert -> pdf2ps -> lp)

Ok, so I can print a pdf doing: pdf2ps file.pdf - | lp -s But now I want to use convert to merge several pdf files, I can do this with: convert file1.pdf file2.pdf merged.pdf which merges file1.pdf and file2.pdf into merged.pdf, target can be replaced with '-'. Question How could I pipe convert into pdf2ps and then into lp though...