Read the statement by Michael Teeuw here.
Best way to develop from Windows machine
-
I have a Raspberry Pi with Magic Mirror running - attached to a monitor but no keyboard or mouse. To develop, I am using Remote Desktop from my main Windows computer to remote in and do whatever. This is not ideal, as I have to:
- Turn on the Pi, let it load to MM
- Close MM, then Log the main user out of the Raspberry Pi OS (while leaving the Pi on)
- Remote Desktop from my Windows machine
- Develop / edit the mirror from the remote window
I have to do this because Remote Desktop will not let me log into the Pi using the same user that is already logged in. I had actually created a second user, but then I don’t have access to the main user’s files (I know you can get around this, it just doesn’t seem like the right approach).
So, is there some write-up or general consensus of the best way to work on Magic Mirror from a Windows machine, where the ultimate target is a Raspberry Pi? Things like editing the config and css files, installing modules, developing new modules, etc.
BTW I also installed MM directly on my Windows machine as a way to develop a fork of a module, much easier than trying to do so via remote desktop. However, at some point I need to pull that fork down to the Pi, edit the config, test it with my other modules, etc.
How do you long-time users do this?
-
@cpcode use either Winscp or Bitvise ssh client. (Both free, I like Bitvise better) Both will give you the ssh window and a file manager view of the target system. So you can double click to edit on the windows system. And use your favorite text editor
I use notepad++ or visual studio code
Then you can use a browser on windows to access the MagicMirror server and see the changes there
If the changes are css, just refresh the MagicMirror screen. Most of the module config related to presentation will also be used on the refresh, no need to restart MagicMirror (like tuning the calendar views)Open mm in another browser tab, f11 to
Max without titlebar, f11 back outI never edit on the pi anymore
No desktop login required
-
@cpcode all the installing modules part would be done thru the ssh terminal window.
And terminal window commands therepm2 to restart MagicMirror or npm start/ctrl-c to stop
-
@cpcode bitvise gives you file transfer in both direction via drag/drop. Great for log files etc
-
And from Linux, you can use the caja file manager to get the remote file view. SSH window is normal
Sublime text - like notepad++
And vs code -
@cpcode and you can use the developers window on the PC browser for css development
See the second link in my signature below for using the dev window for css
-
@sdetweil Thanks, this is perfect! I am set up with SFTP to the Pi and I can edit the remote files with VS Code on my machine. Haven’t tried SSH yet but hopefully that works well too.
I’m good with old school HTML, JavaScript, and CSS, but have zero experience with anything Linux. This has been a great project to get my feet wet. I think in 3 or 4 more weeks I should be able to post some pics of my display here, it’s coming along. -
@cpcode don’t need sftp anymore
Just edit direct thru window file manager. DoubleClick
Editor opens file, save puts it back on pi. -
@cpcode said in Best way to develop from Windows machine:
Use SSH with a text editor like VS Code (with the Remote - SSH extension) to edit files directly on the Pi. This avoids remote desktop issues and allows seamless file access and module development.
-
@abuislam please, do not copy the entire post you are replying to
-