Closed rtwk closed 9 years ago
Hey @rtwk! Can you please tell me more about what you're trying to do?
Hi. When I start web-term from terminal (issuing web-term -p 5000 -c dir), does it have any option to issue a command to be executed automatically when the app starts (e.g. run a python program with say 'python filename.py')?
Ah, there is not such option. At least not yet. :smile:
But that's a neat idea. If you like, you can implement that and make a pull request.
Btw, remember you can run scripts using the .bashrc
file.
Okay.
Just tested it: add the following line in your ~/.bashrc
(or ~/.bash_profile
on OS X):
echo "Hello World"
Then, when you open the terminal, Hello World will appear. :sparkles: So, I'm closing this.
This is now possible in 3.1.0
–check out #18. Using web-term -s alsamixer
will start alsamixer
for example. :smile:
That's awesome.
On Sun, Aug 23, 2015 at 4:52 PM, Ionică Bizău notifications@github.com wrote:
This is now possible in 3.1.0–check out #18 https://github.com/IonicaBizau/web-term/pull/18. Using web-term -s alsamixer will start alsamixer for example. [image: :smile:]
— Reply to this email directly or view it on GitHub https://github.com/IonicaBizau/web-term/issues/14#issuecomment-133818765 .
I pushed an additional fix for running custom commands at the start. If you really want to run a program (e.g. alsamixer
) in the browser, you should do: web-term -b alsamixer
.
If, for example, you like to run a custom command in a different shell, you should do: web-term -b zsh -s 'echo "Hello World"'
–this will start zsh
(instead of bash
) and will run echo "Hello World"
there. :smile:
There is a data option to write data to the terminal. Any example would be of great help.