View Single Post
Posts: 67 | Thanked: 13 times | Joined on Feb 2008 @ U.S.A.
#1
There's no documentation on osso-xterm, so I'm looking through the source to try to find out what CLI arguments are supported.

Here's the main:
Code:
int
main(int argc, char **argv)
{
  gboolean started_from_dbus = FALSE;

  if (argc > 1)
    started_from_dbus = !strcmp(argv[1], "--started-from-dbus");

  g_debug("main: started_from_dbus = %s\n", started_from_dbus ? "TRUE" : "FALSE");

  if (dbus_setup(started_from_dbus)) {
    gtk_init(&argc, &argv);

    preamble(&argc, &argv, APPLICATION_NAME);
    gdk_rgb_find_color(gdk_colormap_get_system(), &clr_white);
    gdk_rgb_find_color(gdk_colormap_get_system(), &clr_black);

    xterm_new(argv);

    gtk_main();
  }

  return 0;
}
The arguments are passed to "gtk_init", which I'm ignoring because that wouldn't be xterm specific arguments, and they're also passed to "preamble":
Code:
void
preamble(int *p_argc, char ***p_argv, const char *base_name)
{
  int Nix;

  g_set_application_name(base_name);
  for (Nix = G_N_ELEMENTS(stock_icons) - 1 ; Nix > -1 ; Nix--)
    add_stock_icon(stock_icons[Nix].fname, stock_icons[Nix].stock_name);
}
Which seems to ignore CLI arguments. "xterm_new" also gets an argv, but the specification for xterm_new does not accept any arguments, so I'm not sure why it compiles. I must be missing something. This code is difficult reading.

My goal at the moment is to simply launch an xterm window from a script, and have it execute something (in this case, "tail -f <some log file>")

My blind guess was to try:

osso-xterm -x "tail -f /var/log/file"
osso-xterm -c "tail -f /var/log/file"
/usr/bin/maemo-summoner /usr/bin/osso-xterm.launch -x "tail -f /var/log/file"

All those attempts have failed.