zoukankan      html  css  js  c++  java
  • 禁用ubuntu的触摸板和独显

    #!/bin/bash
    #This is a vgaoff & touchpadoff
    #By spinestars
    #2014-2-18
    #TouchPad
    & VGA OFF if [ $1 == 0 ];then echo "OFF" >> /sys/kernel/debug/vgaswitcheroo/switch cat /sys/kernel/debug/vgaswitcheroo/switch > ./vga.tmp awk 'BEGIN{OF=":"}/DIS:.:Off/{print "VGA is OFF!"}' vga.tmp rm -rf vga.tmp synclient TouchpadOFF=1 > /dev/null 2>&1 && synclient | grep "TouchpadOff" | awk '/.*= 1/{print "TouchPad is OFF!"}' || gconftool-2 --set --type boolean /desktop/gnome/peripherals/touchpad/touchpad_enabled false || rmmod psmouse [ $?==0 ] && echo 'TouchPad is OFF!' fi #TouchPad ON if [ $1 == 1 ];then synclient TouchpadOFF=0 > /dev/null 2>&1 && synclient | grep "TouchpadOn" | awk '/.*= 1/{print "TouchPad is ON!"}' || gconftool-2 --set --type boolean /desktop/gnome/peripherals/touchpad/touchpad_enabled ture || modprobe psmouse [ $?==0 ] && echo 'TouchPad is ON!' fi

    昨天装了deepin,结果昨天还能用synclient关闭触摸板,今天就不行了。。。于是网上有找了其他2种方法,故而就将三种方法合并到了一起。

    参数1是开启,参数0是关闭(关闭的时候会顺便将ATI显卡的独显给关掉,开启的时候则不再开启独显)。

    zyh@deepin:~/桌面$ sudo ./vga_touchpadoff.sh 0
    VGA is OFF!
    TouchPad is OFF!
    TouchPad is OFF!
    zyh@deepin:~/桌面$ sudo ./vga_touchpadoff.sh 1
    TouchPad is ON!
    [星空刺] |-->一颗星辰一闪即逝,支撑它的唯有方向和目的
  • 相关阅读:
    JS 位数不够自动左补0
    oracle 不同表空间的数据迁移
    Vue 学习
    c# 之Web.config
    c# 之泛型
    WritableWorkbook操作Excel
    MIME类型
    Excel 批量出来数据
    Excel的用到的常规的技巧
    得到Xml中 元素的值
  • 原文地址:https://www.cnblogs.com/aaa103439/p/3553743.html
Copyright © 2011-2022 走看看