Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-08

ExecuteProcess and URL

13 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Luis R. Hilario B.

Hello everyone,

I am experiencing a problem with the URLs and some characters. E.g.

file:///home/user1/help/file.html#help

It does not work, because the result is:

file:///home/user1/help/file.html%23help

Web browsers say "File not found." (FF, Konqueror, Chromium)

I tried TProcess, ExecuteProcess and UTF8Process, without positive results.

Thanks in advance for any help.

Reply by email

Marco van de Voort
to Luis R. Hilario B.: I am experiencing a problem with the URLs and some characters. E.g.…
Luis R. Hilario B. wrote 11 lines
I am experiencing a problem with the URLs and some characters. E.g. file:///home/user1/help/file.html#help It does not work, because the result is: file:///home/user1/help/file.html%23help Web browsers say "File not found." (FF, Konqueror, Chromium) I tried TProcess, ExecuteProcess and UTF8Process, without positive results.

These functions are for executing files, and don't take URLS (which are a web thing)

Try openurl.

Reply by email

Luis R. Hilario B.
to Marco van de Voort

I'll try your option, but I have many years using without problems:

Process1.CommandLine := '/usr/bin/www-browser'+
' '+GetCurrentDir+PathDelim+HelpFile+Context;

All the problems are after upgrading to Mandriva 2010.1

Thank you.

2010/8/12 Marco van de Voort :

Show quoted text 25 lines
On Wed, Aug 11, 2010 at 10:34:08AM -0400, Luis R. Hilario B. wrote: > I am experiencing a problem with the URLs and some characters. E.g. > > file:///home/user1/help/file.html#help > It does not work, because the result is: > > file:///home/user1/help/file.html%23help > Web browsers say "File not found." (FF, Konqueror, Chromium) > > I tried TProcess, ExecuteProcess and UTF8Process, without positive results. These functions are for executing files, and don't take URLS (which are a web thing) Try openurl. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Michael Van Canneyt
to Luis R. Hilario B.
Luis R. Hilario B. wrote 7 lines
I'll try your option, but I have many years using without problems: Process1.CommandLine := '/usr/bin/www-browser'+ ' '+GetCurrentDir+PathDelim+HelpFile+Context; All the problems are after upgrading to Mandriva 2010.1

Can you send the output of strace -f ? It will tell us what arguments the www-browser program gets.

Most likely, the www-browser script transforms the URL to something else. If this is so, there is little we can do about it.

Michael.

Show quoted text 41 lines
Thank you. 2010/8/12 Marco van de Voort : > On Wed, Aug 11, 2010 at 10:34:08AM -0400, Luis R. Hilario B. wrote: >> I am experiencing a problem with the URLs and some characters. E.g. >> >> file:///home/user1/help/file.html#help > >> It does not work, because the result is: >> >> file:///home/user1/help/file.html%23help > >> Web browsers say "File not found." (FF, Konqueror, Chromium) >> >> I tried TProcess, ExecuteProcess and UTF8Process, without positive results. > > These functions are for executing files, and don't take URLS (which are a > web thing) > > Try openurl. > > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- http://luisdigital.com -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Mark Morgan Lloyd
to Luis R. Hilario B.: I'll try your option, but I have many years using without problems: Process1.CommandLine…
Luis R. Hilario B. wrote
I'll try your option, but I have many years using without problems: Process1.CommandLine := '/usr/bin/www-browser'+ ' '+GetCurrentDir+PathDelim+HelpFile+Context;

No doubt, but I believe that most distreaux now support xdg-open which should be used rather than hardcoding the name of a browser binary.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Luis R. Hilario B.
to Michael Van Canneyt: Can you send the output of strace -f ? It will tell us what arguments the www-browser…

The same problem with OpenURL.

"Can you send the output of strace -f ?"

I do not know exactly what you mean, but I have this output in the console:

<unknown program name>(11573)/ ClientApp::doIt: Creating ClientApp kioclient(11573) ClientApp::kde_open:
KUrl("file:///home/luis/Documentos/Proyectos/klinton/Klinton_fuentes/klintonl/AYUDA/AYUDA.HTML%233.1._La_ventana_de_configuraciones")

The web browser can not find the file with the characters "%23" which is "#", even if well interpreted in the URL, such as Konqueror.

