4

Is it possible to set up multiple desktops on a Mac?

3 Answers 3

8

Well, Spaces does that.

Although I don't know what "Ubuntu-style multiple desktops" are.

2
  • You (and windows) can switch between them with the keyboard or clicking on the pager. So yes, Spaces it is. Jun 17, 2010 at 19:04
  • @Andrew one of the problem I am facing is while running test each test launching browser it automatically causing switch to other desktop. Is there any way to turn it off ?
    – Anil Namde
    Jul 29, 2016 at 7:03
3

As already pointed out, Spaces does it. Hyperspaces enhances it (shareware).

3
  • Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – Ivo Flipse
    Jul 15, 2012 at 21:41
  • Ivo, i've been on StackOverflow since it was alpha, I do know about this, but I seriously believe that the link you provided, doesn't fully apply here. I'm not linking to a reply. i'm not linking to a blog. I'm linking to a company. When/if that company no longer exists, then the whole answer won't be useful anyway. Jul 15, 2012 at 21:45
  • 2
    Guess you're right, I just wanted you to add some additional information, because simply linking to a product is not really a great answer.
    – Ivo Flipse
    Jul 15, 2012 at 21:47
0

Ubuntu (X-window manager) style multiple desktops means that you get new desktops to clutter. I implemented it on MacOS with a simple shell script (below). It does require root access to configure. (Smoke and mirrors using a symlink to a folder containing the real desktop folders). I use Automator to map the shell script to four hotkeys.

Only disadvantage I've found is that the "Desktop" alias in the left-hand finder column needs to be replaced with an alias to the real desktops folder, e.g. folders named Desktop1, Desktop2, etc.).

I don't like spaces, because all it does is provide different window to segregating running apps while viewing the same cluttered desktop.

If you use my script and and want to also use Spaces at the same time, I suggest modifying my script to name my script's desktops something like DesktopA, DesktopB, etc., because spaces names Desktop1, Desktop2, etc. to minimize confusion as to where you are (or have put things).

Here's the script. (And I recommended do have some experience w/Unix sysAd or get hep before trying it.) I've used it on High Sierra and Mojave for almost a year without trouble.)

# Jeff Bloomfield - 2/23/2021
# [email protected]

#
# Setup Instructions:
# 1. Make the directory $DESKTOP_DIRS as $USER with rwxr-xr-x permissions.
# 2. As root, mv $HOME/Desktop $DESKTOP_DIRS
#    Root needed because of existing extended permissions "everyone deny delete".
#    You can see extended permissions with ls -led.
#    The mv should keep the directory permissions and ownership as they are.
# 3. As $USER, make the empty directories for your new alternate desktops in
#    $DESKTOP_DIRS
#    Name the alternate desktop directories DesktopN, where N is the desktop
#    number (or character, I suppose) you intend to pass in chdt's argument.
# 4. You might want to give your alternate desktops the same extended perms as
#    your original Desktop directory. See ls(1) for pointers to more information
#    on this [squirrley] topic.
# 5. You can map chdt to hot keys using Automator workflow scripts.

#    Usage:
#       chdt N
#    where N is the desktop number or suffix
#
#    Example:
#       chdt 2
#    Changes the active desktop to the contents of $DESKTOP_DIRS/${DESKTOP_NAME}2

    PROG=$(basename $0)

    DESKTOP_SYMLINK=$HOME/Desktop
    DESKTOP_DIRS=$HOME/Desktops
    DESKTOP_NAME=Desktop    # Used here to set the basename of the desktop
                            # as in Desktop1, Desktop2...DesktopN, etc.

    DesktopNum=$1

# Catch some errors and exit with an error message:

    # Warn me in case the OS does some sneaky things like recreate the Desktop
    # directory or some other untoward behavior I don't know about yet.
    if [ ! -L $DESKTOP_SYMLINK ]; then
        echo "$PROG: $DESKTOP_SYMLINK is not symlink or does not exist."
        exit 1
    fi

    if [ ! "$DesktopNum" ]; then echo "$PROG: Missing desktop argument:"; \
                                 echo "        $PROG desktop"
        exit 1
    fi

    if [ ! -d $DESKTOP_DIRS/$DESKTOP_NAME${DesktopNum} ]; then
        echo "$PROG: Desktop${DesktopNum} is not a directory or does not exist."
        echo exiting...
        exit 1
    fi

# Do the work:

    if ! /bin/rm $DESKTOP_SYMLINK; then
        echo "$PROG: Failed to remove symlink \"$DESKTOP_SYMLINK\""
        echo exiting...
        exit 1
    fi

    if ! /bin/ln -s $DESKTOP_DIRS/$DESKTOP_NAME${DesktopNum} $HOME/Desktop; then
        echo "$PROG: Failed to create symlink $DESKTOP_DIRS/$DesktopNum -> $DESKTOP_SYMLINK"
        exit 1
    fi

    sleep 1     # Avoid possible race conditions w/the Finder on fast machines
    if ! killall Finder; then
        echo "$PROG: Failed to restart the Finder for possibly unknown reason to point to Desktop${DesktopNum}"
        echo exiting...
        exit 1
    fi

    exit 0  #success

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .