Re: Filesystem Hack: Set Identity to Whatever You Want
Posted: Mon May 23, 2011 8:26 pm
Pretty awesome! (Apart from not being able to open files)
Code: Select all
xdg-open
Does it work for both Linux and Mac?nevon wrote:Use the following instead. That'll open the directory, file or URL in whatever the preferred application is:Code: Select all
xdg-open
Don't think so, XDG is what is now freedesktop.org is. They work on interoperability for desktop environments using X. Mac doesn't use X, so it doesn't work with that. OS X does provide the similar command "open", though.kalle2990 wrote:Does it work for both Linux and Mac?nevon wrote:Code: Select all
xdg-open
Yeah, I read that the Mac command is "open" somewhere, and now both you and BlackBulletIV told me I'll see if I can use the saving directory value to find out if it's either of those, as I just saw they are different on the wiki.Robin wrote:Don't think so, XDG is what is now freedesktop.org is. They work on interoperability for desktop environments using X. Mac doesn't use X, so it doesn't work with that. OS X does provide the similar command "open", though.
I should have been more specific. xdg-open would be a replacement for gnome-open. xdg-open will work in most Linux environments (and possibly BSD and what have you as well, but obviously Löve doesn't support those platforms).kalle2990 wrote:Does it work for both Linux and Mac?nevon wrote:Use the following instead. That'll open the directory, file or URL in whatever the preferred application is:Code: Select all
xdg-open
I think the only way to detect whether the operating system is Mac is by checking a few common root folders that are on a Mac (and not on Linux, unless someone's creating new root folders for some reason), like "/Users", "/System", "/Applications", and "/Library".kalle2990 wrote:I'll see if I can use the saving directory value to find out if it's either of those, as I just saw they are different on the wiki.