How to set up internal browser for Aptana on Linux

删除回忆录丶 提交于 2019-12-19 10:17:01

问题


I downloaded the Aptana_Studio_Setup_Linux.zip package, unpacked it and run ./AptanaStudio. It starts fine, but reports one problem:

The embedded browser widget for this editor cannot be created. It is either not available for your operating system or the system needs to be configured in order to support embedded browser.

After that, it opens the "Welcome page" in external browser (Mozilla), but when I click on a link to install PHP support it does not open the destination target. No wonder, because the link is in format: com.aptana....etc. I.e. written in reverse. I assume such links only work with internal browser.

If I look into details, I get these error messages:

No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]
org.eclipse.swt.SWTError: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]
at org.eclipse.swt.SWT.error(SWT.java:3400)
at org.eclipse.swt.browser.Browser.<init>(Browser.java:138)
at org.eclipse.ui.internal.browser.BrowserViewer.<init>(BrowserViewer.java:224)
at org.eclipse.ui.internal.browser.WebBrowserEditor.createPartControl(WebBrowserEditor.java:78)
at com.aptana.ide.intro.browser.CoreBrowserEditor.createPartControl(CoreBrowserEditor.java:138)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:596)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:372)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:290)

etc. I hope this is enough.

I tried to set the env. variable:

export MOZILLA_FIVE_HOME=/usr/lib/mozilla/

However, it only changes the error message to:

No more handles [NS_InitEmbedding /usr/lib/mozilla/ error -2147221164]
org.eclipse.swt.SWTError: No more handles [NS_InitEmbedding /usr/lib/mozilla/ error -2147221164]
at org.eclipse.swt.SWT.error(SWT.java:3400)
at org.eclipse.swt.browser.Browser.<init>(Browser.java:225)
at org.eclipse.ui.internal.browser.BrowserViewer.<init>(BrowserViewer.java:224)
at org.eclipse.ui.internal.browser.WebBrowserEditor.createPartControl(WebBrowserEditor.java:78)
at com.aptana.ide.intro.browser.CoreBrowserEditor.createPartControl(CoreBrowserEditor.java:138)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:596)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:372)

For start I really want to have PHP working, but I'd also like to fix the whole internal browser issue in the end.


回答1:


I happened to come across this: https://groups.google.com/forum/#!msg/xmind/5SjPTy0MmEo/PbPi0OGzqPwJ

Which advised running:

sudo apt-get install libwebkitgtk-1.0-0

should solve the problem. It worked for me so I figured I'd share here.

FWIW, I ended up here while trying to get the Play! Framework working on Ubuntu 13.04. using the Scala-IDE. So far, everything seems to be working...




回答2:


You need to download and install XULRunner from mozilla.org, and point MOZILLA_FIVE_HOME to that directory.




回答3:


After installing xulrunner you need to set this:

MOZILLA_FIVE_HOME=/usr/lib/xulrunner



回答4:


You will have to install XULRunner then edit the eclipse.ini.

After installing xulrunner, adding the following line in the eclipse.ini solved the problem of "No more handles" issue.

-Dorg.eclipse.swt.browser.XULRunnerPath=/opt/eclipse/xulrunner/

I am using eclipse 3.63 and ubuntu 12.04.




回答5:


Edit: getting internal browser to work is NOT required in order to get PHP support in Aptana. Just install PHP support from Help, Software updates menu.




回答6:


If this is the problem I think you're having, just installing Firefox 2 (alongside FF3) should fix the issue. It happens because Aptana can only use FF2 at the moment. Hopefully they'll fix this soon.

If you're on Ubuntu, it's really just a case of:

sudo apt-get install firefox-2

Naturally, the process will vary on different distributions.



来源:https://stackoverflow.com/questions/214272/how-to-set-up-internal-browser-for-aptana-on-linux

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!