[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 216
  • Last Modified:

An utility or a way to allow only one instance of app running in Gnome desktop

I am using Fedora Linux with Gnome. Is there an utility or a way to only allow single instance of an app running on the desktop? (This app itself does not have single instance running option)

I need this feature so I won't accidentally open 2 instances of the same program, overwriting the same file, making it lose the new file content when saved by the other instance of the program with the old content, because this already happened to me and it was very frustrating to lose all my hours of work :(
0
santocki
Asked:
santocki
1 Solution
 
giltjrCommented:
Off hand I would suggest renaming the application's program, create a shell script by the same name, and have the shell script check for to see if a "lock" file exists, if the lock file exists, it the script ends, if it does not exist, it creates one and runs the renamed program, when the shell script ends it deletes the lock file.

This is basically how most other programs works and they create "xxxx.pid" files as the lock files.

You really don't need to rename the program file, you only need to make sure that the directory with the shell script is in a directory that is listed in the path before the directory the program is in.  
0
 
echlinmCommented:
This also sounds like a good time to look at using a configuration managerment system to track changes to your output files.
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now