I manually execute the order, and says the same, but the browser open the page (the only difference is the symbol):
/usr/bin/www-browser
file:///home/luis/Documentos/Proyectos/klinton/Klinton_fuentes/klintonl/AYUDA/AYUDA.HTML#3.1._La_ventana_de_configuraciones <unknown program name>(12444)/ ClientApp::doIt: Creating ClientApp kioclient(12444) ClientApp::kde_open:
KUrl("file:///home/luis/Documentos/Proyectos/klinton/Klinton_fuentes/klintonl/AYUDA/AYUDA.HTML#3.1._La_ventana_de_configuraciones")

2010/8/12 Michael Van Canneyt :

Show quoted text 71 lines
On Thu, 12 Aug 2010, Luis R. Hilario B. wrote: > I'll try your option, but I have many years using without problems: > > Process1.CommandLine := '/usr/bin/www-browser'+ > ' '+GetCurrentDir+PathDelim+HelpFile+Context; > > > All the problems are after upgrading to Mandriva 2010.1 Can you send the output of strace -f ? It will tell us what arguments the www-browser program gets. Most likely, the www-browser script transforms the URL to something else. If this is so, there is little we can do about it. Michael. > > Thank you. > > 2010/8/12 Marco van de Voort : >> >> On Wed, Aug 11, 2010 at 10:34:08AM -0400, Luis R. Hilario B. wrote: >>> >>> I am experiencing a problem with the URLs and some characters. E.g. >>> >>> file:///home/user1/help/file.html#help >> >>> It does not work, because the result is: >>> >>> file:///home/user1/help/file.html%23help >> >>> Web browsers say "File not found." (FF, Konqueror, Chromium) >>> >>> I tried TProcess, ExecuteProcess and UTF8Process, without positive >>> results. >> >> These functions are for executing files, and don't take URLS (which are a >> web thing) >> >> Try openurl. >> >> >> -- >> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >> > > > > -- > http://luisdigital.com > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Luis R. Hilario B.
to Mark Morgan Lloyd: No doubt, but I believe that most distreaux now support xdg-open which should be used…

I use the environment variable "BROWSER".

2010/8/12 Mark Morgan Lloyd :

Show quoted text 22 lines
Luis R. Hilario B. wrote: > > I'll try your option, but I have many years using without problems: > > Process1.CommandLine := '/usr/bin/www-browser'+ > ' '+GetCurrentDir+PathDelim+HelpFile+Context; No doubt, but I believe that most distreaux now support xdg-open which should be used rather than hardcoding the name of a browser binary. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Luis R. Hilario B.
to Michael Van Canneyt: Can you send the output of strace -f ? It will tell us what arguments the www-browser…

Attached.

2010/8/12 Michael Van Canneyt :

Show quoted text 71 lines
On Thu, 12 Aug 2010, Luis R. Hilario B. wrote: > I'll try your option, but I have many years using without problems: > > Process1.CommandLine := '/usr/bin/www-browser'+ > ' '+GetCurrentDir+PathDelim+HelpFile+Context; > > > All the problems are after upgrading to Mandriva 2010.1 Can you send the output of strace -f ? It will tell us what arguments the www-browser program gets. Most likely, the www-browser script transforms the URL to something else. If this is so, there is little we can do about it. Michael. > > Thank you. > > 2010/8/12 Marco van de Voort : >> >> On Wed, Aug 11, 2010 at 10:34:08AM -0400, Luis R. Hilario B. wrote: >>> >>> I am experiencing a problem with the URLs and some characters. E.g. >>> >>> file:///home/user1/help/file.html#help >> >>> It does not work, because the result is: >>> >>> file:///home/user1/help/file.html%23help >> >>> Web browsers say "File not found." (FF, Konqueror, Chromium) >>> >>> I tried TProcess, ExecuteProcess and UTF8Process, without positive >>> results. >> >> These functions are for executing files, and don't take URLS (which are a >> web thing) >> >> Try openurl. >> >> >> -- >> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >> > > > > -- > http://luisdigital.com > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
http://luisdigital.com -------------- next part -------------- A non-text attachment was scrubbed... Name: salida.txt.tar.gz Type: application/x-gzip Size: 54067 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100812/fd1b27a2/attachment-0001.bin>

Reply by email

Michael Van Canneyt
to Luis R. Hilario B.

Try making a shorter command-line:

