home / infca / t60 (navigation links) Uno sueña siempre con repetir la felicidad de la juventud

lshw | lspci | v 18 desktop servei engegada | Links | End | mapa

Think Pad T60

go 2 top
T60 pic

Type 1951, specs here

  • CPU : Core 2 Duo T5600, 64-bit instruction set

    This is a i686 CPU, not an x86-64 CPU : enable VT-x or AMD-V in BIOS

  • HDD : 160 GB (/dev/sda) - Ultrabay hard disk drive (DVD lateral dret, darrere) + Main hard disk drive (lateral dret, davant)

  • DVD : HL-DT-ST DVDRAM GSA-4083N, DVD writable/CD-RW - removed to have an ATA disc - Travelstar 5K100 HTS541080G9AT00 dies 201903

  • RAM : 4 GB, DDR2

  • GPU type : Intel GMA 950

  • resolution : 1400 x 1050

  • screen : 15", 38,1 cm, XGA, 24-bit color support

  • 802.11 a/b/g MAC 00.16.CF.5B.4D.A6

  • Eth0 MAC 00.16.5B.31.86.E1

  • Power : 20 V, 3'25 A; adapter 92P1154 : 20 V, 3'25 A, 65 W

Enter BIOS using F1

Enable virtualization :

  1. enter BIOS
  2. "Config" + "CPU"
  3. Intel Virtualization Technology := 'enabled'
  4. after any change in this option. system must be powered off to take effect

sebas@t60:~$ uname -a Linux t60 4.15.0-101-generic #102~16.04.1-Ubuntu SMP Mon May 11 11:44:23 UTC 2020 i686 i686 i686 GNU/Linux

sebastia@t60:~$ lscpu Architecture: i686 CPU op-mode(s): 32-bit

It cannot run Ubuntu 22.04 (or any modern Ubuntu release).


Esquema

T400 | .--- CPU : | .--- RAM : | .--- VDU : | .--- Display : | .--- Network --.-- eth0 | | | .-- wlan0 | .--- HD | .--- PCI Slot |
Comandes per visualitzar la ferralla


Configuracio de xarxa

Solution so /etc/network/interfaces values come into work : "sudo ifup wlan0"
interfaces man page

reinstalem NM

Primer esborrem el wpa_supplicant :

  1. apt list --installed | grep wpa
  2. sudo apt-get remove wpa_supplicant (removes network-manager, to my surprise)
  3. reboot
  4. configure eth0 using /etc/network/interfaces
  5. apt list --installed | grep net
  6. sudo apt install network-manager
  7. reboot (nm and wpa are dead)
  8. eth0 ok, wlan0 ko

To display NM version, do :

sebas@T60ubuntu:~$ journalctl -b 0 -u NetworkManager | grep version May 19 11:03:28 nicolau-desktop NetworkManager[840]: [1589879008.9294] NetworkManager (version 1.10.6) is starting...
nmcli / nmtui

nmtui - Text User Interface for controlling NetworkManager


Software - hi posem un Ubuntu Server

Ubuntu server - ubuntu-18.04.2-live-server-amd64.iso via USB and Rufus

Software updates

Ho inhibim per la GUI :

  1. en el Desktop, obrir "Apps"
  2. escollim "Software & Updates"
  3. under "Updates" tab, select "Never" in "AAutomatically check for updates"
  4. crec que resulta en el fitxer /etc/apt/apt.conf.d/10periodic
Serveis

Eines

Ens agraden :

Que hi instalem :

install mutt (see bellow) : sudo apt-get install mutt install 7z : sudo apt install p7zip-full vim (vi with colors) : sudo apt install vim sudo npm install -g npm-check-updates npm install superagent-logger -save npm install -g npm-check install htop - use F5 to see "tree"
vim install

Per a tenir color en editar documents ".sh", ".js", cal instalar "vim"

mutt install & config

url

.muttrc for gmail

# A basic .muttrc for Gmail # Change the following six lines to match your Gmail account details set imap_user = "pasta.2015@gmail.com" set imap_pass = "sagpasta" # set smtp_url = "smtp://pasta.2015@smtp.gmail.com:587/" set smtp_url = "smtps://pasta.2015@smtp.gmail.com:465/" set smtp_pass = "sagpasta" set from = "pasta.2015@gmail.com" set realname = "Soc Pastanaga" # Change the following line to a different editor you prefer. set editor = "vi" # Basic config, you can leave this as is set folder = "imaps://imap.gmail.com:993" set spoolfile = "+INBOX" set imap_check_subscribed set hostname = gmail.com set mail_check = 120 set timeout = 300 set imap_keepalive = 300 set postponed = "+[GMail]/Drafts" set record = "+[GMail]/Sent Mail" set header_cache=~/.mutt/cache/headers set message_cachedir=~/.mutt/cache/bodies set certificate_file=~/.mutt/certificates set ssl_verify_host = no set ssl_verify_dates = no set move = no set include set sort = "threads" set sort_aux = "reverse-last-date-received" set auto_tag = yes ignore "Authentication-Results:" ignore "DomainKey-Signature:" ignore "DKIM-Signature:" hdr_order Date From To Cc alternative_order text/plain text/html * auto_view text/html bind editor <Tab> complete-query bind editor ^T complete bind editor <space> noop # Gmail-style keyboard shortcuts macro index,pager y "<enter-command>unset trash\n <delete-message>" "Gmail archive message" macro index,pager d "<enter-command>set trash=\"imaps://imap.googlemail.com/[GMail]/Bin\"\n <delete-message>" "Gmail delete message" macro index,pager gi "<change-folder>=INBOX<enter>" "Go to inbox" macro index,pager ga "<change-folder>=[Gmail]/All Mail<enter>" "Go to all mail" macro index,pager gs "<change-folder>=[Gmail]/Starred<enter>" "Go to starred messages" macro index,pager gd "<change-folder>=[Gmail]/Drafts<enter>" "Go to drafts"
Monitoritzacio T60

Fem periodicament :

llistar les meves IPs cada 5 minuts : {sudo crontab -l} /home/sebas/cron_jobs/my_crons /home/sebas/cron_jobs/get_ip.sh /home/sebas/logs/get_ip.log gravar la ruta des el T60 a 8.8.8.8 {/etc/cron.hourly/} trassa_8888 -> /home/sebas/eines/monit_t60/veure_t60.sh -> /home/sebas/logs/monit_t60.log enviar 7z a yndx {/etc/cron.hourly/} t60_send_yndx -> /home/sebas/eines/envia_ip/envia.sh -> /home/sebas/logs/envia_7z.log
What gateway are we using ?

Similar to "/home/mate/cron-jobs/monit_pomnia.sh" :

sebas@T60ubuntu:~/eines/monit_t60$ cat veure_t60.sh #!/bin/bash # /etc/cron.hourly # sudo ln -s /home/sebas/eines/monit_t60/veure_t60.sh trassa_8888 fn_LOG="/home/sebas/logs/monit_t60.log" echo -e "\n=== (`date -R`) === ($HOSTNAME) === ($0) === ($(whoami)) ===" >> $fn_LOG 2>&1 traceroute -n 8.8.8.8 >> $fn_LOG 2>&1 exit 0
webmin i acces des l'exterior

Instalem webmin al Ubuntu del T60 : url

Hi obrim acces des l'exterior : url

Backup mensual T60
bash code
$ cat /home/sebas/eines/backup/fer_backup.sh szBody="[$HOSTNAME] [$time_stamp] ($0) mutt sends ($cnt) files from T60." szSubj=$szBody echo "$szBody" | mutt -d 5 -s "$szSubj" -a "$fn_final" -- $DESTI rv=$? echo "mail rc" $rv

df -h from Ubuntu
sebas@T60ubuntu:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 74G 52M 70G 1% /mnt/hdd-80GB *** dead 20190305 *** /dev/sdb1 146G 8,1G 131G 6% / udev 1,5G 0 1,5G 0% /dev tmpfs 302M 5,1M 297M 2% /run tmpfs 1,5G 208K 1,5G 1% /dev/shm tmpfs 5,0M 4,0K 5,0M 1% /run/lock tmpfs 1,5G 0 1,5G 0% /sys/fs/cgroup cgmfs 100K 0 100K 0% /run/cgmanager/fs tmpfs 302M 68K 302M 1% /run/user/1000
/dev/sda
sebas@T60ubuntu:~$ sudo hdparm -i /dev/sda /dev/sda: Model=HTS541080G9AT00, FwRev=MB4IA60A, SerialNo=MPB4AAX6GR2U9F Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs } RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4 BuffType=DualPortCache, BuffSize=7539kB, MaxMultSect=16, MultSect=16 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120} PIO modes: pio0 pio1 pio2 pio3 pio4 DMA modes: mdma0 mdma1 mdma2 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled Drive conforms to: ATA/ATAPI-6 T13 1410D revision 3a: ATA/ATAPI-2,3,4,5,6 * signifies the current active mode
/dev/sdb

sebas@T60ubuntu:~$ sudo hdparm -i /dev/sdb /dev/sdb: Model=HITACHI HTS723216L9SA60, FwRev=FC2ZC50B, SerialNo=090704FC1220NCH8VHKH Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs } RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4 BuffType=DualPortCache, BuffSize=15058kB, MaxMultSect=16, MultSect=16 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=312581808 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120} PIO modes: pio0 pio1 pio2 pio3 pio4 DMA modes: mdma0 mdma1 mdma2 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled Drive conforms to: unknown: ATA/ATAPI-2,3,4,5,6,7 * signifies the current active mode

lshw

sebas@T60ubuntu:~$ sudo lshw -C network *-network description: Ethernet interface product: 82573L Gigabit Ethernet Controller vendor: Intel Corporation physical id: 0 bus info: pci@0000:02:00.0 logical name: eth0 version: 00 serial: 00:24:7e:14:2d:14 size: 1Gbit/s capacity: 1Gbit/s width: 32 bits clock: 33MHz capabilities: pm msi pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k duplex=full firmware=0.5-1 ip=192.168.1.60 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s resources: irq:29 memory:ee000000-ee01ffff ioport:2000(size=32) *-network description: Wireless interface product: AR5212 802.11abg NIC vendor: Qualcomm Atheros physical id: 0 bus info: pci@0000:03:00.0 logical name: wlan0 version: 01 serial: 00:16:cf:5b:4d:a6 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless configuration: broadcast=yes driver=ath5k driverversion=4.15.0-101-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11 resources: irq:17 memory:edf00000-edf0ffff

Amunt! Top Amunt!
lspci from Ubuntu

sebas@T60ubuntu:~$ lspci 00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03) 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03) 00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03) 00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 2 (rev 02) 00:1c.2 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 3 (rev 02) 00:1c.3 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 4 (rev 02) 00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 02) 00:1d.1 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 (rev 02) 00:1d.2 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 (rev 02) 00:1d.3 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 (rev 02) 00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2) 00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02) 00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02) 00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7-M Family) SATA Controller [AHCI mode] (rev 02) 00:1f.3 SMBus: Intel Corporation NM10/ICH7 Family SMBus Controller (rev 02) 02:00.0 Ethernet controller: Intel Corporation 82573L Gigabit Ethernet Controller 03:00.0 Ethernet controller: Qualcomm Atheros AR5212 802.11abg NIC (rev 01) 15:00.0 CardBus bridge: Texas Instruments PCI1510 PC card Cardbus Controller

T60 wireless card

Per saber-ne el tipus, fem servir "lspci" :

sebas@T60ubuntu:~$ lspci 03:00.0 Ethernet controller: Qualcomm Atheros AR5212 802.11abg NIC (rev 01)
drivers in use

Com saber quin driver fa servir la tarja de wifi "Qualcomm Atheros AR5212" ?


Amunt! Top Amunt!
USB bits under ubuntu

Te una boca a l'esquerra i dos ala dreta.

Format USB
quan posem un USB ...
lateral esquerre

sebas@T60ubuntu:~$ tail -f /var/log/syslog Mar 4 10:40:04 T60ubuntu kernel: [ 234.972057] usb 1-5: new high-speed USB device number 2 using ehci-pci Mar 4 10:40:04 T60ubuntu kernel: [ 235.130809] usb 1-5: New USB device found, idVendor=0930, idProduct=6545 Mar 4 10:40:04 T60ubuntu kernel: [ 235.130816] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Mar 4 10:40:04 T60ubuntu kernel: [ 235.130820] usb 1-5: Product: USB Flash Memory Mar 4 10:40:04 T60ubuntu kernel: [ 235.130825] usb 1-5: Manufacturer: Mar 4 10:40:04 T60ubuntu kernel: [ 235.130829] usb 1-5: SerialNumber: 001D0F0C73BFB910331500C8 Mar 4 10:40:04 T60ubuntu mtp-probe: checking bus 1, device 2: "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5" Mar 4 10:40:04 T60ubuntu mtp-probe: bus: 1, device: 2 was not an MTP device Mar 4 10:40:05 T60ubuntu kernel: [ 235.513855] usb-storage 1-5:1.0: USB Mass Storage device detected Mar 4 10:40:05 T60ubuntu kernel: [ 235.531894] scsi host6: usb-storage 1-5:1.0 Mar 4 10:40:05 T60ubuntu kernel: [ 235.533869] usbcore: registered new interface driver usb-storage Mar 4 10:40:05 T60ubuntu kernel: [ 235.621647] usbcore: registered new interface driver uas Mar 4 10:40:05 T60ubuntu upowerd[1373]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5 Mar 4 10:40:05 T60ubuntu upowerd[1373]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5/1-5:1.0 Mar 4 10:40:06 T60ubuntu kernel: [ 236.581650] scsi 6:0:0:0: Direct-Access USB Flash Memory PMAP PQ: 0 ANSI: 0 CCS Mar 4 10:40:06 T60ubuntu kernel: [ 236.585963] sd 6:0:0:0: Attached scsi generic sg2 type 0 Mar 4 10:40:07 T60ubuntu kernel: [ 238.299652] sd 6:0:0:0: [sdc] 15687680 512-byte logical blocks: (8.03 GB/7.48 GiB) Mar 4 10:40:07 T60ubuntu kernel: [ 238.301565] sd 6:0:0:0: [sdc] Write Protect is off Mar 4 10:40:07 T60ubuntu kernel: [ 238.301571] sd 6:0:0:0: [sdc] Mode Sense: 23 00 00 00 Mar 4 10:40:07 T60ubuntu kernel: [ 238.302255] sd 6:0:0:0: [sdc] No Caching mode page found Mar 4 10:40:07 T60ubuntu kernel: [ 238.302265] sd 6:0:0:0: [sdc] Assuming drive cache: write through Mar 4 10:40:10 T60ubuntu kernel: [ 240.585045] sdc: sdc1 Mar 4 10:40:10 T60ubuntu kernel: [ 240.590826] sd 6:0:0:0: [sdc] Attached SCSI removable disk Mar 4 10:40:14 T60ubuntu systemd[1]: Created slice system-clean\x2dmount\x2dpoint.slice. Mar 4 10:40:14 T60ubuntu systemd[1]: Started Clean the /media/sebas/20190108-CO mount point. Mar 4 10:40:14 T60ubuntu udisksd[744]: Mounted /dev/sdc1 at /media/sebas/20190108-CO on behalf of uid 1000
lateral dret (any)

sebas@T60ubuntu:~$ tail -f /var/log/syslog Mar 4 10:44:35 T60ubuntu kernel: [ 505.612063] usb 1-2: new high-speed USB device number 3 using ehci-pci Mar 4 10:44:35 T60ubuntu kernel: [ 505.770832] usb 1-2: New USB device found, idVendor=1d0d, idProduct=0213 Mar 4 10:44:35 T60ubuntu kernel: [ 505.770840] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Mar 4 10:44:35 T60ubuntu kernel: [ 505.770844] usb 1-2: Product: Trans-It Drive Mar 4 10:44:35 T60ubuntu kernel: [ 505.770848] usb 1-2: Manufacturer: TDKMedia Mar 4 10:44:35 T60ubuntu kernel: [ 505.770852] usb 1-2: SerialNumber: 0793021703CF Mar 4 10:44:35 T60ubuntu kernel: [ 505.776506] usb-storage 1-2:1.0: USB Mass Storage device detected Mar 4 10:44:35 T60ubuntu kernel: [ 505.781139] scsi host7: usb-storage 1-2:1.0 Mar 4 10:44:35 T60ubuntu mtp-probe: checking bus 1, device 3: "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-2" Mar 4 10:44:35 T60ubuntu mtp-probe: bus: 1, device: 3 was not an MTP device Mar 4 10:44:35 T60ubuntu upowerd[1373]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0 Mar 4 10:44:35 T60ubuntu upowerd[1373]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-2 Mar 4 10:44:36 T60ubuntu kernel: [ 506.820508] scsi 7:0:0:0: Direct-Access TDKMedia Trans-It Drive PMAP PQ: 0 ANSI: 0 CCS Mar 4 10:44:36 T60ubuntu kernel: [ 506.823025] sd 7:0:0:0: Attached scsi generic sg3 type 0 Mar 4 10:44:38 T60ubuntu kernel: [ 508.672091] sd 7:0:0:0: [sdd] 15630336 512-byte logical blocks: (8.00 GB/7.45 GiB) Mar 4 10:44:38 T60ubuntu kernel: [ 508.672692] sd 7:0:0:0: [sdd] Write Protect is off Mar 4 10:44:38 T60ubuntu kernel: [ 508.672698] sd 7:0:0:0: [sdd] Mode Sense: 23 00 00 00 Mar 4 10:44:38 T60ubuntu kernel: [ 508.673313] sd 7:0:0:0: [sdd] No Caching mode page found Mar 4 10:44:38 T60ubuntu kernel: [ 508.673324] sd 7:0:0:0: [sdd] Assuming drive cache: write through Mar 4 10:44:40 T60ubuntu kernel: [ 510.950380] sdd: sdd1 Mar 4 10:44:40 T60ubuntu kernel: [ 510.955560] sd 7:0:0:0: [sdd] Attached SCSI removable disk Mar 4 10:44:41 T60ubuntu ntfs-3g[3111]: Version 2017.3.23 integrated FUSE 28 Mar 4 10:44:41 T60ubuntu ntfs-3g[3111]: Mounted /dev/sdd1 (Read-Write, label "sag_8gb", NTFS 3.1) Mar 4 10:44:41 T60ubuntu ntfs-3g[3111]: Cmdline options: rw,nodev,nosuid,uid=1000,gid=1000,uhelper=udisks2 Mar 4 10:44:41 T60ubuntu ntfs-3g[3111]: Mount options: rw,nodev,nosuid,uhelper=udisks2,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sdd1,blkdev,blksize=4096 Mar 4 10:44:41 T60ubuntu ntfs-3g[3111]: Global ownership and permissions enforced, configuration type 7 Mar 4 10:44:41 T60ubuntu systemd[1]: Started Clean the /media/sebas/sag_8gb mount point.

Amunt! Top Amunt!
How to disable GUI

# disable GUI on boot sebas@T60ubuntu:~$ sudo systemctl set-default multi-user.target Created symlink /etc/systemd/system/default.target â /lib/systemd/system/multi-user.target. sudo systemctl set-default graphical.target # enable GUI again sudo systemctl start gdm3.service # start Gnome session on a system without a current GUI sudo systemctl stop gdm3.service # shutdown GDM once started manually

askubuntu


Reinstall Ubuntu (desktop) in T60

Com que la xarxa wifi no funciona en el Ubuntu-server que tenia, primer provo de pujar a v 20 :

