2

You'll have to bare with my my Linux terminology is pretty bad. When I say virtual terminal I'm talking about when you press ctrl+alt+ a function key (F1-F12). I think they are called virtual terminals.

So I found this snippet that allows you to start an X application in another terminal.

/usr/bin/xinit /opt/someAppFolder/SomeApplication -- :1

I found it in a form that allows you to run Steam in another terminal so you can easily switch out of your full screen games back to your desktop.

But what I want to do is from my desktop terminal (tty7) launch a application (that does not require X) in another terminal. I know I can switch to another terminal, login, then run the app. But can I write a script to do that? So all I need to do is click a shortcut?

3

Use openvt. Note that you'll need to be root, because the terminal devices belong to root unless a user is logged in.

openvt -c 8 myapp

Add the option -s if you want to switch to vt 8 when the openvt command is run.

  • Thanks I also found out "chvt N" (N being the terminal number) lets you change virtual terminals! Thanks! – Jerinaw Feb 11 '15 at 4:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.