home-directory

Read user home directory from PHP

I cannot find a way to get the user's home directory (e.g. /home/jack; whatever ~ in bash points to) in PHP using CGI (suPHP). The $_ENV array is empty, and getenv('HOME') returns nothing. The reason I want to do this is that in absense of configuration saying otherwise, I want to find variable files used by my application in /home/user...

How can I find the user's home dir in a cross platform manner, using C++?

How can I find the user's home directory in a cross platform manner in C++? i.e. /home/user in Linux, C:\Users\user\ on Windows Vista, C:\Documents And Settings\user\ on Windows XP, and whatever it is that Macs use. (I think it's /User/user) Basically, what I'm looking for is a C++ way of doing this (example in python) os.path.expandus...

Getting home directory in Mac OS X using C language

How can I get the path of home directory in Mac OS X using C language in XCode editor. ...

howoto fix working directory is always home? (python)

Hello guys! This is my first question. My python script opens and reads from a present text file using the following simple funct: open("config.ini", "r") As this is a relative path it is supposed to work because config.ini is placed in the same directory like the script is when it is launched, that should be the current working dir....

NFS home / .profile / 3 flavors of UNIX : best practices?

Three flavors of UNIX: Linux, Solaris, IRIX... one NFS mounted home directory. I'd like to have a (slightly) different .profile behavior based on the OS that I'm connecting to. I can hack something together, but I'd like to not re-invent the wheel if it's not necessary. Is there a best practice for splitting out .profiles sections base...

Local cpan builds

Hi, I'd like to use a home directory specific, non-root directory for stuff I install from cpan. How can I configure it? Normal CPAN configuration tries to install packages into /usr. After adding 'makepl_arg' => q[PREFIX=~/cpan_local], simple packages seem to build, but I cannot build a package that pulls its dependencies - the depende...

Proper usage of the windows user profile directory

I need to create a directory inside a windows users 'home' directory (c:\Documents and Settings\someusername\ or c:\users\someusername\). This directory will exist permanently but will only contain temporary files. What is is the best location for this directory within the users profile if I want to be a good citizen? I should note t...

Getting current user home directory on OS X?

How to find current user home directory on OS X? HOME environmental variable is not always set, for example when you do not run in console (GUI apps). For this reason I'm looking for a generic solution, one that will fall-back if os.environ['HOME'] is not set. There is a similar question (C) but it already has an accepted solution tha...