I would not hold your hopes up, but there is a way if Nautilus supports the xid option. Type "nautilus --help" and see if there is an option to run it in a socketid. Look for words like: xid, socketid, etc.

Even IF nautilus supports the option, it may not work to your satisfaction after it is embedded. It may not have mouse or keyboard sensitivity, or some other weird behavior.

Here is a simple way to embed an mc filebrowser into a urxvt terminal. Google for Gtk2::Socket and Gtk2::Plug...... it's still all experimental.

#!/usr/bin/perl use warnings; use strict; use Gtk2; init Gtk2; my $window = new Gtk2::Window 'toplevel'; $window ->signal_connect( 'destroy' => sub{ Gtk2->main_quit; return 0; } ); my $frame = new Gtk2::Frame "embedded rxvt-unicode terminal"; $window->add ($frame); my $rxvt = new Gtk2::Socket; $frame->add ($rxvt); $frame->set_size_request (700, 400); $window->show_all; my $xid = $rxvt->window->get_xid; # works with rxvt but xterm loses keyboard focus #system "xterm -into $xid &"; system "urxvt -embed $xid -e mc &"; $window->show_all; $rxvt->add_events([ qw( all_events_mask key_press_mask ) ]); #needs 0 not 1 for second arg #my $rc = Gtk2::Gdk->keyboard_grab($rxvt->window, 0 ,Gtk2->get_current +_event_time); #warn "keyboard grab failed ($rc)\n" unless $rc eq 'success'; #print "$rc\n"; main Gtk2;

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

In reply to Re: perl Gtk2 embed nautilus as widget by zentara
in thread perl Gtk2 embed nautilus as widget by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.