[racket] Trying to run Racket as an administrator: sudo racket

From: Don Green (infodeveloperdon at gmail.com)
Date: Fri Jul 26 00:10:17 EDT 2013

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


 I thought that if I can echo the value of the variable thusly,

# echo $PLTCOLLECTS

and this returns:

/home/don/.plt-scheme/4.2.1/collects


 then the variable is in effect. I must be missing something.


 -----------------

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130725/519c0c9d/attachment.html>

Posted on the users mailing list.