LilyTerm icon indicating copy to clipboard operation
LilyTerm copied to clipboard

BUG - lilyterm should check for firefox existing before trying to open a URL

Open ghost opened this issue 12 years ago • 6 comments

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."

ghost avatar Jun 04 '13 17:06 ghost

I'll check it. Thanks for reporting this bug!

Tetralet avatar Jun 05 '13 10:06 Tetralet

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.

m13253 avatar Jun 05 '13 11:06 m13253

It's not a bad idea, but not everyone intalled the xdg-utils package in his system...

Tetralet avatar Jun 05 '13 12:06 Tetralet

Tetralet wrote:

It's not a bad idea, but not everyone intalled the xdg-utils package in his system...

Yeah it is. Maybe you can try xdg-open first, if failed then fall back to other methods.

m13253 avatar Jun 05 '13 12:06 m13253

I think it will make the program too complicated. I like to keep it simple... (although LilyTerm is complicated enough XD)

Tetralet avatar Jun 05 '13 12:06 Tetralet

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.)

m13253 avatar Jun 05 '13 16:06 m13253