26519 execve("/usr/lib/chromium-browser/chrome", ["/usr/lib/chromium-browser/chrome", "/home/luis/Documentos/Proyectos/"...], [/* 82 vars */] <unfinished ...>

As you can see, we can't see what the actual URL is it gets. But it definitely doesn't start with file:///

Michael.

Luis R. Hilario B. wrote 80 lines
Attached. 2010/8/12 Michael Van Canneyt : > > > On Thu, 12 Aug 2010, Luis R. Hilario B. wrote: > >> I'll try your option, but I have many years using without problems: >> >> Process1.CommandLine := '/usr/bin/www-browser'+ >> ' '+GetCurrentDir+PathDelim+HelpFile+Context; >> >> >> All the problems are after upgrading to Mandriva 2010.1 > > Can you send the output of strace -f ? It will tell us what arguments the > www-browser program gets. > > Most likely, the www-browser script transforms the URL to something else. > If this is so, there is little we can do about it. > > Michael. > >> >> Thank you. >> >> 2010/8/12 Marco van de Voort : >>> >>> On Wed, Aug 11, 2010 at 10:34:08AM -0400, Luis R. Hilario B. wrote: >>>> >>>> I am experiencing a problem with the URLs and some characters. E.g. >>>> >>>> file:///home/user1/help/file.html#help >>> >>>> It does not work, because the result is: >>>> >>>> file:///home/user1/help/file.html%23help >>> >>>> Web browsers say "File not found." (FF, Konqueror, Chromium) >>>> >>>> I tried TProcess, ExecuteProcess and UTF8Process, without positive >>>> results. >>> >>> These functions are for executing files, and don't take URLS (which are a >>> web thing) >>> >>> Try openurl. >>> >>> >>> -- >>> _______________________________________________ >>> Lazarus mailing list >>> >>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >>> >> >> >> >> -- >> http://luisdigital.com >> >> -- >> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >> > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- http://luisdigital.com

Reply by email

Luis R. Hilario B.
to Michael Van Canneyt: Try making a shorter command-line: 26519 execve("/usr/lib/chromium-browser/chrome",…
But it definitely doesn't start with file:///

That was the problem. I wonder how it worked for many years.

Thanks for all your help.

2010/8/12 Michael Van Canneyt :

Show quoted text 105 lines
Try making a shorter command-line: 26519 execve("/usr/lib/chromium-browser/chrome", ["/usr/lib/chromium-browser/chrome", "/home/luis/Documentos/Proyectos/"...], [/* 82 vars */] <unfinished ...> As you can see, we can't see what the actual URL is it gets. But it definitely doesn't start with file:/// Michael. On Thu, 12 Aug 2010, Luis R. Hilario B. wrote: > Attached. > > 2010/8/12 Michael Van Canneyt : >> >> >> On Thu, 12 Aug 2010, Luis R. Hilario B. wrote: >> >>> I'll try your option, but I have many years using without problems: >>> >>> Process1.CommandLine := '/usr/bin/www-browser'+ >>> ' '+GetCurrentDir+PathDelim+HelpFile+Context; >>> >>> >>> All the problems are after upgrading to Mandriva 2010.1 >> >> Can you send the output of strace -f ? It will tell us what arguments the >> www-browser program gets. >> >> Most likely, the www-browser script transforms the URL to something else. >> If this is so, there is little we can do about it. >> >> Michael. >> >>> >>> Thank you. >>> >>> 2010/8/12 Marco van de Voort : >>>> >>>> On Wed, Aug 11, 2010 at 10:34:08AM -0400, Luis R. Hilario B. wrote: >>>>> >>>>> I am experiencing a problem with the URLs and some characters. E.g. >>>>> >>>>> file:///home/user1/help/file.html#help >>>> >>>>> It does not work, because the result is: >>>>> >>>>> file:///home/user1/help/file.html%23help >>>> >>>>> Web browsers say "File not found." (FF, Konqueror, Chromium) >>>>> >>>>> I tried TProcess, ExecuteProcess and UTF8Process, without positive >>>>> results. >>>> >>>> These functions are for executing files, and don't take URLS (which are >>>> a >>>> web thing) >>>> >>>> Try openurl. >>>> >>>> >>>> -- >>>> _______________________________________________ >>>> Lazarus mailing list >>>> >>>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >>>> >>> >>> >>> >>> -- >>> http://luisdigital.com >>> >>> -- >>> _______________________________________________ >>> Lazarus mailing list >>> >>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >>> >> >> -- >> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >> > > > > -- > http://luisdigital.com > -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email