# GtkMozEmbed set\_comp\_path (xulrunner)

**URL:** <https://www.ruby-forum.com/t/gtkmozembed-set-comp-path-xulrunner/74627>\
**Category:** Ruby-Gnome 2\
**Created:** [November 7, 2006, 10:50am UTC](https://www.ruby-forum.com/t/gtkmozembed-set-comp-path-xulrunner/74627 "2006-11-07T10:50:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://www.ruby-forum.com/u/andy)\
**Post date:** [November 7, 2006, 10:50am UTC](https://www.ruby-forum.com/t/gtkmozembed-set-comp-path-xulrunner/74627/1 "2006-11-07T10:50:43Z")

</div>

Hey,

I’ve just compiled ruby-gnome2 (from cvs) against xulrunner’s  
gtkmozembed library, and I’ve discovered that calling  
Gtk::MozEmbed.set\_profile\_path(“/usr/lib/firefox/plugins”) – before the  
constructor – causes some problem that prevents any page being loaded  
by the widget. Even if the path given to set\_comp\_path is an empty  
directory, it still doesn’t work. No errors are thrown.

I tried this on another machine with ruby-gnome2 compiled against  
mozilla-gtkmozembed and that throws a segmentation fault.

P.S. Below is a short snippet that will replicate this problem. Does  
anybody know what the problem is?

Regards,  
Andy.

#!/usr/bin/env ruby

require ‘gtkmozembed’

# Uncomment this line and no page will be loaded…

#Gtk::MozEmbed.set\_comp\_path(“/usr/lib/firefox/plugins”)  
Gtk::MozEmbed.set\_profile\_path(ENV[‘HOME’] + ‘/.mozilla’, ‘RubyGecko’)

win = Gtk::Window.new  
moz = Gtk::MozEmbed.new

win \<\< moz  
win.resize(780, 570)

puts “Trying…”  
moz.load\_url(“[http://www.google.com/](http://www.google.com/)”)

win.signal\_connect(“destroy”) { Gtk.main\_quit }

win.show\_all  
Gtk.main

* * *

Using Tomcat but need to do more? Need to support web services,  
security?  
Get stuff done quickly with pre-integrated technology to make your job  
easier  
Download IBM WebSphere Application Server v.1.0.1 based on Apache  
Geronimo  
[http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642](http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642)

---

<div class="post-metadata">

**Author:** ![andy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://www.ruby-forum.com/u/andy)\
**Post date:** [December 10, 2006, 8:13pm UTC](https://www.ruby-forum.com/t/gtkmozembed-set-comp-path-xulrunner/74627/2 "2006-12-10T20:13:42Z")

</div>

Hi Andy,

Andy wrote:

> Hey,
> 
> I’ve just compiled ruby-gnome2 (from cvs) against xulrunner’s  
> gtkmozembed library, and I’ve discovered that calling  
> Gtk::MozEmbed.set\_profile\_path(“/usr/lib/firefox/plugins”) – before the  
> constructor – causes some problem that prevents any page being loaded  
> by the widget. Even if the path given to set\_comp\_path is an empty  
> directory, it still doesn’t work. No errors are thrown.

The comp\_path is set at compile time following xulrunner settings, i  
think  
you should not call set\_comp\_path unless you have some good reason to do  
so.

Are you sure that using firefox comp\_path on a xulrunner compiled  
gtk\_moz\_embed is safe and can be done?

–  
Mirko M.

* * *

Take Surveys. Earn Cash. Influence the Future of IT  
Join [SourceForge.net](http://SourceForge.net)’s Techsay panel and you’ll get the chance to share  
your  
opinions on IT & business topics through brief surveys - and earn cash  
[http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV](http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV)
