simple command line desktop manipulation 



desktop [-c desktop-name] [-l] [desktop-name]


desktop implements a simple command line version of a virtual desktop switcher. Most available virtual desktop systems have a graphical component to switch the desktop --this allows you to switch using the command line. Use the -l option to find the names of the desktops your virtual switcher uses. Once you know the names of the desktops, just type the following to switch to another desktop:

desktop name



creates a new desktop, with a given name. Newly created desktops have the explorer started on them automatically; this causes the new desktop to look like the console desktop when you initially log in. The start menu items then run, starting, for example, your default shell console window.

Note that desktop cannot delete a desktop: a desktop is deleted automatically by the system when all processes that have the desktop open have terminated. Since the explorer is running, this starts up several processes that must all be killed to delete the desktop. See ps to find the process IDs of these processes. However, since this is dangerous, there is no good way in 7/2008R2/8/2012/10/2016 to determine an arbitrary process' desktop.


lists all the desktops on the current windowstation.


The following examples creates a file desktop.ksh that you can run from your profile.ksh using the . (dot) command:

desktop -c 0
desktop -c 1
alias d0="desktop 0"
alias d1="desktop 1"
alias def="desktop Default"

Then at the command line prompt, you can switch between the three desktops using the simple short aliases: d0, d1, and def.


Possible exit status values are:


Successful completion.


An error occurred.


Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.


PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition



PTC MKS Toolkit 10.1 Documentation Build 15.