PDA

View Full Version : Send Command to Linux via Windows Mobile?


yidiyuehan
23rd July 2009, 02:18 PM
Hi, Anybody knows any software compatible with WM to remotely send command to Linux system?

Under Windows we have plink which is pretty good to send any command to linux.

Basically I need to have a simple user interface (just a few buttons), I load this interface, it will auto log into the linux server. Once I click one of the button, it will send a few command lines to Linux.

I tried with Visual Studio 2008 without success as Sendkeys is not available for WM platform.

Anybody has any idea?

thanks a lot in advance

johnny

deedee
23rd July 2009, 09:45 PM
Personally the few times i need to connect to a Linux box from my PPC i use Pocket Putty. OK it's command line only but it's good enough for my needs.

Rudegar
23rd July 2009, 09:47 PM
vnc would also work well of cause one would take over the linux but that would mean one could send commands by typing them into a console or clicking on the button which perfomred that command

yidiyuehan
27th July 2009, 02:32 PM
thanks a lot Rudegar and Deedee,

I have tried pocket putty using VB 2008, however I couldn't access to the linux server with below commands:

Private Sub btn_sd1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_sd1.Click

Dim m_Process As New ProcessStartInfo()
m_Process.FileName = "putty.exe"
m_Process.UseShellExecute = False
m_Process.Arguments = "root@Linux_Server " & "/etc/asterisk/intercom/203.sh"
Process.Start(m_Process)
End Sub


"Linux_Server" is the saved putty session I saved with the pocket putty. /etc/asterisk/intercom/203.sh is the directory of the linux bash file I need to execute.

Basically I just need to login into the Linux Server and execute the bash file once the button is clicked.

Deedee you have any ideas?

thanks a lot.
johnny

deedee
27th July 2009, 09:23 PM
Unfortunately none.

My VB is limited to not much more than text file processing, i used to parse a lot of various log files by hand and decided to learn VB6 so i could automate the process. the VB is slowly extending in function but tends to be snaffling someone elses code and hacking it to work the way i want it.

My Linux is equally restriced in scope, actually probably more so.

Wish i could have been more help.

BigDaddyG
28th July 2009, 02:55 AM
thanks a lot Rudegar and Deedee,

I have tried pocket putty using VB 2008, however I couldn't access to the linux server with below commands:

Private Sub btn_sd1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_sd1.Click

Dim m_Process As New ProcessStartInfo()
m_Process.FileName = "putty.exe"
m_Process.UseShellExecute = False
m_Process.Arguments = "root@Linux_Server " & "/etc/asterisk/intercom/203.sh"
Process.Start(m_Process)
End Sub


"Linux_Server" is the saved putty session I saved with the pocket putty. /etc/asterisk/intercom/203.sh is the directory of the linux bash file I need to execute.

Basically I just need to login into the Linux Server and execute the bash file once the button is clicked.

Deedee you have any ideas?

thanks a lot.
johnny

This may be possible using MortScript. Why don't you post your request in the Development & Hacking forum as there is an active Mortscript thread there.

Here (http://forum.xda-developers.com/showthread.php?t=289197) is its direct link


Cheers

yidiyuehan
28th July 2009, 08:17 AM
I will learn what is MortScript if pocket putty isn't really workable.

If there is a pocket plink it will become much easier as I can do this using Plink with VB.net.