Which editor for develop application

Hello everyone,

I want to custom LuCI web interface. I use raspberry pi 3B, and build firmware from Openwrt 17.01 SDK from GitHub. I think that LuCI web interface may be difficult if I only use vi or vim editor, installed on Openwrt. I read some tips about develop application with visual studio code, remoting to raspberry. But I haven't done! Have another solution for my issue.

Thank in advance,
nhanlee97

What is your previous development experience? Which tools did you use?

Hi stangri,

I used vi editor. But, I want use visual studio code, which remote through SSH to Raspberry board and develop application in this board. Visual studio code supports many packages for user. If I can use this tool, developing application on Openwrt may be easy, interessting. You have another tools for develop apps on Openwrt, haven't you?

Thanks,
nhanlee97

You can use Nano:
https://openwrt.org/packages/pkgdata/nano

If you want to edit files on the router itself, you better use rmate with vscode (and Remote VSCode extension) or Sublime Text with the rsub extension. You might need to adjust your .ssh/config file to make use of these or manually specify port forwarding when using ssh client to connect to router.

I don't think it's a good practice tho, I'd recommend you work on files locally on your computer and then scp them to the router, better yet, build packages on your computer and then install these packages on the router.

5 Likes

Hello everyone,

I found the solution to my issue. Now, I would like to share my solution with you. If you have a better solution, you can post your resolve. In my case, I installed packages sftp server, OpenSSH-server on Raspberry Pi 3 B with Openwrt firmware. Then, I installed "SFTP" (liximomo) and "Vs Code SFTP"(Sunbright) extension package on Visual Studio Code on my laptop. I edited the file "sftp.json" for the connection between my laptop and my raspberry.

post1

I want use Visual Studio Code. Because it has snippets tool for every programming language. That's interesting solution. :slight_smile:

nhanlee97

1 Like

Hi,

This's the result.

nhanlee97

1 Like

Hi,

My config file.

post3

nhanlee97

I’ve used sftpman [1] to connect to my router which had OpenSSH SFTP server installed. Works great. For GUI frontend there’s also sftpman-gtk. [2]

[1] https://wiki.archlinux.org/index.php/Sftpman
[2] https://github.com/spantaleev/sftpman-gtk
1 Like

Did you have to do any special setup on the router to get this to work? I am testing this now, but it says it cannot read the files in the /.vscode/ directory (because they do not exist). I compiled with openssh-sftp-server - 8.0p1-1 installed