Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ghost opened this issue Jun 4, 2013 · 6 comments

Comments

@ghost
Copy link

ghost commented Jun 4, 2013

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."
@Tetralet
Copy link
Owner

Tetralet commented Jun 5, 2013

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

@m13253
Copy link

m13253 commented Jun 5, 2013

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.

@Tetralet
Copy link
Owner

Tetralet commented Jun 5, 2013

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

@m13253
Copy link

m13253 commented Jun 5, 2013

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.

@Tetralet
Copy link
Owner

Tetralet commented Jun 5, 2013

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

@m13253
Copy link

m13253 commented Jun 5, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants