[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


 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,


and this returns:


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


When I type:

sudo racket

(current-library-collection-paths) returns:


This is not what I want.

 For some unknown reason this path has not been added:



 When I type:


(current-library-collection-paths) returns:

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