Domanda

I have an installation of Xubuntu 12.04 that I want to use to run a commercial program. The commercial program runs a script at startup to check the distribution. If its supported like Ubuntu then no problem, but if it sees Xubuntu it complains about the platform. Is there a way to get Xubuntu to report its self as Ubuntu?

linux_dist () {
   _dist=`lsb_release -d 2> /dev/null | sed 's!^[^:]*: *!!'` 
   if [ -z "$_dist" ]; then
     if [ -f /etc/SuSE-release ]; then
       _dist=`head -n 1 /etc/SuSE-release`
     elif [ -f /etc/issue ]; then
       _dist=`head -n 1 /etc/issue`
     else
       _dist=`cat /proc/version | sed -e 's/^.*(\([^()]*Linux[^()]*\)).*$/\1/'`
     fi
   fi
   if [ -z "$_dist" ]; then _dist='unknown' ; fi
   echo $_dist
}

Thanks,

È stato utile?

Soluzione

simple solution:

sudo sed -i "s/Xubuntu/Ubuntu/g" /etc/lsb-release

have fun ;)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top