Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using the application TreeSheets, which is something like Excel on steroids. And I want to be able to view two "spreadsheets" side-by-side. Sadly, the application itself does not offer this as an option, and automatically puts each newly opened document in a new tab, without even the possibility to "arrange windows" within the main application window as known from Microsoft Office products.

Is there any trick to trick the application into starting a second time? Maybe something on a window manager level? (I am using KDE + xmonad; it is OK if it is a hack which happens to produce something ugly like a tab without visible menus or window decorations). Or maybe somehow forcing the program to start in a second, different process.

I don't need the two instances of the program to somehow "know" each other (as opposed to Excel spreadsheets where you can refer to the cells of a different spreadsheet file). All I need between the two is simple clipboard functionality for copying and pasting plain text.

I don't mind using inelegant tricks as long as it works. My current solution is to open the second spreadsheet on a second computer with Synergy; anything less painful is welcome.

share|improve this question
1  
The concept of tabs is entirely internal to the application: the window manager doesn't know about those. So any method to get separate windows would have to be specific to the application to some extent. –  Gilles Jan 13 '13 at 22:45
    
@Gilles I am OK with a method which starts two separate instances of the application, each with its own (internally managed) tabs. All methods I know (running treesheets from terminal, running it with Alt+F2, double-clicking a file) open the file in the already existing application instance. As for an internal-to-the-application method, I skimmed the documentation and could not find an option to start a new window the way e.g. firefox can be started with --no-remote. –  rumtscho Jan 13 '13 at 23:15

1 Answer 1

up vote 0 down vote accepted

X servers have no notion of tabs or open files, so as far as the X server is concerned, TreeSheets is doing its own business in one window. You will have to convince TreeSheets to open separate windows somehow.

If the application lacks this feature, your only recourse is to launch separate instances. How to do that depends on how TreeSheets detects a running instance.

If TreeSheets depends on a lock file somewhere under your home directory, try running it with a different home directory:

HOME=/home/rumtscho/treesheets-instances/1 treesheets second-file

You'll have to copy or symlink your configuration files under /home/rumtscho/treesheets-instances/1.

If TreeSheets insists in ignoring the HOME environment variable, you may have to run it as a different user.

If TreeSheets looks for another window that belongs to the same application, you may have to run different instances on a different display. First, try fooling it by running on a different display:

ssh -X localhost treesheets second-file

If that fails, try the heavy-handed way: run TreeSheets inside a VNC client.

If TreeSheets is using D-Bus, try unsetting the environment variable DBUS_SESSION_BUS_ADDRESS.

There may be other ways, it all depends on how TreeSheets detects the running instance and communicates with it. Look for files that are created when you run TreeSheets, and what files it has open.

TreeSheets somefile &
# wait until the program has finished starting up
find ~/.[!.]* -mmin -5
lsof -p${!}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.