launchLeo on ubuntu: Reuse existing editor process?

34 views
Skip to first unread message

Yaakov Belch

unread,
Mar 14, 2020, 4:01:29 PM3/14/20
to leo-e...@googlegroups.com
I am not sure whether this behavior is controlled by the launchLeo program --- or by some other part of my Ubuntu installation:

It seems that the behavior of launchLeo changed recently:

Until recently, when a leo session was already running, launchLeo would just bring the existing editor session to the foreground.  I liked this behavior.

But now, each execution of launchLeo creates a separate Leo window.  This makes my launcher bindings useless.

Is this behavior controlled by the leo program? 
If yes --- can I have the previous single-editor-window behavior back?
If not --- do you have any hint what I need to fix in order to get the original behavior?

Yaakov

Yaakov Belch

unread,
Mar 14, 2020, 4:20:20 PM3/14/20
to leo-e...@googlegroups.com
Maybe the problem I am not using my ubuntu correctly: Do you know how can I add the launchLeo script to my Favorites?  In some applications, right-clicking on the icon of a running application gives the option to add this one to the Favorites (currently, leo doesn't do that).  Because of this, I wrote my own leo.desktop file.  In the past, this worked --- but now it creates a new window each time I click on the icon.

BTW --- I am using a recent checkout of the devel branch.

Yaakov

Thomas Passin

unread,
Mar 14, 2020, 10:43:51 PM3/14/20
to leo-editor
I don't know how Ubuntu does this any more - I did it a few times several years ago. After some experimenting (on the Unity desktop), I can get you a Leo launch icon on the desktop, I can get Leo added to the list of applications that can be used to open a file, but I can't get the launch icon to accept drag and drop. And each Leo file you launch by right-clicking it in file manager and choosing Leo opens it in a new Leo session - just what you didn't want.  OTOH, you can drag right from the file manager onto an open instance of Leo and it will open the file in the same Leo session.  It seems that is pretty close to what you asked for.


On Saturday, March 14, 2020 at 4:20:20 PM UTC-4, Yaakov Belch wrote:
Maybe the problem I am not using my ubuntu correctly: Do you know how can I add the launchLeo script to my Favorites?  In some applications, right-clicking on the icon of a running application gives the option to add this one to the Favorites (currently, leo doesn't do that).  Because of this, I wrote my own leo.desktop file.  In the past, this worked --- but now it creates a new window each time I click on the icon.

BTW --- I am using a recent checkout of the devel branch.

Yaakov

Yaakov Belch

unread,
Mar 15, 2020, 3:32:11 AM3/15/20
to leo-e...@googlegroups.com
Thank you very much for your help, Thomas.

What I want is simply that by pressing Window-1, the open Leo session is brought to the foreground --- or (if there is no running Leo session) a new Leo session is created.  That's what I need to work without touching my mouse. Usually, all the outlines I work with will already be open in that Leo session.

I thought maybe this functionality is supported by the Leo code --- and I need to work with leo to re-enable it.  Hence I asked here.
I will now check whether I can achieve my goal by using external Ubuntu tools.  I'll update this list with what I find...

Yaakov

--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/acd35970-26cd-42c3-a5ba-24d28f911f72%40googlegroups.com.

Thomas Passin

unread,
Mar 15, 2020, 10:37:47 AM3/15/20
to leo-editor


On Sunday, March 15, 2020 at 3:32:11 AM UTC-4, Yaakov Belch wrote:
Thank you very much for your help, Thomas.

What I want is simply that by pressing Window-1, the open Leo session is brought to the foreground --- or (if there is no running Leo session) a new Leo session is created.  That's what I need to work without touching my mouse. Usually, all the outlines I work with will already be open in that Leo session.

By saying "pressing Window-1", it sounds like you mean you have Leo in a particular virtual desktop.  If Leo were the only window open in a desktop, wouldn't it automatically have the focus when you switch?  And if there were more than one window open, you could cycle to it with Alt-Tab.  Of course, I don't mean to tell you how to operate, I'm just trying to make sure I understand what you have in mind.

Matt Wilkie

unread,
Mar 16, 2020, 4:18:02 PM3/16/20
to leo-editor
I don't know about how to enforce single session (bring the already running application to the front) from a menu or desktop link, but for creating the menu link there is a script in Leo: "Settings >> Open desktop integration" and then see [add-desktop-links] or [remove-desktop-links].  They're beta quality and not widely tested on Linux but should work on Ubuntu.

-matt
Reply all
Reply to author
Forward
0 new messages