Solaris Common Desktop Environment: User's Guide

Other Calendar Tools

Calendar includes several command-line interface tools:

sdtcm_admin

Use sdtcm_admin from the command line to create and administer calendars. This tool can be used to add or remove a calendar on a local system or remotely on a host on the network. Use sdtcm_admin to list calendars that exist on a host, or to grant and revoke access to users to a specific calendar. Options to sdtcm_admin include:

-l

Lists calendars on your system in a single column 

-h

Lists calendars on other hosts 

-a

Adds a new calendar to a system (by default, login@localhost)

-c

Add a named calendar to a system 

-d

Delete a calendar from a system (by default, removes) 

See the sdtcm_admin(1) man page for more details and examples of the other options.

Examples

To list calendars on your system:

% sdtcm_admin -l
kasso
vacation
test
foobar
sleepy

To list calendars on another host:

% sdtcm_admin -l -h totoro
ytso
root
test
sportv4

To add a calendar with your login name to the host you are logged in to:

% sdtcm_admin -a

By default the -a option will create the calendar <login>@<localhost>. Other calendars can be created on the host by using the -c option.

To create the calendar buildschedule on the local host, aha:

% sdtcm_admin -a -c buildschedule@aha

To create the calendar sleepy on the remote host totoro:

% sdtcm_admin -a -c sleepy@totoro

To remove the calendar with your login name from the host you are logged in to:

% sdtcm_admin -d

By default the -d option will remove the calendar <login>@<localhost>. For example, if kasso is logged into aha and runs sdtcm_admin -d with no other options, the following response will be displayed:

Delete the calendar kasso@aha [y/n]?

Respond y or n.

To remove the calendar old on the host aha:

% sdtcm_admin -d -c old@aha

You can only remove calendars for which you have Owner privileges. If you attempt to remove a calendar that you do not own, you will see an error message:

Delete the calendar old@aha [y/n]? y
sdtcm_admin: Could not delete calendar because: Permission denied.

sdtcm_convert

Usesdtcm_convert to convert Calendar data format, prune a calendar, or check data integrity. Use it to convert version 3 (OpenWindows) calendar data format to version 4 (the extensible calendar data format).


Note –

sdtcm_convert is automatically invoked when performing an OS upgrade to 2.6.


sdtcm_convert must be run by superuser or the owner of the calendar. Superuser can run sdtcm_convert on any calendar; a regular user can only run sdtcm_convert on his or her own calendar. Note that sdtcm_convert can be used only on calendars located on the local host.

The version 3 data format is fixed and limited. In order to take advantage of the new features supported by the calendar API, version 3 calendars should be converted to the version 4 data format.

Options for sdtcm_convert are listed and described below.


Note –

The data version of a calendar is displayed in the About Calendar dialog box of Calendar, accessible from the Help menu.


Examples

To convert the calendar user1 to version 4 data format and also prune the calendar:

% sdtcm_convert -v 4 -s 1/1/94 user1

To check data integrity of the calendar user1:

% sdtcm_convert user1

If no option is specified, sdtcm_convert will check the calendar file for data integrity.

dtcm_editor

Use the standalone Appointment Editor to create a Calendar-formatted appointment and save it in a file.

  1. Type dtcm_editor filename at the command line.

    The standalone Appointment Editor is displayed.

    Graphic
  2. Type a date in the Date field.

    Remember to use the date format set in the Date Format dialog box.

  3. Choose the Start and End times for the appointment.

  4. Type a description of the appointment in the What field.

  5. Choose a frequency for the appointment from the Occurs menu.

  6. Click Save to write the appointment contents to the file you specified on the command line.

dtcm_lookup

Use dtcm_lookup to view appointments on your calendar.

  1. Type dtcm_lookup at the command line to view appointments for the default view.

    For example, if Day view is the default, to view appointments for the current day:

    system% dtcm_lookup
    
    Appointments for Monday October 31, 1994:
    		1) Halloween
    		2) 2:30pm-3:30pm Staff meeting
    		3) 6:00pm Trick-or-treating
    		4) 7:15pm-10:00pm Choir practice
  2. To choose the calendar, date, or range of time for which to look up appointments, use the following syntax:

    dtcm_lookup [-c calendar] [-d date] [-v view]

    For example:

    system% dtcm_lookup -c hamilton@artist -d 10/28/1994 -v day
    
    Appointments for Friday October 28, 1994:
    		1) 9:00am-10:00am Project meeting
    		2) 1:30pm-2:00pm Testing

dtcm_insert

Use dtcm_insert from the command line to insert appointments on your calendar. For example:

system% dtcm_insert -d 11/1/1994 -s 11:30am -e 12:30pm -w workout
Appointments for Tuesday November 1, 1994:
	1) 10:00am-11:00am one-on-one
	2) 11:30am-12:30pm workout
	3) 12:30pm-1:00pm eat lunch

Calendar automatically prints the appointments scheduled so you can see that the new appointment was inserted.

dtcm_delete

Use dtcm_delete from the command line to delete appointments from your calendar. For example:

system% dtcm_delete -d 11/1/1994
Appointments for Tuesday November 1, 1994:
	1) 10:00am-11:00am one-on-one
	2) 11:30am-12:30pm workout
	3) 12:30:pm-1:00pm eat lunch
Item to delete (number)? 3
Appointments for Tuesday November 1, 1994:
	1) 10:00am-11:00am one-on-one
	2) 11:30am-12:30pm workout

When you don't want to delete any more items, press Return.