I’ve set some path variables on my Raspberry Pi, but since I upgraded the D compiler version, I need to change it, by removing the reference to the old version, as the two would collide with each other. The issue is, I used some now obscure tutorial, which I no longer can find, and it’s not found in the usual culprit /etc/profile, yet the path is still listed with an echo $PATH.

I need to get the list of bootup scripts where it was added (it was added with something like that if I remember correctly), or somehow reset it without reinstalling the Linux to my Pi. I’ll give my paths a more generic names in the future, so I can just rename a folder, then use the compiler right out of the box without having to mess around with the path yet again.

  • mox@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    8 months ago

    I’m surprised to encounter someone who uses a D compiler but doesn’t know much about environment variables or unix shells.

    Due to the nonexistent documentation for the issue,

    Are you familiar with the man command, for reading the system’s manual pages? When you get some time, you might want to run man bash and read whatever sections are relevant to things you want to do, such as where the Invocation section talks about startup files.

    I’ll give my paths a more generic names in the future, so I can just rename a folder, then use the compiler right out of the box without having to mess around with the path yet again.

    Creating a symlink (symbolic link) with a generic name to point at the version-specific directory name is a common way to do this. (For example, ln -s dmd-2.107.1 dmd) You could then add the symlink’s path to your PATH environment variable, and replace the symlink whenever you want to point it at a different compiler version. Run man ln for more info.

    I also suggest finding a beginner’s guide to linux (or unix) when you get a chance. This stuff gets a lot easier once you learn the basics.

  • Consti@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    8 months ago

    You can set the initial value directly in /etc/environment, did you check that? It could also be set only for your user, so it might be in ~/.profile, ~/.bashrc or ~/.bash_profile` (or the rc file for your shell if you’re not using the default bash).

    Edit: I suppose you could also have added a startup script in /etc/init/ or /etc/init.d/, or in /etc/rc.local

  • ZILtoid1991@lemmy.worldOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 months ago

    Found it in .bashrc, editing it makes my pi no longer wanting to log in to GUI. Ctrl+Alt+F1 still works. Commenting out the export PATH part does not fix it. Some forums recommended deleting some files, so I’ll try doing that.

    • ZILtoid1991@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      2
      ·
      8 months ago

      UPDATE: Due to the nonexistent documentation for the issue, I had to reinstall the OS for my Raspberry Pi, and I really don’t like Wayland, nor the fact it forced the Hungarian Keyboard layout onto me (near unusable for programming, because at IBM, people wanted their menu key)…

      • Fal@yiffit.net
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        2
        ·
        8 months ago

        People are really still complaining about Wayland? I thought that was just a meme

        • ZILtoid1991@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 months ago

          Issue is, a lot of applications still haven’t fully moved to Wayland, especially Barrier, which I use to share a keyboard and mouse from my Windows PC.