~kroq-gar78/ubuntu/precise/gnome-control-center/fix-885947

« back to all changes in this revision

Viewing changes to capplets/default-applications/gnome-at-commandline.in.in

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Moya
  • Date: 2011-05-17 10:47:27 UTC
  • mfrom: (0.1.11 experimental) (1.1.45 upstream)
  • Revision ID: james.westby@ubuntu.com-20110517104727-lqel6m8vhfw5jby1
Tags: 1:3.0.1.1-1ubuntu1
* Rebase on Debian, remaining Ubuntu changes:
* debian/control:
  - Build-Depend on hardening-wrapper, dpkg-dev and dh-autoreconf
  - Add dependency on ubuntu-system-service
  - Remove dependency on gnome-icon-theme-symbolic
  - Move dependency on apg, gnome-icon-theme-symbolic and accountsservice to
    be a Recommends: until we get them in main
* debian/rules:
  - Use autoreconf
  - Add binary-post-install rule for gnome-control-center-data
  - Run dh-autoreconf
* debian/gnome-control-center.dirs:
* debian/gnome-control-center.links:
  - Add a link to the control center shell for indicators
* debian/patches/00_disable-nm.patch:
  - Temporary patch to disable building with NetworkManager until we get
    the new one in the archive
* debian/patches/01_git_remove_gettext_calls.patch:
  - Remove calls to AM_GNU_GETTEXT, IT_PROG_INTLTOOL should be enough
* debian/patches/01_git_kill_warning.patch:
  - Kill warning
* debian/patches/50_ubuntu_systemwide_prefs.patch:
  - Ubuntu specific proxy preferences
* debian/patches/51_ubuntu_system_keyboard.patch:
  - Implement the global keyboard spec at https://wiki.ubuntu.com/DefaultKeyboardSettings

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
#
3
 
#  Copyright 2006 IBM Corp.
4
 
#
5
 
#  This program is free software; you can redistribute it and/or modify
6
 
#  it under the terms of version 2 of the GNU General Public License
7
 
#  as published by the Free Software Foundation
8
 
#
9
 
#  This program is distributed in the hope that it will be useful,
10
 
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
#  GNU General Public License for more details.
13
 
#
14
 
#  You should have received a copy of the GNU General Public License
15
 
#  along with this program; if not, write to the Free Software
16
 
#  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
17
 
#
18
 
###############################################################################
19
 
#
20
 
#  NOTE: This script is intended to be run from the command line,
21
 
#  GNOME menu, or from the desktop autostart.
22
 
#
23
 
#  /usr/bin/gnome-at-visual
24
 
#  /usr/bin/gnome-at-mobility
25
 
#
26
 
#  If the "-s" flag is used then it is assumed to have been invoked
27
 
#  from /usr/share/gnome/autostart/, and the first AT flagged
28
 
#  to "startup" from GCONF_ALL will be executed.
29
 
#
30
 
 
31
 
USAGE="$0 [-s]"
32
 
GCONF_PATH=/desktop/gnome/applications/at
33
 
GCONF_VISUAL="visual"
34
 
GCONF_MOBILITY="mobility"
35
 
GCONF_ALL="$GCONF_VISUAL $GCONF_MOBILITY"
36
 
 
37
 
run_at() {
38
 
        CMDLINE=`gconftool-2 --get $GCONF_PATH/$1/exec`
39
 
        if [ $? -ne 0 ]; then
40
 
                exit $?
41
 
        fi
42
 
 
43
 
        if [ -z "$CMDLINE" ]; then
44
 
                exit 2
45
 
        fi
46
 
 
47
 
        STARTUP=`gconftool-2 --get $GCONF_PATH/$1/startup`
48
 
        if [ $? -ne 0 ]; then
49
 
                exit $?
50
 
        fi
51
 
 
52
 
        if [ ! -z "$AUTOSTART" ]; then
53
 
                # assuming ran from /usr/share/gnome/autostart
54
 
                if [ "x$STARTUP" = "xtrue" ]; then
55
 
                        # gconf indicated requested autostart
56
 
                        ($CMDLINE &)
57
 
                fi
58
 
        else
59
 
                # run from command line or desktop menu
60
 
                ($CMDLINE &)
61
 
        fi
62
 
}
63
 
 
64
 
case `basename $0` in
65
 
        gnome-at-visual )
66
 
                AT=$GCONF_VISUAL
67
 
                ;;
68
 
        gnome-at-mobility )
69
 
                AT=$GCONF_MOBILITY
70
 
                ;;
71
 
        gnome-at-session | * )
72
 
                AUTOSTART="yes"
73
 
                AT=$GCONF_ALL
74
 
                ;;
75
 
esac
76
 
 
77
 
while getopts "s" options; do
78
 
        case $options in
79
 
                s )     AUTOSTART="yes"
80
 
                        AT=$GCONF_ALL
81
 
                        shift
82
 
                        ;;
83
 
                \? )    echo $USAGE
84
 
                        exit 1
85
 
                        ;;
86
 
                * )     echo $USAGE
87
 
                        exit 1
88
 
                        ;;
89
 
        esac
90
 
done
91
 
 
92
 
if [ $# -ne 0 ]; then
93
 
        echo $USAGE
94
 
        exit 1
95
 
fi
96
 
 
97
 
for I in $AT ; do
98
 
        run_at $I
99
 
done
100
 
 
101
 
#EOF