How can i automate a set of terminal ssh commands to a clickable icon?

hi everyone,
i have set up an old mac mini as a headless server with my usb external harddrive connected to it, and with file sharing and ssh enabled.
on the same network from my macbook, i wish to be able to eject the external harddrive so that i can take the harddrive with me but leave the mac mini running.
i consider myself very competent with computers, but not to the level of coding and scripting. the macbook is running 10.7.4 and the mac mini 10.4.11
with the help of google, thus far, i have been able to figure out what to type into terminal on the macbook in order to achieve the desired result of ejecting the harddrive from the mac mini....
ssh [email protected]
(wait for the password prompt and then enter the password (Admin, same as username).
diskutil unmountDisk /dev/disk1
This works, however it's a laborious process to go through for something I will want to do fairly regularly and quickly.
Is there an easy way to consolodate this process into an icon i can just run from my dock, which will automatically run this code and enter the password? i have looked into writing the code into a "shell script" but could not figure out how to get it to enter the password or how to make it executable.
i would appreciate any advice! thankyou

This is what I did... it is quick and dirty!
1 exported the app "Project"
2 imported the app "project" and renamed it "project2". Doing this means that I won't cause any damage to his current application
3 examined authentication- currently set to Application Express. Application Express requires that the user and passwords match account created in the admin section of application express.
4 We're after a scheme that authorises based on a table of users in the application workspace schema. The authentication scheme just needs to know the name of a function which has a standard signiture such as fn_auth(p_username varchar2, p_password varchar2) return boolean;
In the SQL Workshop I looked at the "user" table to be used and noticed that it does not contain a loginname column so for this example based this on a case insensitive first name and last name concatenation (with a space in the middle).
Now we need to add a simple authenticate function...
create or replace fn_auth (p_username varchar2, p_password varchar2) return boolean is
begin
for x in(select 1 from student where upper(trim(first_name' 'family_name))=upper(p_username) and upper(password)=p_password) loop
return true;
end loop;
return false;
end;
5 And finally modify the app to use this new function. Add a new scheme and in the Login Processing section of the ahthentication scheme modify the function to
return fn_auth
6 As an aside, I also added a report of user names and their passwords which is shown on page 101 if the user is running in debug mode. Obviously, this would need to be stripped out when the app was released to production. This will not show if the URL is navigated to and the user is not logged in as an APEX developer by using a condition based on a funtion body and the following to determine whether the app is being run for a user or for a developer:
IF APEX_Application.g_edit_cookie_session_id IS NOT NULL THEN return true;
ELSE
return false;
END IF;

Similar Messages

  • Apple Mail: How can I automatically set a signature, depending on the sender, NOT on the account?

    Apple Mail: How can I automatically set a signature, depending on the sender (have several for one account), NOT on the account?
    I have some comma-separated senders in my Apple Mail accounts, some for business, some for private (using the same account). When I'm sending a business mail, I would like to append my business signature, when I send a private one, either nothing, or a fun signature.
    Best,
    Berlin1892

    karenbee,
    Here's the solution for PCs: Tools>Options, then click Sync in the Options window. Good luck.

  • Files that used to be visible are now hidden in Mavericks. How can I change the setting to view the same files as before? I do not need the hidden files that are typically invisible.

    Files that used to be visible are now hidden in Mavericks 10.9.1. How can I change the setting to view the same files as before? I do not need the hidden files that are typically invisible.
    I am having trouble locating such files as PDF's INDD, AI etc. When I view all hidden files and try to open it in the program..it looks like it is really not on the drive. Has anyone come across a solution?

    You may need to rebuild permissions on your user account. To do this,boot to your Recovery partition (holding down the Command and R keys while booting) and open Terminal from the Utilities menu. In Terminal, type:  ‘resetpassword’ (without the ’s), hit return, and select the admin user. You are not going to reset your password. Click on the icon for your Macs hard drive at the top. From the drop down below it select the user account which is having issues. At the bottom of the window, you'll see an area labeled Restore Home Directory Permissions and ACLs. Click the reset button there. The process takes a few minutes. When complete, restart.   
    Repair User Permissions

  • How can I automatically prepend comment blocks to stored procedures?

    How can I automatically prepend comment blocks to stored procedures?
    In my organization, the standard is to comment all stored procedures with a comment block that looks like this:
    /*-- =============================================
    -- Created by: <Owner>
    -- Created date: 01/08/2012
    -- Purpose: Inserts new setting value, code and description
    -- Modifications:
    -- Modified by: <Owner>
    -- Modification date: 01/08/2012
    -- Purpose: Inserts new setting value, code and description
    -- =============================================*/Thanks.
    select * from v$version;
    BANNER                                                                        
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production             
    PL/SQL Release 11.2.0.2.0 - Production                                          
    CORE     11.2.0.2.0     Production  Edited by: xDeviates on 01-ago-2012 7:37
    Edited by: xDeviates on 01-ago-2012 8:31

    Hi,
    If I want to write a package called pk_fubar, I copy the following script and call it fubar.sql
    --     ==========  package_name.sql starts here  ==========
    --     Package_Name.sql
    SPOOL     &home_dir\package_name.lst
    PROMPT     .     H   H  EEEE     A    DDDD
    PROMPT     .     H   H  E       A A   D   D
    PROMPT     .     HHHHH  EEE    A   A  D   D
    PROMPT     .     H   H  E      AAAAA  D   D
    PROMPT     .     H   H  EEEEE  A   A  DDDD
    @@package_name_head
    PROMPT     .     BBBB    OOO   DDDD   Y   Y
    PROMPT     .     B   B  O   O  D   D   Y Y
    PROMPT     .     BBBB   O   O  D   D    Y
    PROMPT     .     B   B  O   O  D   D    Y
    PROMPT     .     BBBB    OOO   DDDD     Y
    @@package_name_body
    SPOOL     OFF
    @@package_name_test
    -- EXIT
    --     ==========  package_name_head.sql starts here  ==========
    CREATE OR REPLACE PACKAGE     pk_package_name
    AS
    FUNCTION     sign_in
    (     in_user_name     IN     VARCHAR2
    ,     in_password_txt     IN     VARCHAR2
    RETURN     PLS_INTEGER
    END     pk_package_name;
    SHOW ERRORS;
    GRANT     EXECUTE     ON pk_package_name     TO schema_name_some_role;
    --     ==========  package_name_body.sql starts here  ==========
    CREATE OR REPLACE PACKAGE BODY     pk_package_name
    AS
    --  Procedures related to SCHEMA_NAME ...
    --  2012 July 23 -- Package started with proc_x.  (Frank Kulash)
    --     **   local procedures and variables   **
    --     **   x   **
    --     **   initialization section   **
    --     The following code is executed once per session, when the package is loaded.
    BEGIN
         set_var     ( 'DT_FMT_TXT'
              , 'YYYY-MM-DD HH24:MI:SS'
    END     pk_package_name;
    SHOW ERRORS;
    --     ==========  package_name_test.sql starts here  ==========
    --     PACKAGE_NAME_TEST.SQL -- Test procedures in schema_name.pk_package_name
    SET     DOCUMENT     OFF
    SET     SERVEROUTPUT     ON     SIZE     10000
    ALTER SESSION     SET NLS_DATE_FORMAT = 'DD-Mon-YYYY HH24:MI:SS';
    SPOOL     @@package_name_test.lst
    PROMPT
    PROMPT     ***********************
    PROMPT     **  Testing x  **
    PROMPT     ***********************
    PROMPT
    SPOOL     OFFThen I replace package_name with fubar, and schema_name with the actual schema name. Finally, I cut off parts from the end to create fubar_test.sql, fubar_body.sql and fubar_head.sql. You could easily include a multi-line procedure comment template in this script. Every time you add a procedure or function, ciopy and paste that comment template, and then modify the copy.

  • How can I automatically forward tweets via ios6 to Linkedin?

    How can I automatically forward tweets via ios6 to Linkedin?

    Login to your account via webmail and look for forwarding options.
    It's not something you do within Thunderbird.
    ''so that I can read them if necessary while I am on holiday''
    What difference does it make to read them from another account than your ordinary one when being on holiday?
    ''lost all my e-mails and history while my computer crashed''
    Make sure to backup your Thunderbird profile on a regular basis.
    http://kb.mozillazine.org/Thunderbird_:_FAQs_:_Backing_Up_and_Restoring
    ''I don't know how to install my e-mail on my smartphone''
    Ask someone for help who knows.
    ''set up an automatic message when I am on holiday''
    https://support.mozilla.org/en-US/kb/vacation-response

  • How can you automate the monthly opening of MM periods

    How can you automate the monthly opening of MM periods ????????????

    RMMMPERI accepts a period/year or a date.
    If you enter a date the period is derived by it.
    1. create a variant and check the attribute 'selection variable' for the parameter date. Then click the button 'Selection variables' and set the current date. Every time this variant is used the parameter DATE is filled with the current date.
    2. create a job for RMMMPERI with the variant created in the preceding step. Set it as periodic.
    If you're not using a fiscal year variant simply schedule it as monthly (to be executed the first day of the month).
    If you are using a fiscal year variant you'd have to define a calendar with only the first day of each period defined as working 
    day and use it in the periodicity restrictions.
    Another possibility:
    Write a very simple ABAP which run daily to check if the period has changed and submit RMMMPERI.
    Regards
    Chander

  • How can I automatically close a dialog box using Javascript after I click the OK button to submit it?

    How can I automatically close a dialog box using Javascript after I click the OK button to submit it? I don't want to have to X out of the dialog box after I am done.
    Thanks
    Linda

    JS can not interact with open dialogs in any way, unless it's a dialog
    created in JS using the Dialog object.
    On Thu, Jul 24, 2014 at 11:13 PM, lindaeliseruble <[email protected]>

  • How can i distinguish between set or tuples from incoming filters in a calculation

    How can i distinguish between set or tuples from incoming filters in a calculation. i am using descendants function with the leaves option to calculate some project revenue cause there is different calcuation method on sub projects the sum on the main project
    should reflect the sum of the sub project with all different methods.
    this works fine until i try to select 2 sub projects at the same time. i am getting the standard currentset dosnt work cause its a set.
    is there i way i can check if its a multiple select or not and handle it a different way

    Hi,
    Check the following link about Multi Select Calculations written by Mosha.
    http://sqlblog.com/blogs/mosha/archive/2007/01/13/multiselect-friendly-mdx-for-calculations-looking-at-current-coordinate.aspx
    Best regards...
    Chandima Lakmal Fonseka

  • How can i change the setting on my ipad 2? Whenever i read stories in the net after awhile it goeson standby and i have to keep on entering the passcode. Please help.

    How can i change the setting on my ipad 2? Whenever i read stories in the net after awhile it goeson standby and i have to keep on entering the passcode. Please help.

    Settings>General>AutoLock>Never. Now it will not sleep at all so change it back when you are done reading.

  • When I tap on the to line to add an address sometimes people's names come up that I don't have as contacts.  How can I change this setting?

    When I tap on the to line to add an address sometimes people's names come up that I don't have as contacts.  How can I change this setting?

    The only way that I know currently know of to remove old or incorrect email addresses from the Mail app is to reset the iPad back to factory defaults, which I assume that you don't want to to. You could try leaving feedback for Apple and maybe one day we'll day be able to edit them : http://www.apple.com/feedback/ipad.html#ipad

  • How can I (automatically) import new photos of the photostream on my local disc (Mac)? Don't want to use new icloud service. Simply import.

    New Photo app on Mac.
    How can I (automatically) import new photos of the photo stream on my local disc (Mac)? Don't want to use new icloud service. Simply import.
    With iPhoto every new photo was automatically imported and saved on my local disk (with "full resolution" that's what I only need). In the new photo app I have still my photo stream and when I move a photo (drag and drop from the photo stream) to a new album it indicates a (plus). My understanding is that the photo is now copied to my local disk. But when I deleted the photo in the photo stream it was also deleted in the album !?
    If that is the case I can use the photo stream only until I reach the max of 1.000 photos, then I have to delete photos and I will have no copy left.
    How can I "physically" copy a photo of the photo stream to my local disk? I just want to "transfer" all pictures taken with Ipads, Iphones to my central storage on the Mac. Please don't propose to connect it via iTunes (cable) to the Mac.
    Any other suggestions?
    thx
    -Tom

    The amazing device cannot do it because no amazing developer has written an app for it.  There is some interest, others have asked, but i have a hunch that the market is fairly limited, and no developer has jumped at the chance just yet.
    Any sort of tethered approach means try to feed the material to the pad thru the cck.  Which means the app would have to use the allowed/existing cck pathway in a manner that does not violate the sandbox rules.  That may be the problem.

  • My main PC with my Itunes Library just crashed.  I still have all my music on Apple TV, Ipod Touch (Gen 2), and Iphone 4 (verizon).  How can I get everything set up on a new PC and working ?

    My main PC with my Itunes Library just crashed.  I still have all my music on Apple TV, Ipod Touch (Gen 2), and Iphone 4 (verizon).  How can I get everything set up on a new PC and working ?

    I downloaded Itunes 10.2 on new desktop, ran sync with my ipod touch (Gen 2) and have all my music on new PC.  Just can't get it to sync with my Apple TV (Gen1).  I have made music purchases on Apple TV and cannot get them to Ipod/Iphone?  Help

  • I no longer want to merge my work laptop with my icloud account on other devices.  How can I change the setting for the laptop?

    I accidentally agreed to set up my work laptop icloud account to merge with my other devices and want to keep the work information separate.  How can I change the setting for the PC at work?

    Sign out of iCloud.

  • I made a big mistake to change the setting of my Mac book pro to "me only". Now ofcourse It cannot open the login page, for how would the mac know it is me? How can I change the setting back to "everyone"?

    I made a big mistake to change the setting of my Mac book pro to "me only". Now ofcourse It cannot open the login page, for how would the mac know it is me? How can I change the setting back to "everyone"? I have back up in the past but the last month I have not. I really want to keep the data.
    So how can I go in and change the setting, It stays ofcourse at the apple screen with wheel. All info is there and the computer works fine, just cannot use it or have been able to log in.

    wjosten is spot on.  If you really want iCloud, then you will need to acquire a new or second hand MBP that can run Lion.
    Ciao.

  • How can I do a set ?

    Hello people,
    How can I do a set ? like ... set = {1,2,3,4,5,6,7,8,9,10} I need to know that becouse in one of my programs there is a menu and the user can not choise another number .

    I don't want to give the impression of being a wise-crack - but um, that isn't a set, that's an array.
    Would this be a set containing only 2 items of value 1 and 2?
    int[] myStuff = {1,2,1,2,1,2}
    No, it would not, it would be a 6-element array containing duplicate values.
    A set can be created using the java.util.Set and related classes/interfaces.
    Depends on what you really meant.

Maybe you are looking for

  • KT6 Delta-LSR lock ups

    Hi again , i was having trouble with my KT6 Delta-LSR not reading the correct cpu speed . ie it read 1.1 when it was a barton 3200 , I was advised to turn fsb up to 200 , which i did and it displayed the correct cpu, but i am getting lots of lock ups

  • Script: chrome://browser/content/places/browserPlacesViews.js:229

    Greetings! I run Firefox on Windows XP3 Home, and I would appreciate your advice on some problems I have. When I click on Bookmarks, nothing happens for about 30 secs, then the following message appears; "Script: chrome://browser/content/places/brows

  • PHP results pagination

    Hi All, I'm using the following script to display search results on various pages, but there are so many pages of results the list of pages takes up too much room, see; http://dev.merco.co.uk/node/9 I would like the list to look more like this; 1  2

  • How do you unlock for attachments

    An arduous search, but the critics say, my pdf files are not attaching in an email due to The XI Reader. In any browser, (IE, FF,), in any email acct., the pdf files won't attach in an email. I've uninstalled twice, tried to get Adobe 9, could't for

  • More elegant solution to reporting query?

    I was recently asked to produce a one-time report that would identify any products that were or are currently being sold/stocked out of two different locations (821,822) at once, and where the product is currently is in stock at both. The table layou