Re: support for xdg-open (Linux) and open (Mac)

2012-12-04 Thread José Matos
On 2012-11-05 16:00, Cor Blom wrote:
> openSUSE, mageia and ubuntu (as it is coming with the distro, don't
> know about lyx-ppa) are using the same patch (it was once committed to
> lyx-svn, but reversed). I am manintaining the openSUSE packages and I
> have never heard a complaint about them. The reason I include the
> patch is that it is easier for beginners and for more advanced users
> easy to change.
>
> Sources with patch are here:
>
> https://build.opensuse.org/package/files?package=lyx&project=Publishing
>
> BTW: I have read the discussion of the past and understand the
> problems. It is not perfect.
>
> Regards,
>
> Cor
>

Yes, we (with my fedora had here) have always used that patch ever since
it was reverted in svn without any complaints.

-- 
José Matos



Re: support for xdg-open (Linux) and open (Mac)

2012-11-05 Thread Georg Baum
Jean-Marc Lasgouttes wrote:

> You have seen in the 2008 discussion what the problems were at the time.
> It might be worth revisiting this problem now and see whether
> run-mailcap or xdg-open could be used these days.

IMHO it is clear that xdg-open should be used in the long run, but not as 
long as it has severe drawbacks. If the problems do still exist it would be 
very nice if somebody could file a bug report in trac, including a summary 
of the problems that currently prevent LyX from using xdg-open. Then future 
questions could be directed to that bug report.


Georg




Re: support for xdg-open (Linux) and open (Mac)

2012-11-05 Thread Kayvan Sylvan
Here is the patch.

I include it in my Fedora packages at http://www.box.com/kslyx/

On Mon, Nov 5, 2012 at 7:18 AM, Richard Heck  wrote:

> On 11/05/2012 10:00 AM, Kayvan Sylvan wrote:
>
>> In the Fedora distribution lyx packages, an xdg-open patch is applied
>> and the resulting lyx seems to work correctly.
>>
> Can you post that patch?
>


lyx-2.0.1-xdg_open.patch
Description: Binary data


Re: support for xdg-open (Linux) and open (Mac)

2012-11-05 Thread Cor Blom

Op 05-11-12 16:00, Kayvan Sylvan schreef:

In the Fedora distribution lyx packages, an xdg-open patch is applied
and the resulting lyx seems to work correctly.

openSUSE, mageia and ubuntu (as it is coming with the distro, don't know 
about lyx-ppa) are using the same patch (it was once committed to 
lyx-svn, but reversed). I am manintaining the openSUSE packages and I 
have never heard a complaint about them. The reason I include the patch 
is that it is easier for beginners and for more advanced users easy to 
change.


Sources with patch are here:

https://build.opensuse.org/package/files?package=lyx&project=Publishing

BTW: I have read the discussion of the past and understand the problems. 
It is not perfect.


Regards,

Cor







Re: support for xdg-open (Linux) and open (Mac)

2012-11-05 Thread Richard Heck

On 11/05/2012 10:00 AM, Kayvan Sylvan wrote:

In the Fedora distribution lyx packages, an xdg-open patch is applied
and the resulting lyx seems to work correctly.

Can you post that patch?

rh


On Nov 5, 2012, at 1:34, Jean-Marc Lasgouttes  wrote:


Le 05/11/2012 03:51, Scott Kostyshak a écrit :

xdg-open tries to open a file with the "preferred" application of a
user for that file on Linux (which is usually the application that is
used when you double click on a file in your desktop environment). I
think the command "open" on Mac does the same thing. I'm guessing
there's a similar Windows command?

Note that for Mac OS and Windows, we already use the system's API. See
AutoOpen stuff in os_(unix|win32).cpp. Unfortunately, no such API exists
for linux.


Adding support for these could be a solution to common questions I see such as:
"why does LyX open pdf files with Okular when I want it to open with Evince"
and similar complaints.

You have seen in the 2008 discussion what the problems were at the time.
It might be worth revisiting this problem now and see whether
run-mailcap or xdg-open could be used these days.

JMarc





Re: support for xdg-open (Linux) and open (Mac)

2012-11-05 Thread Kayvan Sylvan
In the Fedora distribution lyx packages, an xdg-open patch is applied
and the resulting lyx seems to work correctly.

On Nov 5, 2012, at 1:34, Jean-Marc Lasgouttes  wrote:

> Le 05/11/2012 03:51, Scott Kostyshak a écrit :
>> xdg-open tries to open a file with the "preferred" application of a
>> user for that file on Linux (which is usually the application that is
>> used when you double click on a file in your desktop environment). I
>> think the command "open" on Mac does the same thing. I'm guessing
>> there's a similar Windows command?
>
> Note that for Mac OS and Windows, we already use the system's API. See
> AutoOpen stuff in os_(unix|win32).cpp. Unfortunately, no such API exists
> for linux.
>
>> Adding support for these could be a solution to common questions I see such 
>> as:
>> "why does LyX open pdf files with Okular when I want it to open with Evince"
>> and similar complaints.
>
> You have seen in the 2008 discussion what the problems were at the time.
> It might be worth revisiting this problem now and see whether
> run-mailcap or xdg-open could be used these days.
>
> JMarc
>


Re: support for xdg-open (Linux) and open (Mac)

2012-11-05 Thread Jean-Marc Lasgouttes

Le 05/11/2012 03:51, Scott Kostyshak a écrit :

xdg-open tries to open a file with the "preferred" application of a
user for that file on Linux (which is usually the application that is
used when you double click on a file in your desktop environment). I
think the command "open" on Mac does the same thing. I'm guessing
there's a similar Windows command?


Note that for Mac OS and Windows, we already use the system's API. See 
AutoOpen stuff in os_(unix|win32).cpp. Unfortunately, no such API exists 
for linux.



Adding support for these could be a solution to common questions I see such as:
"why does LyX open pdf files with Okular when I want it to open with Evince"
and similar complaints.


You have seen in the 2008 discussion what the problems were at the time. 
It might be worth revisiting this problem now and see whether 
run-mailcap or xdg-open could be used these days.


JMarc



Re: support for xdg-open (Linux) and open (Mac)

2012-11-04 Thread Richard Heck

On 11/04/2012 10:25 PM, Scott Kostyshak wrote:

On Sun, Nov 4, 2012 at 10:05 PM, Pavel Sanda  wrote:

Scott Kostyshak wrote:

It seems the disadvantages outweigh the advantages. But I wanted to
ask here for feedback.

Please search the archives, it was long story why we don't support xdg-open.

OK. It looks like a long and intense story indeed:
http://lyx.475766.n2.nabble.com/xdg-open-td484474.html

We might should put a comment somewhere in the source. This issue comes 
up every few months, since it seems like such a good idea.


rh



Re: support for xdg-open (Linux) and open (Mac)

2012-11-04 Thread Scott Kostyshak
On Sun, Nov 4, 2012 at 10:05 PM, Pavel Sanda  wrote:
> Scott Kostyshak wrote:
>> It seems the disadvantages outweigh the advantages. But I wanted to
>> ask here for feedback.
>
> Please search the archives, it was long story why we don't support xdg-open.

OK. It looks like a long and intense story indeed:
http://lyx.475766.n2.nabble.com/xdg-open-td484474.html

Thanks,

Scott


Re: support for xdg-open (Linux) and open (Mac)

2012-11-04 Thread Pavel Sanda
Scott Kostyshak wrote:
> It seems the disadvantages outweigh the advantages. But I wanted to
> ask here for feedback.

Please search the archives, it was long story why we don't support xdg-open.
Pavel


support for xdg-open (Linux) and open (Mac)

2012-11-04 Thread Scott Kostyshak
xdg-open tries to open a file with the "preferred" application of a
user for that file on Linux (which is usually the application that is
used when you double click on a file in your desktop environment). I
think the command "open" on Mac does the same thing. I'm guessing
there's a similar Windows command?

Adding support for these could be a solution to common questions I see such as:
"why does LyX open pdf files with Okular when I want it to open with Evince"
and similar complaints.

This could also be a solution to some MIME problems (e.g.
http://comments.gmane.org/gmane.editors.lyx.devel/142567)

I haven't thought about how I would implement this as a
(user-controlled) alternative to the current behavior.

I'm guessing that it is not a good idea because
(1) Different command for each platform.
(2) There should be a platform-independent solution to the MIME problems.
(3) The users who want Evince instead of Okular can be easily
instructed on how to change it in Preferences.

It seems the disadvantages outweigh the advantages. But I wanted to
ask here for feedback.

Thanks,

Scott