How to modify dock icons to execute additional commands?

I'd like to always start Google Chrome in Incognito mode. In Ubuntu, I'd just modify the Google Chrome shortcut and append "--incognito" at the end. With Windows, I'd just append "-incognito" to the shortcut, and both of these solutions worked for these operating systems...
Can someone tell me how to do this for the dock icon in Mountain Lion?

In Terminal, copy/paste the following:
open -a "Google Chrome" --args --incognito
You could wrap it up in an Automator Application with a Run Shell Script action, or just make it a shell script and make it executable by using the command extension. Copy the following into a Text Editor and save it as text with .command as the suffix.
#! /bin/bash
open -a "Google Chrome" --args --incognito
An Automator application would be less obtrusive as it won't open Terminal first.

Similar Messages

  • How can I dock icons for every opened windows?

    Hello all,
    First time poster here and first time owner of Mac.  I want to know how I can get all opened windows to show as icons on the dock.  On a Windows OS, any opened window will have an icon on the Taskbar.  Does a Mac OS have the same feature?  And no, I don't want to use the old Expose.  I want to be able to get to an opened window that is hidden behind another window by just one click, instead of moving windows around (so that I can get my intended window to be where I can click on it), or instead of using Expose.
    One way to get the opened windows to appear on the dock is to miminize it.  I find that to be burdensome, especially if you're openeing a lot of windows quickly.  I want to be able to switch between opened windows in just one click.
    Any help would be appreciated.  Thank you.

    You need to either control-click on the application's Dock icon and then regularly click on the item representing that window, or to click and hold the application's icon until the menu appears, and then releasing the button when the cursor is over the menu item.
    (71155)

  • How to modify the icon of the main frame in JavaHelp?

    I can modify the title of the main frame, but can I modify the icon of the main frame? Thanks a million.

    hi,
    look at the Frame's method setIconImage(Image anImage);
    ;)

  • How to remove dock icon on Mac when main stage is hidden?

    I'm trying to implement a "minimize to system tray" functionality, where when the user closes the app's window, it disappears from the task bar and can be retrieved from the system tray. This works great on Windows and Linux, but on the Mac, the window closes, but the app's icon remains in the dock. Clicking on the dock icon focuses the app, but (perhaps unsurprisingly) does not open the window, which is a pretty bad user experience. Opening the window from the system tray works, so if I could just hide the dock icon I'd be there.
    I found the undocumented PlatformImpl.setTaskbarApplication(false), but it doesn't seem to have any effect. Probably only does something at launch time.
    Bug or feature?
    (I'm using the new Platform.setImplicitExit(false) to keep the app from exiting when the main stage is hidden, but I see the same behavior when using the "create an off-screen dummy stage" kludge in 2.1.)

    Whatever you did last time didn't work - don't try that again!
    Back up everything before you begin.
    Bootcamp Assistant (in Applications/Utilities) will remove Windows partitions, however I expect in this state it will remove the Windows 7 partition. It may resolve the issue, but it will delete all the Windows data. Perhaps Bootcamp Assistant does something extra compared to deleting the partition by hand?
    If it still has the multiple boot icons you will have to erase the HD completely and then restore your OS and user data.
    Do you really want to erase & start over for this minor issue?

  • How to invoke BASH shell and execute a command in that shell in Windows 98

    Hello, I have a problem and if somebody will help me, I will be very glad. Thank you.
    I am using BASH shell on Windows 98 OS by means of CYGWIN. And I want to invoke this BASH shell and execute a preprogrammed command in the shell (./scan fileName.txt) from a JAVA program. But so far, I am not sucessful. I can not read or write anything from / to BASH shell. It either blocks and freezes (When I use waitFor( ) ) or appears and disappears without executing scan command (When I do not use waitFor( ) ). My code is like this:
    // This method is used for compiling a file.
    // It invokes BASH shell and executes "./scan fileName.txt" command
    public void compileFileMethod () {
    try {
    Process proc = ( Runtime.getRuntime() ).exec ("C:\\MyDocuments\\CYGWIN.BAT); //I also tried to add -c ./scan fileName.txt after .BAT );
    // I also tried to write "C:\\MyDocuments\\BASH.EXE" but it did not help
    OutputStream ostr = proc.getOutputStream();
    BufferedWriter bw = new BufferedWriter ( new OutputStreamWriter (ostr) );
    InputStream istr = proc.getInputStream();
    BufferedReader br = new BufferedReader ( new InputStreamReader (istr) );
    InputStream errorStr = proc.getErrorStream();
    BufferedReader errorBr = new BufferedReader ( new InputStreamReader (errorStr) );
    bw.write("scan case40.10.txt"); /* I am trying to input the scan command to the shell,but it is not working*/
    bw.flush();
    Vector list = new Vector (1) ;
    String str;
    while ( (str = br.readLine() ) != null) {
    list.addElement(str);
    } // End of while
    Enumeration enumForList = list.elements();
    while ( enumForList.hasMoreElements() ) {
    String tempString;
    tempString = ( String ) enumForList.nextElement();
    System.out.println(tempString); // I am trying to read the outputs of the scan command but it is not reading (I can not see any output)
    I tried with and without waitFor( ), it did not work
    // wait for command to terminate
    proc.waitFor();
    // close streams
    br.close();
    bw.close();
    errorBr.close();
    } // End of try
    catch ( IOException ioe ) {
    JOptionPane.showMessageDialog (null, "Input / output error occured while compiling file ", "Error", JOptionPane.ERROR_MESSAGE);
    } // End of catch
    catch ( SecurityException se ) {
    JOptionPane.showMessageDialog (null, "Security error occured while compiling file ", "Error", JOptionPane.ERROR_MESSAGE);
    catch ( InterruptedException ie ) {
    JOptionPane.showMessageDialog (null, "Interruption error occured while compiling file ", "Error", JOptionPane.ERROR_MESSAGE);
    } // End of method compileFileMethod
    // Thank you for your helps and time.

    You cannot invoke BAT files directly, you have to invoke the program that run those files which is your Windows 98 shell. For example (under windows 2000), i would invoke "cmd.exe sricpt.bat some args", rather than "script.bar some args".
    Hope this will help you out.

  • How to consolidate Dock icons

    I have too many icons in my Dock, so many that I have trouble knowing what most of them are (they're just too tiny). How can I consolidate similar icons into one file?

    Topher Kessler wrote:
    You can organize the Dock somewhat by creating aliases of your applications into folders and then adding the folder to your Dock. For instance, if you have several games you like then you can create a folder called Games and add aliases to the programs in that folder. Then when you add the folder to the Dock it will appear as a stack that will open as a list, grid, or fan, that will allow you quick access to all of the contained aliases.
    This is what I was looking for, putting, say, five files into one. I'm going to bed now, but I'll be studying your ideas tomorrow. I don't know how to do everything you suggest now, but I think I'll be able to work things out. Thanks.

  • How to stop Dock Icons from enlarging

    Would someone have the patience to explain to me how I can get the icons on my Imac from enlarging when the mouse goes over the icons. 
    Thank you.

    Un check this box.

  • Running shell scripts/apple scripts without dock icon?

    Is there anyway to hide the ugly dock icon when executing shell scripts (or apple scripts)?
    I have a script I execute every time as a login item, and it bounces in the dock whenever I log in. Is there any way to hide it ?
    Thanks,

    Thanks to both people who answered.
    You both gave me useful workarounds to my problem.
    Renaming the scripts to be 'foo.command' was very hepful and useful to know. I tried this and it does indeed work. I may use this in the future.
    I also had a play around with applescript and the automator to achieve similar results.
    I agree that double clicking to run the file and also edit it is mutually exlcusive - I'm sort of trying to work out how I could make it do 'either/or' as I choose. In the Windows world i'd have the option of setting 'open' to run the script (assuming I'd got cygwin installed and had assiciated it) OR 'Edit with vim' if I wanted to edit the file (assuming vim was installed!).
    Unresolved issue is that I'm still unable to get VIM to be associated with a .sh file.
    The way I would envisage it working in Mac world would be to be able to right click on foo.sh -> Open with... and have a list to select from immediately there like..
    Text Edit
    Vim
    Terminal (default)
    and be able to somehow add and remove apps from the list and change which is the default.
    My issue is that I don't seem to know how to get other apps than TextEdit to appear in the list - I suspect I need a better understanding of how these file/application associations work and are configured.
    Regards
    Mark

  • How to force safari to open a new window when dock icon is clicked

    If Safari is already running on my MacBook Yosemite, and I click on the Safari icon in the dock, the Safari window is brought forward.  The behavior  I want is whenever I click the safari icon on the dock, is that a new safari browser window is opened.  I don't see this option in preferences (or any keyboard  mouse combination) that would make the dock icon open a new browser window.    (an option is available for new windows if you click on a hyperlink, but not if you click on the dock icon) .
    p.s. And I don't want to first  have to place focus on the current running safari and then click File New...too many steps when all I want is a new browser window
    Thanks in advance

    Hi css,
    Welcome to the Apple Support Communities!
    I understand that you would like to click on Safari in your Dock and have it open a new Safari Window. As you said in your post, clicking on Safari in the Dock brings the Safari window forward. There are a couple of possibilities to help resolve this situation. You can control-click (right click if enabled) on Safari in your Dock which will give you the option to open a new window. You can also click and hold on Safari, otherwise known as Press, to display these same options.
    Mac OS X: Additional features of the Dock - Apple Support
    Mouse clicks and key combinations for the Dock
    Control-click
    Reveals contextual menu for item. Menu choices vary per application or file. When used on Dock separator, it reveals Dock preferences. There you can turn magnification and hiding on or off, change the position of the Dock on screen, and change the minimization effect. Choose Dock Preferences to see more options.
    Press
    Reveals contextual menu for item. Menu choices vary per application or file.
    Cheers,
    Joe

  • How to stop printer icon staying in dock everytime i print

    hi all
    basically i want to know to stop how to stop printer icon staying in dock everytime i print
    whenever i print it stays there, and doesnt disspear everytime automatically

    When you print your next document, right click or control click on the printer icon in the Dock. This will provide you with a menu of options. One of them is Auto Quit. Select it. Quit the printer queue and then print another document. The printer "app" will now quit after a successful print.
    Hope this helps.

  • How to disable/control the dock icon sizes when hovering over them?

    Hello.
    How do I disable/control the dock icon sizes when hovering over them? They are too big when enlarged with my mouse cursor.
    Thank you in advance.

    BDAqua wrote:
    Hi,
    Apple icon at the top left of the screen>Dock>Dock Preferences>Size & Magnification.
    Thank you!

  • How can i rearrange dock icons in Yosemite

    I can no longer rearrange dock icons by clicking and dragging.  How can you rearrange them in Yosemite?

    Try doing a Dock restart using the following Terminal command:
    killall Dock
    Log out/in and test. If that doesn’t work, you need to look in your user Library/Applications Support/Dock for the .db. Use the Finder “Go To Folder” command. Enter ~/Library/Applications Support/Dock.  Move the .db to your desktop.
    Then try a dock reset.
    Applications/Utilities/Terminal enter the command
    killall Dock
    Log out/in test. If it works okay, delete the .db from the desktop.
    If the Dock is the same, return the .db to where you got them from, overwriting the newer ones.

  • HT204406 how does the iTune icon present itself onto the dock. ?  And how does it play without being requested ?

    how does the iTune icon present itself onto the dock. ?
    And how does it play without being requested ?

    1. The SCB-68 is just a terminal block; it does not measure anything. The measurement is made on the board connected to the SCB-68.
    2. Computer-based data acquisistion devices and 480 V motors with solid state speed controls do not "play nice," as the kids say. The connections you are trying to make may well end up with a fried data acquisition board, fried computer, and MOST IMPORTANTLY a fried USER!
    Ground loop problems may produce noisy measurements or may destroy all the low current devices (like the computer) in the system.
    Signal conditioners are not only to reduce noise but also to provide safe isolation between the high voltage and high power parts of the system and the more sensitive parts.
    A thermocouple is a voltage generating device. The measurement system measures that voltage (typically millivolts) and independently measures the temperature of the "cold junction" of the thermocouple. The temperature at the hot junction of the thermocouple is calculated as Temperature(TC voltage difference) - Temperature(cold junction). If currents flow through the TC wires, due to ground potential differences between the motor frame and the computer ground for example, the voltage drop from Ohm's law is added to the TC voltage and will produce temperature errors. TC wire may have significantly higher resistance than wires used for most elelctrical signals so the interfering signal may be greater than the desired signal.
    Lynn

  • How to eliminate default Document, Downloads Dock icons

    As I have 5 partitions, that's 10 Dock icons I don't use.
    Thanks,
    humanengr

    Thanks -- that does most of it -- the Document and Downloads icons for all but the startup partition have not reappeared. Is there a way to permanently delete the D&D icons that belong to the startup partition?
    Also, can someone please point me to detailed instructions online anywhere on Leopard? Or at least detailed instructions on new features introduced in Leopard?

  • How to make the icons in the dock become bigger when I hover over them?

    I see in my friend's Mac that the icons in the dock become bigger when the user hovers over them with the mouse pointer. Mine don't change when I hover over them. Am I missing something?

    Go to the Apple Menu > System Preferences > then click on the Dock icon.
    Check the box for Magnification:
    Close the Preferences Pane and you should be good to go.
    MtD

Maybe you are looking for

  • Mail filling disk space

    Hello Looking at a friends mac air, her aol account is up the spout. Mail has created many duplicate recovered messages. In system log I get RecoveredMessage: Error deserializing message property list for file ... Unexpected character M at line 1 ...

  • The screen saver too dark

    ok i had my e65 a fews days now and i have nearly figured out everything as in all the functions with the exception of these, which i need help with. 1, when the sreensaver comes on i notice that its too dark and i mean, if i wanted to quickly look a

  • Errors during single user UNIX startup

    When I boot into single user mode on the iMac G5, I get two errors. AppleU3: Warning: Platform-chip-fault expected, but not found and... CSRHID Transition Driver:: Probe: -s CHRHID Transition Driver:: Probe booting in single user .. do not match Anyo

  • Are there reliable apps for tracking Photoshop job time?

    I am a pro retoucher and often juggle multiple jobs for various clients at any time. I typically create or edit an image, submit for approval & await feedback. I often charge by the hour. Looking for a plugin or app that could track the time I spend

  • Iphone lässt sich nach fehlgeschlagener wiederherstellung nicht mit itunes verbinden

    ich wollt mein iphone vorm wiederkauf nochmal auf urzustand zurücksetzen! ich wollt über itunes das gerät wiederherstellen! ich habe wiederherstellen gedrückt und kurz vorm ende des prozesses sagt mit itunes (wiederherstellung fehlgeschlagen) ok dach