BUG - lilyterm should check for firefox existing before trying to open a URL
Hi,
When you have an URL in LilyTerm, for example:
http://lilyterm.luna.com.tw/file/lilyterm-0.9.9.4.tar.gz
You can click this link. Then normally firefox will open this URL.
However, this assumes that firefox is installed, in other words, a firefox binary exists in $PATH.
For me this was not the case. I then did a symlink from my real location of firefox into /usr/bin/firefox and then lilyterm can open it.
This is really a tiny bug, not sure if it is worth fixing, but right now, if firefox is not in $PATH it will tell you that there was an error opening firefox.
Two suggestions to fix this bug:
- Expand the error message, by something helpful, like: "Make sure that firefox is in $PATH".
- Or simply do not show that an error might happen, simply state something like "Sorry, you do not seem to have firefox installed or we could not find it."
I'll check it. Thanks for reporting this bug!
I suggest using xdg-open http://xxxxxx to open URL instead of firefox http://xxxxxx. Because xdg-open will automatically select the default browser you have set in DE settings.
It's not a bad idea, but not everyone intalled the xdg-utils package in his system...
Tetralet wrote:
It's not a bad idea, but not everyone intalled the
xdg-utilspackage in his system...
Yeah it is. Maybe you can try xdg-open first, if failed then fall back to other methods.
I think it will make the program too complicated. I like to keep it simple... (although LilyTerm is complicated enough XD)
Perhaps it is not having something to do with the code. Just change the default conf file:
# The web browser using for http(s)://
web_browser = xdg-open
web_method = 1
web_VTE_CJK_WIDTH = 0
web_environ =
web_locale =
# The ftp client using for ftp(s)://
ftp_client = xdg-open
ftp_method = 1
ftp_VTE_CJK_WIDTH = 0
ftp_environ =
ftp_locale =
# The file manager using for file:// and [Open current directory with file manager]
file_manager = xdg-open
file_method = 1
file_VTE_CJK_WIDTH = 0
file_environ =
file_locale =
# The email client using for user@host
email_client = xdg-open
email_method = 1
email_VTE_CJK_WIDTH = 0
email_environ =
email_locale =
If the user does not have xdg-utils installed, he/she can edit the conf file, right?
(BTW, If you are interested in, you may want to have a look at my conf file which is good for those who have just switched from GNOME terminal.)