tag:blogger.com,1999:blog-57237633925607131972024-02-08T19:03:16.469+01:00THINK THEN PASTEA personal collection of notes about I.T.sunfunhttp://www.blogger.com/profile/13031127560805489322noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-5723763392560713197.post-92191059301353481042012-01-11T20:28:00.000+01:002012-01-11T20:28:43.620+01:00Recover your hard drive isolating bad blocksRecently i had problems with very bad sactors on my storage drive. These sectors are impossible to recover, but maybe it is possible to isolate them reducing your partition o creating partitions where there are cointiguous blocks. I found them using badblocks on linux. You have to run it on umounted filesystem:
badblocks -v /dev/yourdev > bad.txt
The file bad.txt will contain a list of bad sunfunhttp://www.blogger.com/profile/13031127560805489322noreply@blogger.com0tag:blogger.com,1999:blog-5723763392560713197.post-54856699507528819482011-09-08T12:49:00.002+02:002011-09-08T12:51:46.868+02:00WICD: gestore di rete di default su ubuntu text-modeDi recente ho intallato ubuntu 10.10 su un vecchio notebook, ho deciso di disabilitare gdm e modificare grub per far partire l'intero sistema in text-mode.
Il problema che ho riscontrato e' stato nella connessione internet tramite wifi (con una penna usb) che con wpa_supplicant non ne voleva sapere di connettersi pur avendo correttamente editato il file di configurazione. Stranamente quando sunfunhttp://www.blogger.com/profile/13031127560805489322noreply@blogger.com0tag:blogger.com,1999:blog-5723763392560713197.post-76101421980025667102011-07-14T00:47:00.000+02:002011-07-14T00:47:03.252+02:00dd dvd/cdrom to Iso fileLa conversione di un dvd o un cd-rom in un file ISO può avvenire attraverso i più comuni software commerciali e non, incluso il comando dd presente sui sistemi Unix-like e su windows grazie a CygWin.
Il comando è il seguente:
dd if=/dev/dvd of=nome.iso # per un dvd
dd if=/dev/cdrom of=nome.iso # per un cd
dd if=/dev/scd0 of=nome.iso # se abbiamo un'unità scsi oppure si utilizza CygWin
sunfunhttp://www.blogger.com/profile/13031127560805489322noreply@blogger.com0tag:blogger.com,1999:blog-5723763392560713197.post-71736360873393982392011-07-05T23:25:00.002+02:002011-07-05T23:30:20.803+02:00Truecrypt da shell con LinuxUn hard disk esterno utilizzato per il backup di dati, spesso sensibili, potrebbe cadere facilmente in mani altrui, soprattutto se è da 2,5'' e lo si porta in giro. Perché non creare un volume criptato utilizzabile con i sistemi operativi più comuni?
Questo è possibile grazie a Truecrypt (Windows, Mac e Linux), uno strumento open-source con il quale è possibile creare partizioni e volumi virtualisunfunhttp://www.blogger.com/profile/13031127560805489322noreply@blogger.com0tag:blogger.com,1999:blog-5723763392560713197.post-64856852579835007302010-03-19T02:56:00.001+01:002011-07-05T21:59:39.228+02:00Merge multiple pdf to oneA simple way to merge multiple pdf files to one single pdf could be using TeX! It is faster and not expensive:
texexec --pdfarrange --result all.pdf file1.pdf file2.pdf file3.pdf
texexec --pdfarrange --result all.pdf `ls *.pdf`
enjoy!sunfunhttp://www.blogger.com/profile/13031127560805489322noreply@blogger.com0tag:blogger.com,1999:blog-5723763392560713197.post-14612740827807427302010-03-19T02:38:00.003+01:002011-07-05T21:58:52.161+02:00GDM errors about ICEauthorityAfter upgrading my opensolaris installation i had troubles with GDM on start with these messages:
Could not update ICEauthority file /.ICEauthority
There is a problem with the configuration server. (/usr/lib/gconf-sanity-check-2 exited with status 256)
To fix them i did this using an xterm session login:
pfexec usermod -d /var/lib/gdm gdm
pfexec rm /usr/lib/xorg/modules/extensions/GL
pfexec sunfunhttp://www.blogger.com/profile/13031127560805489322noreply@blogger.com0tag:blogger.com,1999:blog-5723763392560713197.post-6298876484328426262010-02-28T17:32:00.002+01:002011-07-05T21:59:15.099+02:00Firefox over SSH/X11I always had troubles calling firefox over ssh if the session was started from another unix-like machine. For example if call firefox in the remote shell, it starts but it is a local instance, not remote. So i found this solution to fix this issue, calling the firefox command with "no-remote" option: firefox -no-remote. That's all :)sunfunhttp://www.blogger.com/profile/13031127560805489322noreply@blogger.com0tag:blogger.com,1999:blog-5723763392560713197.post-11990134159613186932010-02-14T15:30:00.000+01:002010-02-14T15:30:38.117+01:00Kill a process with ease in OpensolarisOpensolaris has a nice command to kill process by name: pkill. So if you know the process name like firefox-bin it's easy to kill it running pkill firefox-bin. If you don't know the name of the process follow these steps:
ps -ef | grep -i proc_name_to_look_for
kill -9 PID_Of_process_found
sunfunhttp://www.blogger.com/profile/13031127560805489322noreply@blogger.com0tag:blogger.com,1999:blog-5723763392560713197.post-78726191295576324232010-02-02T02:24:00.008+01:002010-03-19T12:48:58.853+01:00Nimbus theme with Gnome in GNU/LinuxI was looking for a good theme for Gnome on my gnu/linux distro and opensolaris theme called Nimbus is really cool as you can see.
To install this theme it i followed these steps:
Open a terminal and get the latest nimbus theme and extract it:
wget http://dlc.sun.com/osol/jds/downloads/extras/nimbus/nimbus-0.1.4.tar.bz2. So this url contains all versions of this theme. To extract: tar -jxvf sunfunhttp://www.blogger.com/profile/13031127560805489322noreply@blogger.com0tag:blogger.com,1999:blog-5723763392560713197.post-998501327348218892010-01-28T20:00:00.007+01:002010-01-28T21:48:21.488+01:00SMF - Service Management Facility administrationSun Solaris 10, Opensolaris and successors have a new mechanism to manage services: SMF. So the first thing you could notice is that there are no more /etc/rc?.d but only a daemon that you have to use to start all the services you need. Infact /etc/rc?.d and /etc/inetd.conf are empty! The first issue I found running Opensolaris was to start gdm daemon and login in text mode: I kill it from a gui sunfunhttp://www.blogger.com/profile/13031127560805489322noreply@blogger.com0tag:blogger.com,1999:blog-5723763392560713197.post-46825106308332296202010-01-27T00:08:00.008+01:002010-02-12T13:02:18.474+01:00My shell doesn't get inputs!It could happen that, after system upgrade or "hacking", your terminal emulator like gnome-terminal maybe presents a message like this:
readline: warning turning off output flushing
The solution may be the following: it is necessary to check the rights on pseudo terminal pseudo-device:
marco@IbmSolaris:~$ ls -lL /dev/ptmx
If the output you get is not the same like this
crw-rw-rw- 1 root sunfunhttp://www.blogger.com/profile/13031127560805489322noreply@blogger.com1