RE: c question



> Is there a function in c to return the path to the current users home
> directory?

This is horribly off-topic and doesn't belong in gnome-list.  (You'll
undoubtedly catch shit for it by someone.)

Well, it relates to gnome programming. :)

That said, man getpwuid.  Something like:

   struct passwd *pwd = getpwuid(getuid());
   printf("User's home is: %s\n", pwd->pw_dir);

Thanks

Jason.

Kevin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]