Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Want to execute a command from one VT on another VT.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Tony0945
Apprentice
Apprentice


Joined: 25 Jul 2006
Posts: 295

PostPosted: Wed Mar 27, 2013 1:18 am    Post subject: Want to execute a command from one VT on another VT. Reply with quote

Specifically, I have an autologon display that I want to control remotely using ssh (or putty or even Xming). I want to be able to start/stop Firefox or another browser and change the current page. Is there an application that can do this? Or do I have to write an application that will run on the display's VT and listens on an IP port along with another that will send commands to the listening port? Or is there a better way to accomplish the goal? Someone must have done this in the past.
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Wed Mar 27, 2013 1:42 am    Post subject: Reply with quote

Tony0945,

Something like app-misc/screen :?:
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
friesia
Apprentice
Apprentice


Joined: 23 Mar 2007
Posts: 190

PostPosted: Wed Mar 27, 2013 1:18 pm    Post subject: Reply with quote

I didn't understand how Firefox is related to VTs, but as I know with screen you can't connect to one screen session from several clients, you have to use tmux for that.

As for launching Firefox remotely, you have to set a correct DISPLAY variable and it will connect to the X session you want.
Back to top
View user's profile Send private message
Mad Merlin
Veteran
Veteran


Joined: 09 May 2005
Posts: 1143

PostPosted: Wed Mar 27, 2013 11:49 pm    Post subject: Reply with quote

friesia wrote:
...I know with screen you can't connect to one screen session from several clients, you have to use tmux for that.


Let me introduce you to
Code:
screen -x
.
_________________
Game! - Where the stick is mightier than the sword!
Back to top
View user's profile Send private message
Tony0945
Apprentice
Apprentice


Joined: 25 Jul 2006
Posts: 295

PostPosted: Thu Mar 28, 2013 1:15 am    Post subject: Reply with quote

I emerged screen and tried it. It didn't seem to do anything more than bash. I tried named pipes and that seemed to work for a while until the pipe stopped responding. One big problem with the pipe is that when I 'exec' the output of the pipe it launches the app but when the app ends the terminal window ends too. I tried wrapping the exec in sh but then I just get the message "exec file or directory not found", so I guess sh loses PATH. I think I have to wrap two applications with sockets in wxGTK but that seems to be a lot of work for what a script should be able to do.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum