How do i get my mac to greet me

Discussion in 'Mac Basics and Help' started by jakustodus123, Jan 11, 2009.

  1. jakustodus123 macrumors newbie

    Joined:
    Jan 11, 2009
    #1
    I was looking into the speech functions of my imac and i was wondering if i could get my mac to greet me when it turns on or wakes up? or do i need some program from the internet?
     
  2. Trip.Tucker Guest

    Joined:
    Mar 13, 2008
    #2
    'say' for text to speech

    Use 'say'.

    This is very easy to do. First, open up Terminal and type 'say hello' (without the single quotes)
    You should hear a metallic voice saying hello. Typing man say will give you a list of available commands.

    So, to get your computer to greet you on login, you would do the following:

    1. In a text file enter something like say "hello master"
    2. Name/rename the file to greet.sh
    3. In a shell (Terminal), give the file executable parameters: chmod ugo+x greet.sh
    4. Open System Preferences, Accounts
    5. In your account settings, under Login Items, add the greet.sh script.

    There are a few ways to approach this scenario, but the above is certainly the most simple and will also expose some underlying technology under the GUI that will hopefully give you a taste to learn more and play with the potential in your Mac.
     
  3. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #3
    Agreed there, the say command is brilliant. All you have to do is create a little shell script that uses the say command, set it up to run at login (there are tools for making this sort of task easier), and enjoy!
     
  4. jakustodus123 thread starter macrumors newbie

    Joined:
    Jan 11, 2009
    #4
    k so im a bit of a noob but it wont let me save as .sh the closest i could get it was .sh.rtf then the operational parameters thing i don't get at all. can you please clarify what to do? thanks for the quick reply though
     
  5. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #5
    Are you using TextEdit? You need to make it plain text FIRST. Otherwise, the command-line interpreter won't recognize your shell script.

    As for parameters: That's easy. say takes as its parameter(s) the text to speak. For example:
    Code:
    say greetings
    OR
    say it's time to code!
    
    You get the idea.
     
  6. jakustodus123 thread starter macrumors newbie

    Joined:
    Jan 11, 2009
    #6
    All i have is textedit or do you mean in textedit write...
     
  7. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #7
    In TextEdit, you can write a plain-text document by going to Format -> Make Plain Text.
     
  8. TuffLuffJimmy macrumors G3

    TuffLuffJimmy

    Joined:
    Apr 6, 2007
    Location:
    Portland, OR
    #8
    right now text edit is in "rich formatted text" you need to change it to "plain text"
     
  9. jakustodus123 thread starter macrumors newbie

    Joined:
    Jan 11, 2009
    #9
    where do i enter this?
     
  10. Trip.Tucker Guest

    Joined:
    Mar 13, 2008
    #10
    In Terminal. Terminal is in Applications/Utilities
     
  11. TuffLuffJimmy macrumors G3

    TuffLuffJimmy

    Joined:
    Apr 6, 2007
    Location:
    Portland, OR
    #11
    you have to chmod the file in terminal
     
  12. jakustodus123 thread starter macrumors newbie

    Joined:
    Jan 11, 2009
    #12
    i tryed that it comes up with

    chmod: greet.sh: No such file or directory

    what did i do wrong?
     
  13. TuffLuffJimmy macrumors G3

    TuffLuffJimmy

    Joined:
    Apr 6, 2007
    Location:
    Portland, OR
    #13
    you need to type all the chmod stuff as it was displayed, then after that drag the greet.sh file from the finder into the terminal window.

    then press enter.
     
  14. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #14
    You're not in the folder where greet.sh lives. use "cd <foldername>" to change directories.

    EDIT: I keep forgetting about the drag to command line feature. So handy for those less CLI inclined!

    B
     
  15. TuffLuffJimmy macrumors G3

    TuffLuffJimmy

    Joined:
    Apr 6, 2007
    Location:
    Portland, OR
    #15
    /you/have/to/do/the/full/pathname/greet.sh
     
  16. Trip.Tucker Guest

    Joined:
    Mar 13, 2008
    #16
    Where did you save the greet.sh file to ? Move it to your home directory then try the command again. When you open up Terminal, it defaults to the user's home directory. In Finder, thats the folder with your user name.
     
  17. jakustodus123 thread starter macrumors newbie

    Joined:
    Jan 11, 2009
    #17
    well ive done all this and when i log in it just opens the text file
    did i miss something?
     
  18. JoshJosh117, Jan 11, 2009
    Last edited: Feb 17, 2016
  19. TuffLuffJimmy macrumors G3

    TuffLuffJimmy

    Joined:
    Apr 6, 2007
    Location:
    Portland, OR
    #19
    yes, you saved it as a text file (YOU HAD TO MAKE IT PLAIN TEXT!)
    you need to make the greet file save it as greet.txt (if it doesn't give you txt, and it gives to rft then you did something wrong_ then you have to rename it greet.sh
     
  20. jakustodus123 thread starter macrumors newbie

    Joined:
    Jan 11, 2009
    #20
    ya well when i rename it to greet.sh it turns it into greet.sh.txt and still nothing happens when i log in

    and i don't know if it relevant but when i do the chmod ugo+x greet.sh it just goes to another blank line in terminal, theres no comfermation of anykind
     
  21. TuffLuffJimmy macrumors G3

    TuffLuffJimmy

    Joined:
    Apr 6, 2007
    Location:
    Portland, OR
    #21
    right click the file. Click get info. rename the file from there.
     
  22. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #22
    That's normal. You'd get an error if there was a problem.
     
  23. Scottsdale macrumors 601

    Scottsdale

    Joined:
    Sep 19, 2008
    Location:
    U.S.A.
    #23
    Hey, thanks for the info. I am trying this to. I have definitely followed all of the steps. I have definitely made it plain text, and I have definitely changed it to greet.sh. I then log out, and when I log back in I just get the file opened into text editor.

    I read the entire thing and definitely saves as .txt, then changed to .sh.

    Please help.
     
  24. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #24
    Did you chmod the file?

    chmod a+x [drag the script to the Terminal window, then hit return]
     
  25. TuffLuffJimmy macrumors G3

    TuffLuffJimmy

    Joined:
    Apr 6, 2007
    Location:
    Portland, OR
    #25
    alright. I just made a script waaaay easier.

    just open up the script editor (I think it's in utilities) then type in
    Code:
    say "Welcome to Macintosh"
    Quit
    Then save it as greet, as an application and check the "run only" ticker.
    Then make it a log in item. Now when you log in that will launch.

    Hella easy!
     

Share This Page