[SOLVED]Problem with parameter from Tux to win

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
JujuLand46
Level 2
Level 2
Posts: 22
Joined: Sat Apr 25, 2009 8:49 am

[SOLVED]Problem with parameter from Tux to win

Post by JujuLand46 »

Hi,

I use K-Meleon under wine as browser, and Thunderbird (linux version) as mail client.

When I click on a link in Thunderbird, K-Meleon is opened, but the parameter isn't sent, instead of it I have just '%u', the parameter I have put on the line in default programs to say to pass the real parameter.

K-Meleon receive %u and modify the address to http://www.%u.com/

Is it a thunderbird or a wine bug, or have I missed something ?

Thanks

A+
Last edited by JujuLand46 on Wed May 20, 2009 3:19 pm, edited 1 time in total.
James McKenzie

Problem with parameter from Tux to win

Post by James McKenzie »

JujuLand46 wrote:
Hi,

I use K-Meleon under wine as browser, and Thunderbird (linux version) as mail client.

When I click on a link in Thunderbird, K-Meleon is opened, but the parameter isn't sent, instead of it I have just '%u', the parameter I have put on the line in default programs to say to pass the real parameter.

K-Meleon receive %u and modify the address to http://www.%u.com/

Is it a thunderbird or a wine bug, or have I missed something ?
You have to pass the actual parameter. %u will not work.

James McKenzie
JujuLand46
Level 2
Level 2
Posts: 22
Joined: Sat Apr 25, 2009 8:49 am

Post by JujuLand46 »

Thanks for the answer, but it doesn't make me happy.

It obviously works with a linux browser, so I presume it's a bug of wine.

Or perhaps a limitation which can't be cleared ?

It would be interesting to have the info.

I can perhaps manually copy the link and try to paste it in the URL bar, but I'm not sure, having read some post about clipboard problems, that it will works. And it's a pain to have to make it manually.

A+
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Problem with parameter from Tux to win

Post by vitamin »

JujuLand46 wrote:K-Meleon receive %u and modify the address to http://www.%u.com/
There is no such expansion in windows shellexec.
JujuLand46
Level 2
Level 2
Posts: 22
Joined: Sat Apr 25, 2009 8:49 am

Post by JujuLand46 »

Oh, no ! I didn't talk about the URL expansion which is a K-Meleon feature, but about parameter expansion.

%u => http://<page.address>/

A+
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

JujuLand46 wrote:parameter expansion.
What parameter expansion? Where do you expect Wine to expand it?
JujuLand46
Level 2
Level 2
Posts: 22
Joined: Sat Apr 25, 2009 8:49 am

Post by JujuLand46 »

In the tool to define the default programs for browsing and mailing, we can declare a personnalized program, instead of Firefox, for example.

For the browser, I have entered this:

"/opt/Program Files/K-Meleon/k-meleon.exe" %u

If I remove %u, K-Meleon is launched without parameter.

%u will be used to say that a parameter can be passed. I don't know how the parameter is passed to the target program, but I expect that in the command line, %u will be replaced by the real parameter.

It seems that it's not made like I thought, and perhaps the source program put it in an env variable, and the target source must read it. I can't clearly explain how it's made, but I need it and I'm really ennoyed.

But perhaps you know the way used by tux programs to pass parameters, and can explain it.

Thanks

A+
JujuLand46
Level 2
Level 2
Posts: 22
Joined: Sat Apr 25, 2009 8:49 am

Post by JujuLand46 »

Nobody can help me and explain the way used by Linux to pass parameters ?

:cry:

A+
JujuLand46
Level 2
Level 2
Posts: 22
Joined: Sat Apr 25, 2009 8:49 am

Post by JujuLand46 »

I have filled a bug in Bugzilla (18463) for the impossibility of wine to receive the parameter from a linux program and to send it as a parameter to a windows program.

The bug has been quickly closed with this answer:
Where did you set that "%U"? Obviously whatever parses it doesn't understand
it. Wine has no such expansion.
In Administration > Prefered programs > Browser, I enter the entire path of the browser and a parameter %U to say allow the possibility to pass a parameter.
Invalid - not Wine bug.
wine ought to pass the parameters
Look at the place that starts Wine.
???

A+
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

JujuLand46 wrote:In Administration > Prefered programs > Browser, I enter the entire path of the browser and a parameter %U to say allow the possibility to pass a parameter.
You still not getting it... You can not enter magical expansion variables. "%U" doesn't mean anything to Wine or any other program.

Where did you pulled that "%U" from? Why are you insisting that it somehow should be expanded to something you think it should?
JujuLand46
Level 2
Level 2
Posts: 22
Joined: Sat Apr 25, 2009 8:49 am

Post by JujuLand46 »

You can not enter magical expansion variables. "%U" doesn't mean anything to Wine or any other program.
When I look for epiphany properties in the Menu tool, the following string is entered :
epiphany-browser %U

So, in the Prefered Program tool, I replace the personnalized string with k-meleon path and %U

Here my last tests:

I have tried to replace, in the ubuntu tool to choose default browser, the k-meleon string with the epiphany string found in the shortcut,

