5 Desktop icon

These instruction will help you make a KDE desktop icon which starts the Sage notebook. Instructions for a Gnome desktop icon are probably similar.

  1. Create a ``notebook.sage" file containing only the line

    notebook(open_viewer=True)

  2. In your Desktop subdirectory, create a file "SAGE-notebook.desktop" containing the lines

    [Desktop Entry]
    Comment=
    Comment[de]=
    Encoding=UTF-8
    Exec=/usr/local/bin/sage /home/martin/notebook.sage
    GenericName=
    GenericName[de]=
    Icon=
    MimeType=
    Name=SAGE
    Name[de]=SAGE
    Path=$HOME
    StartupNotify=true
    Terminal=false
    TerminalOptions=
    Type=Application
    X-DCOP-ServiceType=
    X-KDE-SubstituteUID=false
    X-KDE-Username=
    
    You will have to edit the ``Exec='' line to point your your sage script and your notebook.sage file.
  3. Right click on the sage notebook desktop icon and click on "properties" then ``application" then ``advanced options" then ``run in terminal". If you want to title the xwindow terminal, add in the ``terminal option" box -T"sage notebook".

To quit the Sage notebook: first enter ctl-c in the xwindow terminal running Sage, second enter ctl-d to quit Sage in the terminal, and finally close the browser (or browser tab) which was displaying the Sage notebook server.

For a picture for your icon, check out the Sage art at

http://www.sagemath.org/art/.

See About this document... for information on suggesting changes.