简体   繁体   中英

How to send terminal commands to a raspberry pi from a c# application

My raspberry pi sits on the kids tv upstairs. i can tight vnc into it to make it play various saved videos such as "Pepper pig" or "diego" via the terminal.

I made a wpf app to show me what films and videos are on the pi. so i already have its ip ect.

my question is how do i go about sending the command from my wpf app so that i dont have to keep vncing into it and typing out long commands in the terminal.

i use oxmplayer so the terminal command looks like this:

oxmplayer \\media\\pi\\externaldrive\\kidstv\\pepperpig\\episode1.mp4

You need to connect to your Pi via SSH. There's a good SSH library for that: https://github.com/sshnet/SSH.NET

Connect to your Pi, execute the command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM