Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAQ: "permission denied" when running your Racket program #666

Open
greghendershott opened this issue Sep 6, 2023 · 0 comments
Open

FAQ: "permission denied" when running your Racket program #666

greghendershott opened this issue Sep 6, 2023 · 0 comments
Labels
FAQ For pinning at top of issues list. ubuntu/snap

Comments

@greghendershott
Copy link
Owner

greghendershott commented Sep 6, 2023

  • When you use Racket as installed from https://snapcraft.io/racket, it runs using strict confinement.

    Among other restrictions, Racket won't be able to read from directories named starting with a dot -- for example: ~/.emacs.d/elpa.

    AND...

  • When you install Racket Mode as a normal Emacs package from MELPA, its files go under ~/.emacs.d/elpa.

    Therefore when Racket Mode starts its "back end", written in Racket, it does racket ~/.emacs.d/elpa/racket-mode-xxx/main.rkt. Ergo the permission error.

Ways to avoid this problem

To avoid the problem, avoid either of the above conditions:

  • Install Racket directly from https://download.racket-lang.org/. Racket's Linux installer is easy to use and flexible.

    (Facts: Distro packages of Racket tend to be very old versions. Although the snap package is newer, unfortunately it comes with strict confinement.

    Opinions: Sometimes it's best to get things direct, and, with freedom to use a programming language to write/use any program you wish... even a program that reads from certain directories. 😄)

    OR...

  • Install Racket Mode so its files are not under a dot directory. Any of the following can work:

    • Clone the files from here on GitHub, and add that directly to load-path in your Emacs init file.

      OR...

    • Move your entire elpa subdirectory from under ~/.emacs.d to somewhere else, like ~/emacs-packages, and add (setq package-user-dir "~/emacs-packages") early in your Emacs init file, before any other package-xxx expressions.

@greghendershott greghendershott pinned this issue Sep 6, 2023
@greghendershott greghendershott added the FAQ For pinning at top of issues list. label Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FAQ For pinning at top of issues list. ubuntu/snap
Projects
None yet
Development

No branches or pull requests

1 participant