[racket] Trying to run Racket as an administrator: sudo racket
On Thu, Jul 25, 2013 at 10:10:17PM -0600, Don Green wrote:
> I am running Racket on Ubuntu.
>
> No problem running racket as a user.
>
> Trying to run racket as an administrator, i.e., after running
>
>
> sudo su
>
>
> then
>
>
> sudo racket
>
>
> This fails because the environment variable PLTCOLLECTS seems to be not in
> effect. (Works fine when I don't use sudo in front of the call to racket.)
>
<DELETED>
>
> When I type:
>
> sudo racket
>
> (current-library-collection-paths) returns:
>
> '(#<path:/home/don/.racket/5.2.1/collects>
> #<path:/usr/local/racket/collects>)
>
> This is not what I want.
>
>
> For some unknown reason this path has not been added:
>
> #<path:/home/don/.plt-scheme/4.2.1/collects>
>
> ----------------
>
>
> When I type:
>
> racket
>
> (current-library-collection-paths) returns:
>
> '(#<path:/home/don/.plt-scheme/4.2.1/collects>
> #<path:/home/don/.racket/5.2.1/collects> #<path:/usr/local/racket/collects>)
>
> This is what I want.
>
> -----------------
>
>
> I am aware of the raco links method and also the planet software that
> provides a sudo wrapper on some racket commands, but I have reasons for
> wanting to first try the approach I am attempting above.
>
>
> Thanks for any suggestions.
>
> Don Green
Don
sudo can take a -E option which will preserve the environment. I do
not know if this will help you?
Bob