改变Xubuntu报告自己为Ubuntu

时间:2012-06-06 21:42:41

标签: linux ubuntu xubuntu

我有一个Xubuntu 12.04的安装,我想用它来运行商业程序。商业程序在启动时运行脚本以检查分发。如果它支持像Ubuntu那么没有问题,但如果它看到Xubuntu它抱怨平台。有没有办法让Xubuntu将自己报告为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
}

谢谢,

1 个答案:

答案 0 :(得分:2)

简单的解决方案:

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

玩得开心;)