Il blog di Gas

Solo un altro sito WordPress

Archive for the ‘ubuntu’ tag

Move files with zenity progress bar

with one comment

I’m playing with a script that moves files between two directories and does that by piping two tar commands, so called Fast Copy.

You need zenity to see the progress bar, it is a work in progress as there are some bugs, eg when you click “cancel” the two tar child processes are not killed for some reason, I couldn’t get the correct exit code that probably gets lost somewhere.

Probably in the future I’ll write a better notification.Suggestions and modifications are wellcome.

 

 

 

Written by gas

luglio 22nd, 2011 at 4:52 pm

Posted in English,Linux

Tagged with , , ,

Indirizzo ip dinamico e dyndns opendns

without comments

Ogni qualvolta ci si collega ad internet viene assegnato un indirizzo ip pubblico al proprio computer/router, in Italia quasi tutte le connessioni adsl private hanno un ip dinamico che camba tutte le volte che ci si riconnette. Può tornare comodo conoscere questo ip per poter raggiungere il proprio computer dall’esterno ( lavoro, università ) e per evitare di doverselo scrivere su un “post it” tutte le volte che si accende il modem è possibile utilizzare un dns dinamico .

Razionale

  1. iscriversi ad un servizio di dns dinamico, si potrà scegliere un dominio di terzo livello ( terzolivello.secondolivello.it) a cui associare l’indirizzo ip del computer.
  2. iscriversi a dnsomatic che provvederà a fornire a tutti i servizi che si usano (come i servizi di dns dinamico ma anche altri come opendns) l’indirizzo ip del computer
  3. usare un client che al cambio dell’indirizzo ip avvisa dnsomatic

Read the rest of this entry »

Written by gas

dicembre 27th, 2009 at 2:39 pm

Posted in Generale,Linux

Tagged with , , , ,

Ubuntu on Toshiba A300 PSAJ4E

with 3 comments

toshiba a300Info
00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 03)
00:01.0 PCI bridge: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port (rev 03)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)
00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)
01:00.0 VGA compatible controller: ATI Technologies Inc Mobilitiy Radeon HD 3400 Series
01:00.1 Audio device: ATI Technologies Inc RV620 Audio device [Radeon HD 34xx Series]
02:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
03:00.0 Ethernet controller: Marvell Technology Group Ltd. Unknown device 4355 (rev 12)
0a:01.0 FireWire (IEEE 1394): O2 Micro, Inc. Firewire (IEEE 1394) (rev 02)
0a:01.2 SD Host controller: O2 Micro, Inc. Integrated MMC/SD Controller (rev 02)
0a:01.3 Mass storage controller: O2 Micro, Inc. Integrated MS/xD Controller (rev 01)

Read the rest of this entry »

Written by gas

luglio 17th, 2008 at 10:15 pm

Posted in English,Linux

Tagged with , , ,

Laptop ubuntu suspend and nvidia virtual tty

without comments

I decided to keep ubuntu even if I don’t like this new release ( hardy ) at all. When it came out it used to hang for no reason , the new kernels seem to have solved the issue.

I had two big problems, I couldn’t hibernate/suspend and I couldn’t switch to the ttys with Alt+F1 for example.

Starting from the latter I realized that the nvidia-glx package instead of the nvidia-glx-new does the job. Since I don’t know the difference between the two packages and I really don’t care to have the newest nvidia driver I consider this problem fixed.

Now suspend works and not sometimes or just one time like it used in the past, I had to change some config options in /etc/default/acpi-support

SAVE_VBE_STATE=false
POST_VIDEO=false
SAVE_VIDEO_PCI_STATE=true

Hiberating is still a problem or better waking up from hibernation is a huge deal on my laptop. It does hibernate and it tries to wake up during next boot but when X starts everything freeze. It seems a kernel or xorg problem because I can’t turn on/off the capslock led. Here’s the bug I’ve filled, hopefully someoene will look at it.

Written by gas

giugno 7th, 2008 at 5:44 pm

Posted in English,Linux

Tagged with , ,

Mldonkey and conky

with one comment

In the past conky had some built in features regarding mldonkey that have been dropped later. I launch a script that uses netcat to do the same thing ( at least what I need).


#! /bin/sh
USER=user ## mldonkey user
PASS=pass ## mldonkey password for user
HOST=192.168.1.2 ## host where mldonkey is running
PORT=4000 ##port
(echo "auth $USER $PASS";echo $1;echo q) | nc $HOST $PORT

and then for conkyrc

${execi 50 ml_command bw_stats|grep Down|awk -F " " '{print $1,$2,$3,$10,$11,$12}'}

Written by gas

febbraio 14th, 2008 at 2:12 pm

Posted in English,Linux

Tagged with , , , ,

Laptop sound working

with 2 comments

I finally have sound , nice to hear :P

My laptop is a Packard Bell Easynote MX51-B-058 and is shipped with with Realtek ALC660 HD Audio sound chip, lspci gives the following:

gas@gas-laptop:~$ sudo lspci
00:00.0 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)
00:00.1 RAM memory: nVidia Corporation C51 Memory Controller 0 (rev a2)
00:00.2 RAM memory: nVidia Corporation C51 Memory Controller 1 (rev a2)
00:00.3 RAM memory: nVidia Corporation C51 Memory Controller 5 (rev a2)
00:00.4 RAM memory: nVidia Corporation C51 Memory Controller 4 (rev a2)
00:00.5 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)
00:00.6 RAM memory: nVidia Corporation C51 Memory Controller 3 (rev a2)
00:00.7 RAM memory: nVidia Corporation C51 Memory Controller 2 (rev a2)
00:02.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)
00:03.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)
00:04.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)
00:05.0 VGA compatible controller: nVidia Corporation C51 PCI Express Bridge (rev a2)
00:09.0 RAM memory: nVidia Corporation MCP51 Host Bridge (rev a2)
00:0a.0 ISA bridge: nVidia Corporation MCP51 LPC Bridge (rev a3)
00:0a.1 SMBus: nVidia Corporation MCP51 SMBus (rev a3)
00:0b.0 USB Controller: nVidia Corporation MCP51 USB Controller (rev a3)
00:0b.1 USB Controller: nVidia Corporation MCP51 USB Controller (rev a3)
00:0d.0 IDE interface: nVidia Corporation MCP51 IDE (rev a1)
00:0e.0 IDE interface: nVidia Corporation MCP51 Serial ATA Controller (rev a1)
00:10.0 PCI bridge: nVidia Corporation MCP51 PCI Bridge (rev a2)
00:10.1 Audio device: nVidia Corporation MCP51 High Definition Audio (rev a2)
00:14.0 Bridge: nVidia Corporation MCP51 Ethernet Controller (rev a3)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/fOpteron] Miscellaneous Control
01:00.0 Ethernet controller: Atheros Communications, Inc. Unknown device 001c (rev 01)

even if it says “Audio device:nVidia” you must use the snd-hda-intel module to make it work and actually ubuntu loads it during startup but sound still doens’t come out from speakers or headphones That module supports lots of chipset and sometimes they are not recognized properly and you must tell him what kind of chip you are using.
My “real” sound chip is the ALC660 from realtek and the solution for me was having a look at:

gas@gas-laptop:~$ zless /usr/share/doc/alsa-base/driver/ALSA-Configuration.txt.gz

scroll down until you find
Module snd-hda-intel
--------------------

Module for Intel HD Audio (ICH6, ICH6M, ESB2, ICH7, ICH8),
ATI SB450, SB600, RS600,
VIA VT8251/VT8237A,
SIS966, ULI M5461

and down again until you find
ALC861/660
3stack 3-jack
3stack-dig 3-jack with SPDIF I/O
6stack-dig 6-jack with SPDIF I/O
3stack-660 3-jack (for ALC660)
uniwill-m31 Uniwill M31 laptop
auto auto-config reading BIOS (default)

as you can see the default config for those chips is “auto” and thats bad….for me the right one was 3stack-660.

Last step and we are done:
gas@gas-laptop:~$ sudo nano /etc/modprobe.d/alsa-base

and add as the last line the following:
options snd-hda-intel model=3stack-660

now, just because we mostly all come from windows,reboot.

Have fun hearing

Written by gas

luglio 9th, 2007 at 9:36 pm

Posted in English,Linux

Tagged with , ,

Ubuntu, Debian Etch e le email

without comments

Ci sono in giro un sacco di howto complicati (sopratutti quelli che parlano di “Perfetct Setup”) su come creare un server mail in debian / ubuntu ma ce ne sono pochi per quelli come me che hanno la semplice esigenza di voler leggere le email generate dal sistema allo stesso modo di come leggono le email mandate dagli amici.In pratica la mia esigenza è quella di reindirizzare tutte le mail di sistema su una casella email esterna tipo mionome@gmail.com.

Read the rest of this entry »

Written by gas

maggio 17th, 2007 at 3:02 pm

Posted in Linux

Tagged with , , , ,

Bill

with one comment

Contentone…

bill_gates_ubuntu

Written by gas

aprile 25th, 2007 at 2:31 am

Posted in English,Generale,Linux

Tagged with , ,