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

Simplifying the live on the bash command line

Scheduled Pinned Locked Moved General Discussion
7 Posts 4 Posters 961 Views 4 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.
  • M Offline
    MoreLinux
    last edited by Apr 19, 2020, 9:45 PM

    Setting up a MagicMirror² on a Raspberry Pi isn’t too difficult using the installer script from @sdetweil . The more difficult part is selecting which modules to install and then configuring them.

    I’m not a command line guru, so the hopping back and forth between the config, modules and css directory feels like a lot of work. So to ease the stress on my keyboard, I created a .bash_aliases file with some useful aliases. These aliases make my life easier, and I hope for you as well.

    Currently I’m using the following aliases:

    • cdMM => change to the MagicMirror directory
    • cdMMC => change to the config directory
    • cdMMM => change to the modules directory
    • cdMMS => change to the css directory
    • viMMC => open the config.js in vi
    • edMMC => open the config.js in leafpad via X forwarding.

    My .bash_aliases file can be found on github: https://github.com/MoreLinuxDev/MagicMirror-bash-aliases

    I hope I setup the repository correctly as this is my first one on github.

    S 1 Reply Last reply Apr 19, 2020, 11:01 PM Reply Quote 2
    • S Away
      sdetweil @MoreLinux
      last edited by sdetweil Apr 19, 2020, 11:03 PM Apr 19, 2020, 11:01 PM

      @MoreLinux if u have windows, then get the bitvise ssh client. It will give u ssh and a windows explore type view of the pi file system. Double click to edit, navigate etc.
      Can Drag drop files between PC and pi, either way.

      U didn’t have to BE in the folder to edit a file there, nano …/…/config/config.js for example, from a module folder edit config.

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      M 1 Reply Last reply Apr 20, 2020, 7:43 PM Reply Quote 1
      • M Offline
        MoreLinux @sdetweil
        last edited by MoreLinux Apr 20, 2020, 7:45 PM Apr 20, 2020, 7:43 PM

        @sdetweil , I haven’t been running Windows on my home pc’s and laptop since the late 90’, I’m didn’t know about bitvise. Will check this out for my work PC.

        Most of my Raspberry Pi’s are running headless, and for those ssh and vi are mostly fine as they need little attention, but two week ago my SD card in the MM died, so I had to setup a new one. A restore of a backup would have made things much easier, but … the backup … yeah … was still on the to-do list :) … So I had to setup a system from scratch and that’s a lot of work, and that’s the reason I came-up with the aliases list.

        Also I now setup the PI to have as little as possible writes on the SD with the method I written down in this topic: https://forum.magicmirror.builders/topic/11513/dead-sd-card-every-aprox-6-months/10

        I’m also thinking to setup a github repro for my MM config.js and custom.css file. With these files stored on github, I can easily track back which modules I have installed and layout changes I have performed.

        Mental note 1 … always make a backup of all critical files!
        Mental note 2 … keep the MM working, because the wife who didn’t want the stupid thing in the first place, now was telling me to fix it ASAP because she now didn’t know what to wear due to the missing weather info.

        S 1 Reply Last reply Apr 20, 2020, 7:46 PM Reply Quote 0
        • S Away
          sdetweil @MoreLinux
          last edited by Apr 20, 2020, 7:46 PM

          @MoreLinux said in Simplifying the live on the bash command line:

          didn’t know what to wear due to the missing weather info

          the law of unintended consequences!!!

          ok, I use nemo as my file manager under ubuntu, and it shows the pi drives on a;ll 5 systems i open ssh connections to…

          similar to what bitvise did…

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • B Offline
            barryallen1337
            last edited by lavolp3 Apr 28, 2020, 9:30 PM Apr 28, 2020, 9:17 PM

            Most distributions add at least some popular aliases in the default .bashrc file of any new user account. These are simple ones to demonstrate the syntax of a Bash alias:
            alias ls=‘ls -F’
            alias ll=‘ls -lh’

            M 1 Reply Last reply Apr 30, 2020, 7:31 AM Reply Quote 0
            • M Offline
              MoreLinux @barryallen1337
              last edited by Apr 30, 2020, 7:31 AM

              @barryallen1337 true, but in the .bashrc on Raspbian, not that many are there. Also editing the .bashrc is something you can do, but those changes might end-up throwing update problems that need to be merged. This is due to the changes made in the .bashrc file.

              To have a smooth ride during updating the Raspbian OS, it better to use the .bash_aliases file. This file, if it exists, is read by the .bashrc and your aliases are activated. The .bash_aliases is read at the end of the .bashrc file, so your aliases are always created last what means the aliases work the way you set them up.

              1 Reply Last reply Reply Quote -1
              • F Offline
                flisterfive
                last edited by flisterfive Jan 15, 2021, 11:01 AM Jan 15, 2021, 11:00 AM

                Long time Linux user, still have problems remembering rarely used commands. Thanks N-O-D-E guy! Recommend anyone using this and hoping to master BASH to still create their own scripts (got to do it to learn it!). Create a dir, eg, “my_scripts” and add it to your path. jiofilocalhtml https://forpc.onl/snaptube-for-pc

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  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