Sixdsn / terra-terminal

Terra is a GTK+3.0 based terminal emulator with useful user interface, it also supports multiple terminals with splitting screen horizontally or vertically. New features have been added since September 2013. It's a pretty new and experimental project, if you want to contribute just checkout and try.
GNU General Public License v3.0
7 stars 3 forks source link

Only allow a single instance #80

Closed SchnWalter closed 9 years ago

SchnWalter commented 9 years ago

Currently you are allowed to run terra a 2nd time, but it fails with this exception.

Exception: Can't bind Global Keys

I propose adding a Process ID file /var/run/terra.pid. This file should be verified when the application starts and it should prevent Terra from launching a 2nd instance... and instead it should focus the previous window/instance.

Do we want multiple instances of terra when developing? I don't think it would be useful.

Sixdsn commented 9 years ago

Hi,

I guess i removed the lock for one instance of terra before implenting the multi window feature. So now that we can open multiple windows in the current terra instance, it's not relevant to allow multiple terra instances. And as it fails to start another instance, we should avoid this.

SchnWalter commented 9 years ago

We have multiple terminal windows? I assume that you want to have the terminal on multiple screens, right? How do you control their visibility, will the "F12" show and hide all of them at once?

Sixdsn commented 9 years ago

Yup, you can add a new window in the menu Terminals -> New Terminal. The F12 shortcut make them all show/hide together.

SchnWalter commented 9 years ago

Looks like normal users can not write to /var/run/, alternatively we could use /tmp, but this is kind of ugly.

We should probably deal with this later since it's not a critical issue.

Sixdsn commented 9 years ago

Right now it's fixed as it can't bind twice the global hotkey do you think it's fair enough to keep it this way?

SchnWalter commented 9 years ago

Maybe we should maybe keep this ticket for later... we can have proper IPC and just focus the existing instance when you try to open the application a 2nd time... and maybe also have commands to open new tabs in particular folder; for things like an "Open in Terra Terminal" option in file managers.

Sixdsn commented 9 years ago

Agree, i close this one as it's done, but open a new one as a spinoff for enhacement

Sixdsn commented 9 years ago

'and maybe also have commands to open new tabs in particular folder; for things like an "Open in Terra Terminal" option in file managers.': Actually there is an option in the preferences menu where you can choose to open a terminal in a specific directory or the same as the previous and it will be saved in the config file. The feature "Open in Terra Terminal" you mean when we do a right click in the file manager ws could show this option? and then open a new term with this folder?

SchnWalter commented 9 years ago

I don't mean the default directory for new terminals... I meant a CLI parameter to be used by file managers with an option on right click, so that you can open it wherever you want, and then focus the newly created window/tab. But this is for when we cleanup the whole thing. I would first like to see the old ConfigManager gone before we start adding new features.

Sixdsn commented 9 years ago

Yep i agree, open a new issue for this feature ;)