Start menu shortcuts
Wed Sep 2 19:01:00 GMT 2009
On 19/08/2009 01:05, Ken Brown wrote:
> On 8/18/2009 10:46 AM, Ken Brown wrote:
>> Is there a policy about which packages are allowed to create start
>> menu shortcuts? Recent discussion about run.exe on the main cygwin
>> list makes me think it would be useful for the emacs-X11 package to
>> create a shortcut for starting emacs under X. I would do this by
>> putting the following in the postinstall script:
>> /usr/bin/mkdir -p "$(/usr/bin/cygpath -AP)/Cygwin-X"
>> /usr/bin/mkshortcut -AP \
>> -n Cygwin-X/emacs \
>> -w /usr/bin \
>> -i /usr/share/emacs/23.1/etc/emacs.ico \
>> -a '-p /usr/bin bash -l -c "emacs --display=127.0.0.1:0"' \
>> Is this appropriate or does it violate some guidelines?
> I just realized that the X-start-menu-icons package already provides an
> emacs shortcut, so my question is irrelevant. But emacs started by the
> shortcut in that package doesn't work right because the PATH isn't set
> up correctly. (For example, if you try to list the current directory
> with C-x d, you get an error "ls not found".) So it should either be
> fixed as above or removed from X-start-menu-icons, in which case I'll
> add it to emacs-X11.
I'm not sure what to do about X-start-menu-icons.
On the one hand, it is a bit silly now that we have individual packages for
each executable rather than everything in xorg-x11-bin, and perhaps it would
make much more sense for the individual packages to maintain their own start
On the other hand, it makes sense for those applications which want to have a
start menu icon to be using some kind of standard tool to maintain that start
menu shortcut, and X-start-menu-icons.sh is probably that tool :-)
On the gripping hand, as it stands, it's a bit broken:
- X-start-menu-icons.sh only gets automatically run by the X-start-menu-icons
package's postinstall script. It really needs to get run after every setup
run to check if it needs to create shortcuts for any newly installed applications.
- It only knows how to add shortcuts for applications, and to remove all the
shortcuts it's made (on it's own uninstallation). It doesn't know how to
delete the shortcuts for applications which are owned by uninstalled packages,
leading to stale shortcuts for removed applications.
- it can't make shortcuts with external icons, like the example above
- as you point out, it doesn't make a correctly working shortcuts for emacs
(everything should probably be invoked via bash -l -c so a useful environment
- /etc/X11/X-start-menu-icons-list contains the hardcoded list of applications
which get start menu shortcuts. This data clearly ought to be in individual
packages. (So this perhaps this should be replaced by a directory with files
owned by the individual packages?)
- if you have parallel 1.5 and 1.7 installations, they will fight over the
shortcuts, as they want to create shortcuts with the same name, but have
differing ideas of where they should point to...
I think Yaakov has some ideas about how to approach this, but I don't know
what they are.
Anyhow, this is something I am willing to spend a bit of time on, if there was
some vague consensus as to the direction we should be heading in.
More information about the Cygwin-apps