[Solved] I want links to open in a program, not a browser
[Solved] I want links to open in a program, not a browser
In an openoffice document, when I create a hyperlink to a PDF document and control-click on the link, the linked document opens in a browser (Google Chrome as it happens, even though Firefox is my system default browser).
What I want to happen is that the PDF document be opened by my system's default program for opening PDF files (which happens to be evince, others will have acroread). I don't want it opened via any browser.
Is there any way I can change this?
I have looked at this thread which partly addresses my issue but I am using OOo on Linux (see my signature) so disabling ActiveX Control is not an option. Also, I am writing an openoffice document, not an html page.
Some more background: I am writing a presentation in OOo Impress and want to include a quick way to open and view related documents to which I am including links. Some of those linked documents are PDFs. For links to openoffice documents, they open in the relevant openoffice application, but .pdf files and also .txt files open in Google Chrome which is cumbersome. I cannot understand how or why Chrome is somehow associated with these file types when they are accessed via a link in an office document. I have found the same problem occurs in OOo Writer.
Any comments or suggestions most appreciated. Cheers, Pat.
What I want to happen is that the PDF document be opened by my system's default program for opening PDF files (which happens to be evince, others will have acroread). I don't want it opened via any browser.
Is there any way I can change this?
I have looked at this thread which partly addresses my issue but I am using OOo on Linux (see my signature) so disabling ActiveX Control is not an option. Also, I am writing an openoffice document, not an html page.
Some more background: I am writing a presentation in OOo Impress and want to include a quick way to open and view related documents to which I am including links. Some of those linked documents are PDFs. For links to openoffice documents, they open in the relevant openoffice application, but .pdf files and also .txt files open in Google Chrome which is cumbersome. I cannot understand how or why Chrome is somehow associated with these file types when they are accessed via a link in an office document. I have found the same problem occurs in OOo Writer.
Any comments or suggestions most appreciated. Cheers, Pat.
Last edited by patb on Thu Mar 22, 2012 8:46 am, edited 2 times in total.
Libreoffice Version 4.0.4.2 on Ubuntu Linux 12.04
"It's never too late to have a happy childhood" - bumper sticker, Zimbabwe.
"It's never too late to have a happy childhood" - bumper sticker, Zimbabwe.
Re: I want links to open in a program, not a browser
I cannot reproduce your problem. On my system, if I click on a link to a pdf file on a Writer document the file is opened on Okular. But I do not have Chrome installed... it is possible the browser did something to your file associations.
There are two types of people: those who believe that there are two types of people and those who do not.
openSUSE Leap with KDE Plasma / LibreOffice
openSUSE Leap with KDE Plasma / LibreOffice
Re: I want links to open in a program, not a browser
Thanks for testing, RGB. I had checked that possibility. On my system Evince is the default program associated with PDF files - if I open them from a file manager like Nautilus or Thunar, they open in Evince. But in an openoffice document, if I click on a link to them, they open in Chrome, even if Chrome was not previously running. Thus, this problem seems to be that Openoffice sets its own file associations. What is sending a message to Chrome that it should start up and open the PDF document? I do not know how to configure or disable that file association.
To answer your question though, Chrome preferences tell me that "Google Chrome cannot determine or set the default browser." Firefox tells me that it is already the default browser.
Problem not yet solved. Any suggestions would be welcome. Cheers, Pat.
To answer your question though, Chrome preferences tell me that "Google Chrome cannot determine or set the default browser." Firefox tells me that it is already the default browser.
Problem not yet solved. Any suggestions would be welcome. Cheers, Pat.
Libreoffice Version 4.0.4.2 on Ubuntu Linux 12.04
"It's never too late to have a happy childhood" - bumper sticker, Zimbabwe.
"It's never too late to have a happy childhood" - bumper sticker, Zimbabwe.
Re: I want links to open in a program, not a browser
When you insert the Hyperlink, have you selected Document from the four icons on the left? The default is to insert an Internet hyperlink to be opened by a browser, or by the helper application defined within the browser's preferences.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
Re: I want links to open in a program, not a browser
Yes thanks Rory. I have selected the "Document" button not "Internet" and then I have navigated to the target document. Cheers, Pat.
Libreoffice Version 4.0.4.2 on Ubuntu Linux 12.04
"It's never too late to have a happy childhood" - bumper sticker, Zimbabwe.
"It's never too late to have a happy childhood" - bumper sticker, Zimbabwe.
Re: I want links to open in a program, not a browser
Well there's always more than one way to skin a cat as they say. I tried experimenting by uninstalling Google Chrome and hey presto, the links to PDFs then opened in... Opera! So I uninstalled that and hey presto, they opened in... SeaMonkey. (I have a lot of browsers for web site testing purposes). So I gave up on that line of enquiry.
But during the install of Chrome, there was reference to a file /usr/bin/x-www-browser which (on my system) is a symlink to /etc/alternatives/x-www-browser which is itself a symlink to /usr/bin/google-chrome. So I redirected the second link to /usr/bin/gnome-open which, for a Gnome desktop environment, is a program which will open any file using whatever is the system default program for that file type. That worked. Now, when I click on the link in an openoffice document, it opens in the system default program. [Edited Mar 24, 2012. Please note that I am not recommending this approach except for those comfortable with playing round with such files. It could lead to unexpected results in other programs. Also, I actually backed up the original link before redirecting it.]
I will mark this thread solved but with some trepidation. I suspect my little hack will fall apart next time I update a browser or something else - my edited link will probably be overwritten as the updated program is installed.
Problem kind of solved. I would still welcome further suggestions or comments on how to configure or disable openoffice's file associations for hyperlinks.
Cheers, Pat.
But during the install of Chrome, there was reference to a file /usr/bin/x-www-browser which (on my system) is a symlink to /etc/alternatives/x-www-browser which is itself a symlink to /usr/bin/google-chrome. So I redirected the second link to /usr/bin/gnome-open which, for a Gnome desktop environment, is a program which will open any file using whatever is the system default program for that file type. That worked. Now, when I click on the link in an openoffice document, it opens in the system default program. [Edited Mar 24, 2012. Please note that I am not recommending this approach except for those comfortable with playing round with such files. It could lead to unexpected results in other programs. Also, I actually backed up the original link before redirecting it.]
I will mark this thread solved but with some trepidation. I suspect my little hack will fall apart next time I update a browser or something else - my edited link will probably be overwritten as the updated program is installed.
Problem kind of solved. I would still welcome further suggestions or comments on how to configure or disable openoffice's file associations for hyperlinks.
Cheers, Pat.
Last edited by patb on Sat Mar 24, 2012 6:49 pm, edited 1 time in total.
Libreoffice Version 4.0.4.2 on Ubuntu Linux 12.04
"It's never too late to have a happy childhood" - bumper sticker, Zimbabwe.
"It's never too late to have a happy childhood" - bumper sticker, Zimbabwe.
- kingfisher
- Volunteer
- Posts: 2127
- Joined: Tue Nov 20, 2007 10:53 am
Re: I want links to open in a program, not a browser
I think that's a mistake. You have interfered with a system setting relating to the use of a web browser.
If you use Insert > Hyperlink, select the third option ('document') in the left panel and then the path to the file. The file will be opened by the default application for the file type. You have probably been using the first option which relates to the internet.
If you use the HYPERLINK function, insert the path to the file, e.g. =HYPERLINK("file:///data/sets/office/work/DataLog.ods";"Datalog")
If you use Insert > Hyperlink, select the third option ('document') in the left panel and then the path to the file. The file will be opened by the default application for the file type. You have probably been using the first option which relates to the internet.
If you use the HYPERLINK function, insert the path to the file, e.g. =HYPERLINK("file:///data/sets/office/work/DataLog.ods";"Datalog")
Apache OpenOffice 4.1.12 on Linux
Re: I want links to open in a program, not a browser
Thanks for the input, Kingfisher.
For me, the question still remains how to configure or disable openoffice's file associations for hyperlinks.
Cheers, Pat.
I've certainly reconfigured a system setting but given the name of the link "x-www-browser", and given the purpose of the directory "/etc/alternatives/" I suspect it will do no harm to redirect that link to gnome-open. Html files will now (on my system) open in Firefox rather than Chrome, and other file types which would have been directed to Chrome will be opened using my system default application, which is what I want.kingfisher wrote:I think that's a mistake. You have interfered with a system setting...
No, as mentioned above, I have been using the "Document" button. I have also tried five forward slashes in the path instead of three, as discussed in the link referenced above, to no avail.kingfisher wrote:If you use Insert > Hyperlink, select the third option ('document') in the left panel and then the path to the file. The file will be opened by the default application for the file type. You have probably been using the first option which relates to the internet.
For me, the question still remains how to configure or disable openoffice's file associations for hyperlinks.
Cheers, Pat.
Libreoffice Version 4.0.4.2 on Ubuntu Linux 12.04
"It's never too late to have a happy childhood" - bumper sticker, Zimbabwe.
"It's never too late to have a happy childhood" - bumper sticker, Zimbabwe.
- kingfisher
- Volunteer
- Posts: 2127
- Joined: Tue Nov 20, 2007 10:53 am
Re: [Solved] I want links to open in a program, not a browse
Sorry, I didn't realise you had selected 'document'. AFAIK, OO gets file associations from the system. I have had no problem. When all else fails, the default solution is to rename your profile folder. You could try that. Make sure there are no OO or 'soffice' processes running beforehand.
Apache OpenOffice 4.1.12 on Linux
Re: [Solved] I want links to open in a program, not a browse
Thanks for the suggestions, Kingfisher.
RGB is running OO on openSUSE and cannot reproduce the problem, you are running it on PCLinuxOS and also cannot reproduce the problem. I am running it on Ubuntu 10.04 and my links to .pdf files open in Chrome.
Can I ask you to please post whether on your system you have any of the following four symlinks and where they point to:
/usr/bin/www-browser
/etc/alternatives/www-browser
/usr/bin/x-www-browser
/etc/alternatives/x-www-browser
I understand the directory /etc/alternatives/ may be peculiar to debian linux. Perhaps other distributions use a different approach.
Thanks in advance. Cheers, Pat.
Good suggestion. I tried that but it did not make any difference.kingfisher wrote:When all else fails, the default solution is to rename your profile folder.
That's what I would have thought too. But the core of the problem seems to be that it doesn't. It seems to use some other way of setting file associations for links, at least on my system.kingfisher wrote:AFAIK, OO gets file associations from the system.
RGB is running OO on openSUSE and cannot reproduce the problem, you are running it on PCLinuxOS and also cannot reproduce the problem. I am running it on Ubuntu 10.04 and my links to .pdf files open in Chrome.
Can I ask you to please post whether on your system you have any of the following four symlinks and where they point to:
/usr/bin/www-browser
/etc/alternatives/www-browser
/usr/bin/x-www-browser
/etc/alternatives/x-www-browser
I understand the directory /etc/alternatives/ may be peculiar to debian linux. Perhaps other distributions use a different approach.
Thanks in advance. Cheers, Pat.
Libreoffice Version 4.0.4.2 on Ubuntu Linux 12.04
"It's never too late to have a happy childhood" - bumper sticker, Zimbabwe.
"It's never too late to have a happy childhood" - bumper sticker, Zimbabwe.
Re: [Solved] I want links to open in a program, not a browse
On Ubuntu 11.04 (natty)patb wrote:Can I ask you to please post whether on your system you have any of the following four symlinks and where they point to:
1) /usr/bin/www-browser
2) /etc/alternatives/www-browser
3) /usr/bin/x-www-browser
4) /etc/alternatives/x-www-browser
1) does not exist
2) does not exist
3) does not exist
4) links to /usr/bin/epihany-browser
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
- kingfisher
- Volunteer
- Posts: 2127
- Joined: Tue Nov 20, 2007 10:53 am
Re: [Solved] I want links to open in a program, not a browse
The directory /etc/alternatives/ is on my system but contains neither of the files/symlinks you mention. There is no file/symlink x-www-browser on my system. The file /usr/bin/www-browser is an executable script, not a symlink.
I don't remember how to set file associations on a Gnome desktop. On KDE there is a configuration tool and the file manager can also be used. I found a tip on an Arch page. I imagine you have tried the Ubuntu forums. This and this are among Ubuntu links which turned up in a search.
I think you are on the wrong track. I searched in the program folder and found 5 files containing the word 'browser':
file:///opt/openoffice.org3/share/extensions/dict-en/en_GB.dic
file:///opt/openoffice.org3/share/extensions/dict-en/en_CA.dic
file:///opt/openoffice.org3/share/extensions/dict-en/th_en_US_v2.idx
file:///opt/openoffice.org3/share/extensions/dict-en/en_US.dic
file:///opt/openoffice.org3/share/extensions/dict-en/th_en_US_v2.dat
I don't remember how to set file associations on a Gnome desktop. On KDE there is a configuration tool and the file manager can also be used. I found a tip on an Arch page. I imagine you have tried the Ubuntu forums. This and this are among Ubuntu links which turned up in a search.
I think you are on the wrong track. I searched in the program folder and found 5 files containing the word 'browser':
file:///opt/openoffice.org3/share/extensions/dict-en/en_GB.dic
file:///opt/openoffice.org3/share/extensions/dict-en/en_CA.dic
file:///opt/openoffice.org3/share/extensions/dict-en/th_en_US_v2.idx
file:///opt/openoffice.org3/share/extensions/dict-en/en_US.dic
file:///opt/openoffice.org3/share/extensions/dict-en/th_en_US_v2.dat
Apache OpenOffice 4.1.12 on Linux
Re: [Solved] I want links to open in a program, not a browse
I think you need to use the desktop settings application to change the config, but if you want to poke around in the files, you might try:
~/.config
~/.local/share
it might be easier to start out by creating a new user and trying your links while logged in as that user, with a fresh set of desktop and OOo settings. If it works there, then you know that it's something in your usual session environment that's causing the problem.
I keep a separate login just for that purpose. I regularly wipe it clean and start over, just so I know it has fresh settings that should not be causing any surprises.
~/.config
~/.local/share
it might be easier to start out by creating a new user and trying your links while logged in as that user, with a fresh set of desktop and OOo settings. If it works there, then you know that it's something in your usual session environment that's causing the problem.
I keep a separate login just for that purpose. I regularly wipe it clean and start over, just so I know it has fresh settings that should not be causing any surprises.
AOO4/LO5 • Linux • Fedora 23
Re: [Solved] I want links to open in a program, not a browse
Thanks Rory, Kingfisher and Acknak for the responses and tips.
Setting default file associations in a Gnome Desktop is easy using file managers like Nautilus or Thunar. That seems to have no effect on my problem.
I'm very grateful for all the feedback. For me at least, this is not a big problem. For the moment, I'll stick with "my little hack" as I called it, although I'm not recommending it except for those comfortable with playing around with such files. If I find any problems with my hack, or a more conventional solution to the problem, I'll post here.
Cheers, Pat.
Setting default file associations in a Gnome Desktop is easy using file managers like Nautilus or Thunar. That seems to have no effect on my problem.
Thanks for that suggestion. I didn't find anything interesting.acknak wrote:I think you need to use the desktop settings application to change the config, but if you want to poke around in the files, you might try:
~/.config
~/.local/share
I did that - wiped the slate clean - and the links to PDFs still opened in Chrome.acknak wrote:it might be easier to start out by creating a new user ...
I think you're right. I may somehow be following the wrong line of questioning.kingfisher wrote:I think you are on the wrong track ...
I'm very grateful for all the feedback. For me at least, this is not a big problem. For the moment, I'll stick with "my little hack" as I called it, although I'm not recommending it except for those comfortable with playing around with such files. If I find any problems with my hack, or a more conventional solution to the problem, I'll post here.
Cheers, Pat.
Libreoffice Version 4.0.4.2 on Ubuntu Linux 12.04
"It's never too late to have a happy childhood" - bumper sticker, Zimbabwe.
"It's never too late to have a happy childhood" - bumper sticker, Zimbabwe.
Re: [Solved] I want links to open in a program, not a browse
I have a little more insight into this problem.
I've been having difficulties with this for quite some time now, as seen in: http://forum.openoffice.org/en/forum/vi ... 11&t=56725
I am now running OO on two different computers. Both systems use Debian Squeeze. Both systems have Firefox as their sole browsers.
On one computer, I use the Debian amd64 repos. On the other, I use the Debian i386 repos. Both machines are using xfce for the desktop environment.
Now, here's the interesting point: The i386 machine displays the same problems that the OP is having (exept it opens the files in Firefox). The amd64 machine does NOT display this problem.
Thoughts?
I've been having difficulties with this for quite some time now, as seen in: http://forum.openoffice.org/en/forum/vi ... 11&t=56725
I am now running OO on two different computers. Both systems use Debian Squeeze. Both systems have Firefox as their sole browsers.
On one computer, I use the Debian amd64 repos. On the other, I use the Debian i386 repos. Both machines are using xfce for the desktop environment.
Now, here's the interesting point: The i386 machine displays the same problems that the OP is having (exept it opens the files in Firefox). The amd64 machine does NOT display this problem.
Thoughts?
LibreOffice 5.2.7.2
Debian 9 (Stretch) (Linux)
Debian 9 (Stretch) (Linux)
Re: [Solved] I want links to open in a program, not a browse
I tried the OP's little hack, except I linked "/etc/alternatives/x-www-browser" to "/usr/bin/exo-open" (since I'm rocking xfce).
It works....for now.
I'm just waiting for something to explode......
It works....for now.
I'm just waiting for something to explode......
LibreOffice 5.2.7.2
Debian 9 (Stretch) (Linux)
Debian 9 (Stretch) (Linux)
Re: [Solved] I want links to open in a program, not a browse
I made a small tweak to the hack, playing the odds.....
I linked "usr/bin/x-www-browser" to "/usr/bin/exo-open" and I put the "/etc/alternatives/x-www-browser" link back to "/usr/bin/iceweasel" (which is the way it was originally).
The OpenOffice embedded links are still opening in the proper applications, vice the browser.
Thoughts?
I linked "usr/bin/x-www-browser" to "/usr/bin/exo-open" and I put the "/etc/alternatives/x-www-browser" link back to "/usr/bin/iceweasel" (which is the way it was originally).
The OpenOffice embedded links are still opening in the proper applications, vice the browser.
Thoughts?
LibreOffice 5.2.7.2
Debian 9 (Stretch) (Linux)
Debian 9 (Stretch) (Linux)