startkde script detects netbook and mobile twice

Bug #716160 reported by Nick Shaforostoff on 2011-02-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kubuntu PPA
Undecided
Unassigned

Bug Description

in /usr/bin/startkde for KDE 4.6 the following lines are repeated twice:

# In Kubuntu start plasma-netbook if the screen is small or if "netbook" parameter were passed to startkde.
# Starting plasma-mobile if "mobile" parameter were passed to startkde
if [ -e /usr/share/kubuntu-netbook-default-settings/share/autostart/plasma-netbook.desktop ] ; then
  HEIGHT=`xdpyinfo | grep dimensions | awk '{print $2}' | sed s,.*x,,`
  CDROM=`udisks --dump | grep optical_cd`
  if `laptop-detect` && [ $HEIGHT -lt 700 ] && [ $HEIGHT -gt 0 ] && [ -z $CDROM ] || [ $1 = "netbook" ]; then
    if [ ! -e ~/.config/autostart/plasma-netbook.desktop ] || `grep -q Hidden=false ~/.config/autostart/plasma-netbook.desktop`; then
      echo Small screen resolution detected, using plasma-netbook;
      export KDEDIRS=/usr/share/kubuntu-netbook-default-settings/:/usr/share/kubuntu-default-settings/kde4-profile/default/
    fi
  fi
fi

# Starting plasma-mobile if "mobile" parameter were passed to startkde.
if [ -e /usr/share/kubuntu-mobile-default-settings/share/autostart/plasma-mobile.desktop ]; then
  if [ "$1" = "mobile" ] ; then
    # FIXME: Find a way to decrease the startup time when adding kubuntu-default-settings as fallback.
    export KDEDIRS=/usr/share/kubuntu-mobile-default-settings/:/usr/share/kubuntu-default-settings/kde4-profile/default/
  fi
fi

this is suboptimal

Tags: eol Edit Tag help
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers