[Linux-bruxelles] carte graphique intel

Eric Freyens eric.freyens at gmail.com
Lun 28 Mar 00:01:40 CEST 2005


Voilà comment j'ai procédé :
1) j'ai installé le paquet i810switch
2) j'ai créé un script tcl/tk pour le basculement que j'ai placé dans
le répertoire /root/bin/ avec le nom screen.tcl, voici le script en
question
----------------------
#!/usr/bin/wish
# frontend for i810switch
#----------------------------------------------------
# You must install tcl and tk package 
# You can also define sudo input becose you must
# by root to run this script
#----------------------------------------------------
# by Eric Freyens
# email : eric.freyens at gmail.com
# http://home.tiscali.be/famille_freyens/
# Licence : GPL2
#----------------------------------------------------
set CRT off
set LCD on 
set LCDvalide 0

proc validation { } {
  global CRT 
  global LCD

  catch { eval exec i810switch crt $CRT }
  catch { eval exec i810switch lcd $LCD }
  }

# Main window -------------------------------
wm title . "i810 switch"
labelframe .frm1 -text "CRT"
radiobutton .frm1.on  -text "on" -value "on" -variable CRT
radiobutton .frm1.off -text "off" -value "off" -variable CRT
pack .frm1.on .frm1.off -fill both
pack .frm1  -fill both

if { $LCDvalide == 1 } {
  labelframe .frm2 -text "LCD"
  radiobutton .frm2.on  -text "on" -variable LCD -value "on"
  radiobutton .frm2.off -text "off" -variable LCD -value "off"
  pack .frm2.on .frm2.off -fill both
  pack .frm2  -fill both
  }
----------------------
3) J'ai modifié /etc/sudoers comme suit
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

# Host alias specification
Host_Alias LOCALNET = 192.168./16

# User alias specification
User_Alias ADMIN_TEAM = efr

# Cmnd alias specification
Cmnd_Alias DEBIAN_TOOLS = /usr/bin/apt-get, /usr/bin/auto-apt, \
/usr/bin/dpkg, /usr/bin/dselect, /usr/sbin/dpkg-reconfigure, \
/root/bin/screen.tcl

# User privilege specification
root    ALL=(ALL) ALL
ADMIN_TEAM LOCALNET = NOPASSWD: DEBIAN_TOOLS
4) J'ai placé une icône sur mon bureau
5) Voici le résultat http://apt.bxlug.be/~efreyens/i810switch.png
6) On fait son choix puis on valide celui-ci et l'écran externe est
activé ou déactivé suivant le choix effectué.
7) Il faut évidemment installer tcl/tk !?! (tcl8.4 et tk8.4)

Voila
A+
Eric

PS: il y a moyen d'obtenir un résultat en mode texte en tapant
i810switch crt on ou i810switch crt off en tant que root.
PS: Le script est prévu pour une évolution futur de i810switch grace à
la variable LCDvalide

-- 
Eric Freyens
http://www.bxlug.be
http://home.tiscali.be/famille_freyens




Plus d'informations sur la liste de diffusion Linux-bruxelles