Disable USB storage devices in Linux
21 December 2009 at 1:04 PM | Posted in GNU/Linux cli | Leave a commentTags: kernel drivers, security, USB
For security reasons, mainly in school are completely disabling USB storage devices on the computers at lab. It is important because students can bring a virus or also can leave with any private information. There is an easy way to do it in linux blacklisting the kernel driver:
- Open /etc/modprobe.d/blacklist.conf file.
- Type that line at end of file blacklist usb-storage.
Now nobody can use a USB memory stick in that computer. To enable it again comment or delete that line.
Join PDF files in linux
20 October 2009 at 1:00 PM | Posted in GNU/Linux cli | Leave a commentHello linux users: in this post i will show how to join two or more PDF files into one. You have to install the Ghostscript driver to do that, typing in a terminal(is for Debian and Ubuntu):
apt-get install gs
apt-get install pdftk
Now we join the PDFs with this command:
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=unidos.pdf file1.pdf file2.pdf
Here is the explanation of command:
gs: Call to the Ghostscript program.
-dBATCH: Close the Ghostscript when terminate the process.
-dNOPAUSE: Dont pause the program to aks for user interaction.
-q: Dont show messages during the process.
-sDEVICE=pdfwrite: Use Ghostscript PDF generator to do the process.
-sOutputFile=unidos.pdf: The name of the result file.
You can also join all PDF files in a directory typing *.pdf.
Linux:how to mount partitions at startup
16 October 2009 at 12:39 PM | Posted in GNU/Linux cli | Leave a commentIf you want to add a extra drive/partition and want it to automatically mount on start up then heres what i did, there is other ways.
- Firstly you need to get the information of the drive/partition you want to mount. To do it open a Terminal and type the following command:
blkid
and you will get something like this:
/dev/sda1: UUID=”FAF804CFF8048C57” LABEL=”Sistema” TYPE=”ntfs“
/dev/sda3: UUID=”87d8a036-4271-4063-81d0-fc8a78889bf6″ TYPE=”ext4″
/dev/sda5: UUID=”E884ED1284ECE3D2″ LABEL=”Work” TYPE=”ntfs”
/dev/sda6: UUID=”144A5E7CA87A5099″ LABEL=”Sof-CEAC” TYPE=”ntfs”
/dev/sda7: TYPE=”swap” UUID=”43a7e90c-7ad9-4790-a169-14ae9b8b1945″
If you want to mount the first drive sda1 named “Sistema” you need tu login as root typing su and follow this steps:
- Create a new directory in /media with drive name, in this case sda1.
mkdir /media/sda1 - Now you have to write your /etc/fstab file to mount the partition, you need to change the red parts with your drive information.Type that command:
echo “UUID=381046201045E60A /media/sda1 ntfs defaults 0 2″ >> /etc/fstab - Now restart your computer and the drive should appear mounted automatically.
Rotar videos con memcoder y mplayer en linux
7 May 2009 at 1:32 PM | Posted in GNU/Linux cli | Leave a commentTags: GNU/Linux cli, mplayer, video
A veces nos encontramos con vídeos que se encuentran rotados, como los copiados de una Ipod o reproductor MP4. En Linux existen soluciones para rotarlos.
Si desea rotar su vídeo y guardarlo ya en la posición que desea puede hacerlo con MENCODER de la siguiente forma:
Valla a Aplicaciones—>Terminal y teclee el siguiente comando:
mencoder -vf-add rotate=opción -oac mp3lame -ovc lavc /lugar/video_entrada.extensión -o /lugar/video_salida.extensión
Donde:
-oac es el codec de salida de audio(Output Audio Codec) pude utilizar otro si Mp3lame no está disponible
-ovc es el codec de salida de vídeo(Output Video Codec)
Si solo desea ver el vídeo rotado sin guardarlo puede usar Mplayer mediante el siguiente comando:
mplayer -vf-add rotate=opción /lugar/video_entrada.extensión
opción: es la rotación que se le dará al vídeo, se pueden usar las siguientes:
0 Rotar 90 grados en sentido horario y voltear.
1 Rotar 90 grados en sentido horario.
2 Rotar 90 grados a la izquierda.
3 Rotar 90 grados a la izquierda y voltear.
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.

