[Pkg-ime-devel] Bug#683950: im-config: alter the way of starting during Xsession startup

Osamu Aoki osamu at debian.org
Mon Aug 6 13:02:53 UTC 2012


On Mon, Aug 06, 2012 at 08:31:03PM +0800, Aron Xu wrote:
...

OK so you want to hit wheezy.  If you think you can convince RM, please
go ahead.  I agree the current implimentation is very buggy fundamental
design considering the current state of dbus etc.  This is very old
plain X start up script style.

> > The only questions remaining are:
> >
> >  * aestetic of the command syntax for im-launch:
> >    this is neither ssh-agent/gpg-agent style nor dbus-launch style
> 
> It's because the restrictions of getopt command, which is used to
> parse the options in im-launch. I will research for better syntax or
> implement the command in C, if you don't mind C.

No C.  Especially if you want to hit wheezy.

As for getopt, you can do without it.  Then more freedom.  It is just
design choice. I can go with either.  I will show other style at the
bottom of this mail.

> >  * can we think --exit-with-session so daemon will be killed upon exit
> >    of x-session-manager.  (Or this is not needed for im-launch)

> I'm still thinking about it, but I need to find a bit more time this
> weekend to work on remaining issues like the syntax and this
> --exit-with-session feature.

This is certainly something we can worry later.  But not now.

=================== SCRIPT example without getopt but supporting long options
#!/bin/sh
verbose=0
while [ "$#" -gt "0" ]; do
        case $1 in
                -a)     echo "Option a"
                        ;;
                -f|--file)
                        shift
                        cat $1
                        ;;
                -v)     verbose=1
                        ;;
                --long) echo "Option long"
                        ;;
                --longextra)
                        shift
                        echo "Option longextra with $1"
                        ;;
                --)     shift
                        break
                        ;;
                -*)     echo "Unknown option: $1"
                        echo "Usage: $0 [-a] [-f|--file file] [-v] args ..."
                        exit 1
                        ;;
                *)      break
                        ;;
        esac
        shift
done
printf "Remaining arguments are: %s\n" "$*"







More information about the Pkg-ime-devel mailing list