$ sudo do-release-upgrade Sorry, no more upgrades for this system There will not be any further Ubuntu releases for this system's 'i386' architecture.

Aixi, reinstalo Ubuntu, ara en el "flavor" de "Desktop" :

  1. get ubuntu-18.04.4-desktop-amd64.iso.torrent -> ubuntu-18.04.4-desktop-amd64.iso
  2. insert USB and launch "Startup Disk Creator"
  3. if all parameters are ok, click "Make Startup Disk"
  4. boot from USB and follow on-screen instructions
  5. "this kernel requires an x86-64 CPU but it only detects an i686 CPU"
  6. get 32-bit 16.04 : ubuntu-16.04.6-desktop-i386.iso

  7. s'instala perfectament :

    sebas@t60:~$ uname -a Linux t60 4.15.0-101-generic #102~16.04.1-Ubuntu SMP Mon May 11 11:44:23 UTC 2020 i686 i686 i686 GNU/Linux sebas@t60:~$ cat /etc/os-release NAME="Ubuntu" VERSION="16.04.6 LTS (Xenial Xerus)"

  8. per treballar remotament, posem :

    $ sudo apt-get install openssh-server

  9. posem la IP fixe ; network wlan0 configuration to set fixed IP : /etc/NetworkManager/system-connections/WLAN_GAS2

    [ipv4] method=manual dns=8.8.8.8;8.8.4.4; address1=192.168.1.121/24,192.168.1.1

  10. detectem una versio superior : upgrade - there is a new version of Ubuntu : 18.04 Bionic Beaver - la instalem

    sebas@t60:~$ cat /etc/os-release NAME="Ubuntu" VERSION="18.04.4 LTS (Bionic Beaver)"

  11. reposem codi propi :

    • tronc

  12. nou codi :

    • nicolau/camera.py

  13. la webcam via USB es veu a /dev/video0

servei engegada T60

Fem

  1. definim una feina a fer :

    sebas@t60:~$ cat /home/sebastia/eines/t60_servei_start.sh #!/bin/bash szLfn='/home/sebastia/logs/servei_engegar.log' date_name=`date +"Y%y/M%m/D%d"` time_name=`date +"h%H:m%M"` szTs="$date_name - $time_name" szTG="($szTs) ([$HOSTNAME]) boot." echo '+++ RC servei enviar TG = '$szTG >> $szLfn /home/sebastia/python/telegram/client.py "$szTG" rc=$? echo '--- RC servei enviar TG = '$rc >> $szLfn exit 0

  2. definim el servei :

    sebastia@t60:~$ cat /home/sebastia/.config/systemd/user/t60_start.service [Unit] Description=Servei de engegada del T60 [Service] Type=idle ExecStartPre=/bin/sleep 30 ExecStart=/home/sebastia/eines/t60_servei_start.sh [Install] WantedBy=default.target

  3. enable the service :

    sebastia@t60:~/eines$ systemctl --user enable t60_start.service Created symlink /home/sebastia/.config/systemd/user/default.target.wants/t60_start.service → /home/sebastia/.config/systemd/user/t60_start.service

  4. reboot

  5. verify the service status :

    sebastia@t60:~/.config/systemd/user$ systemctl status --user t60_start.service ● t60_start.service - Servei de engegada del T60 Loaded: loaded (/home/sebastia/.config/systemd/user/t60_start.service; enabled; vendor preset: enabled) Active: inactive (dead) since Mon 2020-06-22 23:04:41 CEST; 7min ago Process: 1999 ExecStart=/home/sebastia/eines/t60_servei_start.sh (code=exited, status=0/SUCCESS) Process: 1385 ExecStartPre=/bin/sleep 30 (code=exited, status=0/SUCCESS) Main PID: 1999 (code=exited, status=0/SUCCESS) jun 22 23:04:08 t60 systemd[1372]: Started Servei de engegada del T60.

  6. verify the job was done : '/home/sebastia/logs/servei_engegar.log'

Ep ! Valid HTML 4.01!   Valid CSS! Escriu-me !
Updated 20200522 (a)  
Uf !