Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to open a url using xdg-open but the terminal says,

you don't have javascript enabled

So how do I enable the javascript?

share|improve this question
    
You may, if you wish, post a copy/paste of the actual text in the terminal window. This facilitates readability! :) –  SirCharlo Jul 19 '12 at 18:12
    
oh k, will keep that in mind next time. Thanks –  Sam007 Jul 19 '12 at 18:14
add comment

1 Answer 1

up vote 1 down vote accepted

That message is not from xdg-open. It is from whatever application was used to open the URL. As you are using it over SSH, it isn't opening a graphical web browser, and instead appears to be opening the URL in a console based web browser, which either does not support JavaScript or has the feature disabled.

You will need to use a browser which supports JavaScript, or enable the feature if it is disabled.

share|improve this answer
    
Yup that is my question, how do I enable it? –  Sam007 Jul 19 '12 at 17:33
    
I don't know. What browser is it running? As far as I know, lynx supports javascript; but it may not support everything you need. Why aren't you just loading the URL in Safari (it looks like you're on a Mac). If it's not directly accessible, you can tunnel it through ssh, and access it via localhost through the tunnel. –  dobey Jul 19 '12 at 19:03
    
i am opening the url in the terminal by ssh my into the ubuntu server. When i execute xdg-open <url> on my local ubuntu, the terminal opens the webpage but not sure why it is giving this issue in the server. I am not using any browser in the my local or server Ubuntu, only xdg-open, but it works on my local but gives error on my server which is weird. –  Sam007 Jul 19 '12 at 19:17
    
All xdg-open does is open a file or url with the appropriate application. When running locally in a graphical environment on Ubuntu, it opens firefox by default (or chrome or such if you've changed your default browser). If you run it under an SSH session on a remote machine, it still opens in an application. In this case, it is using a console based browser, though I am not sure exactly which browser it is, from the screenshot. But xdg-open itself knows nothing about javascript or enabling it in the browser that gets run. –  dobey Jul 19 '12 at 22:13
    
oh k so i will have to setup a browser which will be defined as a default browser and then xdg-open will open it in that browser. I was under the impression that this command opened the url by itself. ok thanks. –  Sam007 Jul 19 '12 at 22:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.