Control multiple program instances - open multiple files problem
Hello. This shouldn't be an unusual problem, but I cannot find anything about it at google or at other search machine.
So, I've made an application using C++ and QtCreator. I 've made a new mime type for application's project files.
My system (ubuntu 10.10), when I right click a file and I choose "Open With 'Default Application'" the it runs
So, if you select multiple files and select "Open With 'Default Application'" the system will call
So, this is a big problem for me, because I handle the concurrent processes from inside the program, so when another instance of the program is running, a warning message is appeared. So, each application's call will recognize the others as currently running applications and so it'll show the message. I'll end up with 3 Messages saying that another process of the program is running --_--'
My application handles multiple URLs this way:
How can I make my code handle all these multiple instances at the same time? Everything I've tried fails, because everything I've tried requires a check from the first instance called, which is too slow and other instances come app and all together are warning about concurrent processes of the same program
So, how can I fix this? is it system depended, or can I do something with the code?
I would like to start up multiple instances of syslog daemon. I am having a little difficulty. Is this at all possible?
I have separate syslog.conf1.... syslog.conf5 files.
I have linked the daemon to separate files syslogd1 ... syslogd5
I have arranged the rcd.2 start/stop scripts for... (9 Replies)
I am capturing text based reports with a specific program, which works no problem. However, since I send report warehouse output as they are migrated from the database software, on occasion when two capture process' initiate simultaneously, the capture file locks up. Is there a way to setup (in... (1 Reply)
Hi Gurus
I have a requirement like this. i use solaris OS..
if there are 2 instances of the same ksh file running in the directory, i need to kill the ksh file that started to run latest.
suppose ragha.ksh starts running thru cron in abc/xyz directory
now ragha.ksh started running by any... (3 Replies)
Hi,
I know that the answer to this is very simple, since I saw somebody do it some time back..but I forgot how.
The problem is, I have multiple instances of the same program running simultaneously and I want to kill them all in a single command.
I know that it can be done using awk '{print... (12 Replies)
Could you please let me know how to create/make a multiple instances of a job/process in ksh(shell scripting).
i.e., at present the parent script is calling another child/dependent script for only once.
What we want is, the parent script itself has to execute multiple times, and in each one it... (1 Reply)
I have a question regarding Perl scripting.
If I want to say open files that all look like this and assign them to a filehandle and then assign the filehandle to a variable, how do I do this?
The file names are
strand1.fa.gz.tmp
strand2.fa.gz.tmp
strand3.fa.gz.tmp
strand4.fa.gz.tmp
...... (6 Replies)
Suppose I declare
pthread_t clear_thread;
and then
pthread_create(&clear_thread, &detach, clear_message, this);
the thread is supposed to go away, perform the service it is intended to procide, and then kill itself.
A little while later, I require this service again, so I say
... (2 Replies)
Hi,
I want to work with multiple files which all contain 2 numbers.
I tried to make a nested for loop but for some reason it doesn't recognize the $j as a number. The output is cannot open file `175-T-pvalue.xls'. How do I make sure that it takes the numbers from the inner loop as $j?
... (4 Replies)
Hello,
I'm attempting to open multiple xterms and run a command as an SAP user via sudo using PSSH. So far, I'm able to run PSSH to a file of servers with no check for keys, open every xterm in to the servers in the file list, and SUDO to the SAP(ADM) user, but it won't do anything else... (11 Replies)
Discussion started by: icemanj
11 Replies
LEARN ABOUT DEBIAN
mimeopen
MIMEOPEN(1p) User Contributed Perl Documentation MIMEOPEN(1p)NAME
mimeopen - Open files by mimetype
SYNOPSIS
mimeopen [options] [-] files
DESCRIPTION
This script tries to determine the mimetype of a file and open it with the default desktop application. If no default application is
configured the user is prompted with an "open with" menu in the terminal.
To use this script you need the freedestop mime-info database and the freedesktop desktop-file-utils package. See
File::MimeInfo::Applications(3) for more details.
OPTIONS -a, --ask
Do not execute the default application but ask which application to run. This does not change the default application.
-d, --ask-default
Let the user choose a new default program for given files.
-n, --no-ask
Don't ask the user which program to use. Choose the default program or the first program known to handle the file mimetype. This does
not set the default application.
-M, --magic-only
Do not check for extensions, globs or inode type, only look at the content of the file. This is particularly useful if for some reason
you don't trust the name or the extension a file has.
--database=mimedir:mimedir:...
Force the program to look in these directories for the shared mime-info database. The directories specified by the basedir
specification are ignored.
-D, --debug
Print debug information about how the mimetype was determined.
-h, --help
-u, --usage
Print a help message and exits.
-v, --version
Print the version of the program and exit.
DEPRECATED OPTIONS -L, --dereference
Follow symbolic links. Deprecated because this is the logical default for this command. Ignored silently.
BUGS
No known bugs, please mail the author if you find one.
See File::MimeInfo::Applications(3) and File::DesktopEntry(3) for some limitations.
AUTHOR
Jaap Karssenberg <pardus@cpan.org>
COPYRIGHT
Copyright (c) 2002, 2012 Jaap G Karssenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it
under the same terms as Perl.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SEE ALSO mimetype(1), update-mime-database(1), update-desktop-database(1), File::MimeInfo(3), File::MimeInfo::Applications(3)perl v5.14.2 2012-01-05 MIMEOPEN(1p)