When using it from Linux Thunderbird, it opens epiphany but the %U string isn't evaluated. If I delete %U it just opens epiphany without opening the link.

If I choose epiphany in the list, it opens the links.

From these results, we can say that %U parameter is never developped, even with a linux program. We can say too, that there is a difference between passing a parameter from a shortcut and a program.

So, the way is perhaps to make the windows program to appear in the program list, to make wine able to keep the parameter ? But how ?

In this case, it can't be considered purely as a wine bug, but it will be necessary to help to find a way to add windows programs in this list.
Where did you pulled that "%U" from?
shortcuts in 'Main menu' tool.
Why are you insisting that it somehow should be expanded to something you think it should?
Because this parameter, using probably another way, is used between programs to pass parameters. It's really an important need to make windows program integration in linux something natural and easy to use under Linux.

The way I wanted to use was probably wrong, but the necessity is right.

Hoping that a solution can be found, because it's really important.

How do other windows program to be able to keep parameters passed by linux programs ?

Thanks

A+
User avatar
dimesio
Moderator
Moderator
Posts: 13368
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio »

JujuLand46
Level 2
Level 2
Posts: 22
Joined: Sat Apr 25, 2009 8:49 am

Post by JujuLand46 »

@demesio,

It seems the bug you're talking isn't the problem I describe. There is a few time I have solved it with a program which replace the linux path by a windows path. And, When I click on an html file, it transforms the windows path to a linux one, and K-Meleon opens it correctly.

No, the problem I talk is about the parameter passed by a linux program to a windows program using wine. It seems wine isn't able to receive it and pass it to the windows program.

I think it's an important feature to have a complete integration of a windows program into Linux.

A+
James McKenzie

Problem with parameter from Tux to win

Post by James McKenzie »

JujuLand46 wrote:
@demesio,

It seems the bug you're talking isn't the problem I describe. There is a few time I have solved it with a program which replace the linux path by a windows path. And, When I click on an html file, it transforms the windows path to a linux one, and K-Meleon opens it correctly.

No, the problem I talk is about the parameter passed by a linux program to a windows program using wine. It seems wine isn't able to receive it and pass it to the windows program.

I think it's an important feature to have a complete integration of a windows program into Linux.
Look for this in Bugzilla. If it is not present, file an enhancement bug.

James McKenzie
JujuLand46
Level 2
Level 2
Posts: 22
Joined: Sat Apr 25, 2009 8:49 am

Post by JujuLand46 »

I have read with more attention all the comments of the bug related by demesio, and all the comments are about file association, which isn't my problem.

My problem is about how wine can receive a parameter from a linux program.

I'm using Ubuntu, and in my case it's how to send a parameter from Linux Thunderbird to windows K-Meleon program.

The way Ubuntu knows the program to use (mail client and browser) to open an URL is set by the tool 'Prefered programs'. This is the same parameter that when opening a local html file.

For an HTML file, the command : program %U works correctly. If I delete %U, the program is launched without opening the file. So I think it's obviously necessary to add %U

For an URL passed from Thunderbird to K-Meleon (with the use of wine, obviously), same result, except the parameter isn't passed by Thunderbird, or not received by wine.

I think the way used is different for Nautilus and Thunderbird.

If I replace a personnalized program with a program set in the list, it works.

Maybe when in the list, the parameters aren't read the same way, and wine is also able to read it and then send it to K-Meleon.

I'm really lost in these problems, because I'm a newbee in Linux.

Thank for your advice about the fact to fill a bug for this problem, and how to write it, because I think I don't explain clearly my problem.

A+
James McKenzie

Problem with parameter from Tux to win

Post by James McKenzie »

JujuLand46 wrote:
I have read with more attention all the comments of the bug related by demesio, and all the comments are about file association, which isn't my problem.

My problem is about how wine can receive a parameter from a linux program.

I'm using Ubuntu, and in my case it's how to send a parameter from Linux Thunderbird to windows K-Meleon program.

Ok. We are more knowledgeable about your situation. Please go to the
Mozilla Thunderbird list and ask how to pass parameters from the program
to another Linux program (that is basically what you are doing when you
call wine. It maybe the use of open -a or something like that.

James McKenzie
JujuLand46
Level 2
Level 2
Posts: 22
Joined: Sat Apr 25, 2009 8:49 am

Post by JujuLand46 »

Hum ... it's not me who wants to pass a parameter to another program, it's the program which must do it. It's not a macro or an extension, it's the normal use of a program, and I beg Thunderbird uses the way commonly used by other programs to pass parameters.

When I use a native Linux browser instead of K-Meleon and wine, it works, so I presume the problem is in wine which isn't able to receive the parameter. In fact I just have made a tool to look for the parameter, and I found no parameter passed by wine.

I will try to post on Thunderbird forums, but I don't think to have an answer.

A+
JujuLand46
Level 2
Level 2
Posts: 22
Joined: Sat Apr 25, 2009 8:49 am

Post by JujuLand46 »

Hi,

I have post a message on Mozillazine forum and the answer was to replace %U by %s.

And it works :D

Here is a link for more explanations.

Mozillazine thread
Default Browser

Thanks

A+
Locked