Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Seting Bash Aliases for Cloudron Terminal

    Support
    webterminal
    4
    8
    297
    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.
    • Shai
      Shai last edited by girish

      I've been able to create aliases for the Cloudron terminal by creating the file

      /app/data/.bash_aliases
      

      putting the aliases there and then running

      source /app/data/.bash_aliases
      

      every time I log into the terminal. I was assuming that adding a .bashrc file wouldn't do anything. Is there any way for me to be able to skip the "source" step?

      rmdes 1 Reply Last reply Reply Quote 0
      • rmdes
        rmdes @Shai last edited by

        @shai Interesting, I always wanted to have this, gonna try this on my side
        I wish we could choose to use ZSH or else and have a full blown shell on the web terminal 🙂

        1 Reply Last reply Reply Quote 1
        • girish
          girish Staff last edited by

          Currently there is no way because the .bashrc is not editable. I guess we never thought of the Web Terminal as some sort of login shell.

          1 Reply Last reply Reply Quote 0
          • robi
            robi last edited by

            would that require a new base image?
            or simply a source line wrapped in an if exist statement in the start script for the web shell?

            Life of Advanced Technology

            girish 1 Reply Last reply Reply Quote 0
            • girish
              girish Staff @robi last edited by

              It seems bash has a argument --rcfile. So, we can just fix it when we invoke the docker exec.

              1 Reply Last reply Reply Quote 1
              • girish
                girish Staff last edited by

                OK, I have made a fix to source in /app/data/.bashrc in web terminal. This requires a new Cloudron release, so it will be in next release.

                If you use the CLI tool, just update to 4.11.0 and the cloudron exec will automatically source in that file with the current Cloudron release (6.2.8)

                1 Reply Last reply Reply Quote 3
                • robi
                  robi last edited by

                  I love it when an inspiration comes together!

                  Life of Advanced Technology

                  1 Reply Last reply Reply Quote 1
                  • girish
                    girish Staff last edited by

                    Looks like this change broke WP - https://forum.cloudron.io/topic/5385/wp-cli-not-working-on-6-3-5

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Powered by NodeBB