Re: vte_terminal_fork_command behavior
Wouter Bolsterlee <[email protected]> Sun, 25 Jan 2009 18:34:33 +0100
| Newsgroups | gmane.comp.gnome.devel |
|---|---|
| Message-ID | <[email protected]> |
2009-01-25 klockan 18:29 skrev Ignacio Butler:
> > Another approach would be to execute a command like this in the VTE widget:
> > sh -c "'YOUR COMMAND LINE GOES HERE'; read;"
> > In this case the spawned shell will wait for the user to hit Enter (or
> > Ctrl-C or Ctrl-D) to exit.
> it worked.
> Thanks
Hi Ignacio,
I'm glad you got things to work.
> Here is the code:
> [snip]
> char *params[] = {"/bin/sh", "-c", "ls -l ~/;read",NULL};
Make sure that you properly escape any strings you include here, in case you
do not hardcode it...
> char *env[] = {"PATH=/usr/bin:/bin:./usr/local/bin:/bin", NULL};
I'm not quite sure this is a good thing to do. Not inheriting the standard
environment may cause serious issues, like not being able to find programs
in custom paths, not being able to use the X display, or not being able to
use the DBus session bus, among many other things.
— Wouter
_______________________________________________
gnome-devel-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-devel-list
signature.asc
(application/pgp-signature, 245 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: This message was signed/encrypted using GnuPG. iD8DBQFJfKKpP7QTTiUKY+sRApCdAJ9T8KH1tSo0vS/g8qdIzphp+b3OTwCfVvQ1 04E8Fooqe5zP1AFfVUwgWHg= =YAxb -----END PGP SIGNATURE-----