• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Best way to develop from Windows machine

Scheduled Pinned Locked Moved General Discussion
10 Posts 3 Posters 524 Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    cpcode
    last edited by Dec 3, 2024, 12:56 AM

    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?

    S 1 Reply Last reply Dec 3, 2024, 1:17 AM Reply Quote 0
    • S Away
      sdetweil @cpcode
      last edited by sdetweil Dec 3, 2024, 2:34 AM Dec 3, 2024, 1:17 AM

      @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 out

      I never edit on the pi anymore

      No desktop login required

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      S 1 Reply Last reply Dec 3, 2024, 1:22 AM Reply Quote 0
      • S Away
        sdetweil @sdetweil
        last edited by Dec 3, 2024, 1:22 AM

        @cpcode all the installing modules part would be done thru the ssh terminal window.
        And terminal window commands there

        pm2 to restart MagicMirror or npm start/ctrl-c to stop

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        S 1 Reply Last reply Dec 3, 2024, 1:23 AM Reply Quote 0
        • S Away
          sdetweil @sdetweil
          last edited by Dec 3, 2024, 1:23 AM

          @cpcode bitvise gives you file transfer in both direction via drag/drop. Great for log files etc

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          S 1 Reply Last reply Dec 3, 2024, 1:29 AM Reply Quote 0
          • S Away
            sdetweil @sdetweil
            last edited by Dec 3, 2024, 1:29 AM

            @cpcode

            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

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            S 1 Reply Last reply Dec 3, 2024, 1:32 AM Reply Quote 0
            • S Away
              sdetweil @sdetweil
              last edited by sdetweil Dec 3, 2024, 1:33 AM Dec 3, 2024, 1:32 AM

              @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

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              C 1 Reply Last reply Dec 3, 2024, 2:01 AM Reply Quote 0
              • C Offline
                cpcode @sdetweil
                last edited by Dec 3, 2024, 2:01 AM

                @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.

                S 1 Reply Last reply Dec 3, 2024, 2:05 AM Reply Quote 0
                • S Away
                  sdetweil @cpcode
                  last edited by Dec 3, 2024, 2:05 AM

                  @cpcode don’t need sftp anymore

                  Just edit direct thru window file manager. DoubleClick
                  Editor opens file, save puts it back on pi.

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    abuislam
                    last edited by sdetweil Dec 8, 2024, 4:17 PM Dec 5, 2024, 12:53 PM

                    @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.

                    S 1 Reply Last reply Dec 5, 2024, 1:09 PM Reply Quote 0
                    • S Away
                      sdetweil @abuislam
                      last edited by Dec 5, 2024, 1:09 PM

                      @abuislam please, do not copy the entire post you are replying to

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • S sdetweil referenced this topic on Dec 13, 2024, 11:16 PM
                      • S sdetweil referenced this topic on Dec 18, 2024, 4:40 PM
                      • 1 / 1
                      1 / 1
                      • First post
                        2/10
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy