简体   繁体   中英

How to set up internal browser for Aptana on Linux

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

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

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.

您需要从mozilla.org下载并安装XULRunner,并将MOZILLA_FIVE_HOME指向该目录。

安装xulrunner后,你需要设置:

MOZILLA_FIVE_HOME=/usr/lib/xulrunner

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM