VTE Terminal Problem



I know this is the Gtk+ list, but I figured I found out about VTE on this list,
so I'd post my problem here. Anyway, let me give a little code. I am using
the following code to create my terminal:

----- Begin Code -----

GtkWidget *terminal = vte_terminal_new ();
GtkWidget *scrollbar = gtk_vscrollbar_new (vte_terminal_get_adjustment
                                          (VTE_TERMINAL (terminal)));
GtkWidget *hbox = gtk_hbox_new (FALSE, 0);

vte_terminal_fork_command (VTE_TERMINAL (terminal), "/bin/bash",
            NULL, NULL, g_get_home_dir (), FALSE, FALSE, FALSE);
vte_terminal_set_font_from_string (VTE_TERMINAL (terminal), "Monospace 9");
vte_terminal_set_scroll_on_output (VTE_TERMINAL (terminal), FALSE);
vte_terminal_set_scroll_on_keystroke (VTE_TERMINAL (terminal), TRUE);
vte_terminal_set_mouse_autohide (VTE_TERMINAL (terminal), TRUE);

gtk_box_pack_start (GTK_BOX (hbox), terminal, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox), scrollbar, FALSE, FALSE, 0);
-----  End Code  -----

That is not the problem, I just figured this might help. My problem arises when
I feed a child process like this:

vte_terminal_feed_child (VTE_TERMINAL (terminal), command, strlen (command));

It is feeding in the command, but it doesn't run it. It just displays the
command in the terminal. Then, the user must press [Return] manually to run
the command.

Now, my problem is that I want the command to autmatically run. How can
I do this? Thanks for any help you can give me!

---
Andrew Krause




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]