This is a simple commandline python script for creating an icon for idesk. Download the source here.

#!/usr/bin/env python
 
# Import python modules
import os
import commands
import datetime
 
def cls():
    # Define the clear windows command
    clear = commands.getoutput('clear')
    print clear
 
# Set the variables default values
touch ="touch "
copy = "cp "
 
# Get answers from the user
print "This program helps automate the idesk icon setup. Do you want to continue?[y/n]",
confirm = raw_input()
if confirm == "y":
    print "What do you want to name the icon?",
    iconName = raw_input()
 
    print "What command do you want to execute when the icon is clicked?",
    execCommand = raw_input()
 
    print "What icon would you like to use?",
    iconPath = raw_input()
 
    print "What size would you like the icon to be?"
    iconWidth = raw_input("Width: ")
    iconHeight = raw_input("Height: ")
 
    print "Where do you want the icon to set on the X and Y axis?"
    iconXaxis = raw_input("X axis: ")
    iconYaxis = raw_input("Y axis: ")
 
    # Set file name
    lnkFile = "/home/tangle/.idesktop/" + iconName + ".lnk"
 
    # Create the file
    createFile = touch + lnkFile
    os.system(createFile)
 
    # Get current user name
    username = os.environ["USER"]
 
    # Copy the icon to ~/.idesktop
    copyIcon = copy + iconPath + " /home/" + username + "/.idesktop"
    os.system(copyIcon)
    print copyIcon
 
    #changeDir = "cd " + uname + "/idesktop"
    #os.system(changeDir)
 
    fileName = iconName + ".lnk"
 
    # Write data to .lnk file
    out_file = open(lnkFile,"w")
    out_file.write("table Icon")
    out_file.write("\n Caption: ")
    out_file.write(iconName)
    out_file.write("\n Command: ")
    out_file.write(execCommand)    
    out_file.write("\n Icon: ")
    out_file.write(iconPath)
    out_file.write("\n Width: ")
    out_file.write(iconWidth)
    out_file.write("\n Height: ")
    out_file.write(iconHeight)
    out_file.write("\n X: ")
    out_file.write(iconXaxis)
    out_file.write("\n Y: ")
    out_file.write(iconYaxis)
    out_file.write("\nend")
    out_file.close()
 
    # Restart idesk
    restartIdesk = "killall idesk && idesk &"
    os.system(restartIdesk)
 
else:
    cls()
    print "Goodbye"