Opening a Unix Executable File

Posted:
in macOS edited January 2014
I have downloaded a screensaver and inorder to install it I need to open a Unix Executable File. However my computer says there is no default app to do this and asks me what program to use. What program do I use?



By the way, just so you don't think I am downloading something dangerous I am downloading the screensaver from here.

Comments

  • Reply 1 of 12
    kickahakickaha Posts: 8,760member
    You open a Terminal window, navigate to the folder created by that .zip file, and type 'blimey_screensaver_osx' to run it.



    BUT... OS X screensavers have a specific format, and are named something like Blimey.saver, and are *not* just raw Unix executables.



    I peeked inside the executable, and saw the string 'blimey_screensaver.saver', which makes me think that maybe this is an *installer*? No idea. Doesn't look like a screen saver file to me though.
  • Reply 2 of 12
    Quote:

    Originally posted by Kickaha

    You open a Terminal window, navigate to the folder created by that .zip file, and type 'blimey_screensaver_osx' to run it.



    BUT... OS X screensavers have a specific format, and are named something like Blimey.saver, and are *not* just raw Unix executables.



    I peeked inside the executable, and saw the string 'blimey_screensaver.saver', which makes me think that maybe this is an *installer*? No idea. Doesn't look like a screen saver file to me though.




    Don't mean to ask for too much but I jut got a mac last week and I have no idea how to do anything you said. I know how to open terminal but when it comes to navigating and such I am a dimwit. Any more help would be greatly appreciated.
  • Reply 3 of 12
    You navigate with the command 'cd' (Change Directory, case sensitive!).



    so for example if you want to go to your home folder, you type something like this:



    Quote:

    cd /home/yourusername



    and you will be in your home directory where you will be able to execute or open anything in that directory, as long as you have the necessary permissions to do so.
  • Reply 4 of 12
    Quote:

    Originally posted by Gene Clean

    You navigate with the command 'cd' (Change Directory, case sensitive!).



    so for example if you want to go to your home folder, you type something like this:







    and you will be in your home directory where you will be able to execute or open anything in that directory, as long as you have the necessary permissions to do so.




    Hmm, not working. Let me make sure I am understanding. I open terminal and type in cd /home/John. I also tried cd /home/John Outwater (and without the space) It just tells me no such file or directory. I also typed those in with John/blimey_screensaver_osx and I got the same error.
  • Reply 5 of 12
    Quote:

    Originally posted by john.outwater

    Hmm, not working. Let me make sure I am understanding. I open terminal and type in cd /home/John. I also tried cd /home/John Outwater (and without the space) It just tells me no such file or directory. I also typed those in with John/blimey_screensaver_osx and I got the same error.



    Ok, well now I dragged the folder from the desktop into the terminal and it recognized it as a directory. I then tryed typing blimey_screensaver_osx but it said it wasn't a command. Then I dragged the folder in and before pressing enter I typed blimey_screensaver_osx and now it says cannot execute binary file.
  • Reply 6 of 12
    OK, let's be clear, we're talking about a .bin binary right? Because if it's some stuff Apple has created themselves, it's going to be a little different.



    Usually to execute a command in UNIX you type something like:



    Quote:

    sh blimey_screensaver_osx.bin



    Remembering of course, that it's case-sensitive. Let me give you an example.



    If you're running some UNIX OS or something like Linux, and you go and download Real Player, it will come in an executable format, such as .bin. Then you download that, say, to your home folder. In order to install it, you need to 'cd' to the place you downloaded it, so



    Quote:

    cd /home/geneclean



    and then type in



    Quote:

    sh RealPlayerLinux.bin



    in which case it will install. But if that screensaver has some special Apple-made .saver format, then I'm not sure if it will accept and execute the app using that command.
  • Reply 7 of 12
    I just looked into the file, and it does not seem to be a legit file to me. I would not go any further.
  • Reply 8 of 12
    Quote:

    Originally posted by Gene Clean

    I just looked into the file, and it does not seem to be a legit file to me. I would not go any further.



    I will take your word on it. Though this guy who runs the site and made the screen saver has never given me any reason to seem him as shady. I installed it on my PC (and quite easilly at that) and it seemed fine. I have contacted to the guy who runs the site (Joe Price) so hopefilly I can get in touch with him and find out more. I know it seems like a lot for a silly screensaver but it was more of a learning experience. Thanks for all your help, and if you guys notice a way to get it to work please fill me in.
  • Reply 9 of 12
    kickahakickaha Posts: 8,760member
    Oy.



    john, Gene knows Linux much better than OS X. They're close, but enough is different that it can be confusing to the new user if they get the wrong set of info.



    1) There is no /home on OS X. It is /Users/yourname that you want. It's exactly what you see in the Finder. I'm sorry you got sent on wild goose chase with that one. In the future, you can use the shortcut ~/ to get to your home directory on most any Unix-based system, and it will do the proper thing for you regardless of the local conventions.



    2) It is indeed a binary, even though it has no .bin suffix. If you look inside it, it's obviously a Carbon executable. More to the point, it is indeed an installer. Running it through strings pops up little goodies like .StartInstallerThread__Fv, .findScreenSaversFolderX__Fv, .makeTemporaryFolder__FP6FSSpec, ".setProgressBar__FP11ProgressBarUl, .CopyResourceOpenFiles__FUlsss|, 1.checkIfArchiveFileIsNewerThanThisOne__FPC6FSSpec , and so on. *WHAT* it installs, your guess is as good as mine. This is where the trust of the source comes into play.



    However, above I also pointed out that it contains the string blimey_screensaver.saver, which would be the appropriate bundle name for the Finder. Poking around a little bit more reveals a proper file structure for a .saver bundle down around byte 117800, including an Info.plist file at 121023 that is what you'd expect to see.



    Interesting - it looks like it might be using a Flash-as-screensaver engine named SWF Desktop from someone named screentime, and it will also be making a new folder at ~/Library/SWF\\ Desktop/. I wonder if you could just toss in your own Flash files and have them as screensavers? Ah, here's the company: http://www.screentime.com/



    I'll bet they use the above engine to get the Flash full screen, and then just wrapped it in a .saver structure to trigger it as a screensaver.



    Chances are very good that it is legit... but it *could* be an elaborate trojan. john, your call on this one. Contacting the developer isn't a bad idea unless you know and trust them directly.



    3) john, here's a very simple step-by-step to run it:



    - Move the blimey_screensaver_osx file to your Desktop in the Finder. This just makes sure that we can quickly get to it.

    - Open a new Terminal window

    - Type: cd ~/Desktop

    [This changes the working directory to be the Desktop folder in your home space, wherever it is.]

    - Type: ls -l blimey*

    [This lists all files that start with blimey, in a long format]

    - The output will show you whether it thinks you should be able to run it. You'll see an entry that looks something like:

    -rwxr-xr-x 1 kickaha unknown 1049123 2 Sep 10:34 blimey_screensaver_osx

    See those x's on the left? Those mean that the file is executable. If they aren't there, type: chmod ugo+x blimey_screensaver_osx

    [The output above is the same as what you see in the Finder's Get Info window, for the most part. Who owns the file, when it was made, what the permissions are, etc.]

    - Try the above ls -l again to check that it is now executable

    - Type: ./blimey_screensaver_osx

    [The ./ is shorthand for 'the current directory'. This ensures that that executable is the one getting run. Basic security check.]



    It will do its thing. It should install a new screensaver named blimey_screensaver.saver in ~/Library/Screen\\ Savers. You can now throw the file on your Desktop into the Trash.



    BTW, good catch on finding the drag-folder-to-Terminal-window-to-get-path trick. It's one I use often.



    Edit: Nevermind. I just noticed it's a PEF file. (Portable Executable Format). PEFs were used back in OS 9, and haven't been well supported under OS X in quite a while. That's why it gives you the 'cannot execute binary file' error, and there's not much you can do about it. Contact the developer and have them recompile it, but to a Mach-O format. Of course, you may want to let them know that there are better ways to install... but at the very least to name the bloody file as an installer. :}
  • Reply 10 of 12
    Quote:

    I'm sorry you got sent on wild goose chase with that one.



    It's true that I was thinking in terms of more traditional UNIX or UNIX-like systems, but the fact that there's no /home directory does not mean that such a directory does not actually exist. It does, just under a different name (I don't know why).



    If you remember, I was just telling him how it is on UNIX-like systems, and how you install stuff in UNIX-like systems from the command line, and not how you do it in this particular case, as I noted when I said this:



    Quote:

    If you're running some UNIX OS or something like Linux, and you go and download Real Player, it will come in an executable format, such as .bin. Then you download that, say, to your home folder. In order to install it, you need to 'cd' to the place you downloaded it



    So I was clear that this means more traditional UNIX or UNIX-like systems and not Mac OS X.



    So no, he was not sent on a wild goose chase with that one. But anyway, I digress.
  • Reply 11 of 12
    lundylundy Posts: 4,466member
    Quote:

    Originally posted by Gene Clean

    So I was clear that this means more traditional UNIX or UNIX-like systems and not Mac OS X.



    So no, he was not sent on a wild goose chase with that one. But anyway, I digress.




    You say it was clear, but I'll tell you that the minute I read your instruction for him to type "cd /home/yourusername" I KNEW he was off on a goose hunt before I even read his post. He's using OS X, not a "traditional UNIX or UNIX-like system".
  • Reply 12 of 12
    Quote:

    Originally posted by lundy

    He's using OS X, not a "traditional UNIX or UNIX-like system".



    No kidding? Thanks for pointing that out Clouseau. What a relief! Here I am, sweating that he's using Linux or some other UNIX-like OS, when in effect, he's using Mac OS X, another UNIX-like OS!



    What a surprise!



    ...and as I said, I digress. Help the guy if you can - if you can't, leave it at that.
Sign In or Register to comment.