Page 1 of 1

Simple Terminal Emulator - write one or include one?

Posted: Fri Feb 20, 2015 12:50 pm
by broozar
hi all,

i am trying to write a desktop-environment- and distro-agnostic launcher for console-style application and scripts. since there is apparently no "standard terminal" emulator on linux, nor a command that launches the standard terminal (something like xdg-open), i need to include a simple terminal emulator. the question is, do i write one or do i take one from the handful that already exist, like xterm, roxterm, rxvt, ... ?

a typical workflow would look like this:
0. my launcher gets executed
1. this launcher runs the terminal through RunProgram
2. launching script/console program: a command (shell script) is either piped to the terminal or taken from the first argument and executed (like -e or -x in the xfce4-terminal)
3. terminal displays output of that launched program, and accepts standard user input

Any suggestions?
- is there already a simple terminal emulator written in PB that I could use?
- would you recommend one of the existing emulators over another? for example xterm over ... ?

thanks in advance

Re: Simple Terminal Emulator - write one or include one?

Posted: Fri Feb 20, 2015 5:55 pm
by mariosk8s
If at all possible i'd use an existing one, maybe xterm.
Something that's not tied to a particular desktop.

Re: Simple Terminal Emulator - write one or include one?

Posted: Sat Feb 21, 2015 10:46 am
by broozar
i tried xterm, but it is 2.3 mb, which seems excessive for my purposes. then i stumbled over "st" (simple terminal), which compiles to like 130kb and feels just right: http://st.suckless.org
i think i will go with that one, since it does what i need, is small yet provides all necessary features, has few dependencies and a very simple source code.