José Lopes <jose.lopes@...> writes:

> 
> Hello everyone,
> 
> How do I get the username of the person who is logged in the system?
> 
> At the moment I am doing this, but it looks terrible...
> 
> (define (current-user)
>    (path->string (file-name-from-path (find-system-path 'home-dir))))
> 
> Regards,
> José
> 


If you want to username of the user running racket you can just use (genenv
"USER") assuming the variable is defined in the environment.

regards, david mitchell

_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to