Archive Page 2 of 62



youtube-dl: download youtube videos in Ubuntu using command line

If you use Ubuntu (or other Linux distribution) and you wish to download some video from youtube.com into .flv file you can try using youtube-dl command line utility. It just downloads videos without any online applications, converters or etc. Type the following command in terminal to get it installed:

sudo apt-get install youtube-dl
Let’s imagine you would like to download the following video: http://www.youtube.com/watch?v=2leg8mUE9rs (this is part of Military Parade at Red Square in Russia at 9th of May 2010). Just run youtube-dl download utility as follows:

youtube-dl http://www.youtube.com/watch?v=2leg8mUE9rs

and in a few minutes you will get 2leg8mUE9rs.flv file that could be viewed using almost any video player like my favorite one VLC.

youtube-dl

Create Encrypted Filesystem Within a File (truecrypt way)

Some time ago I’ve written an article named 16 GB encrypted candy file describing how to create encrypted filesystem within regular file. After quick research it became clear that cryptoloop is vulnerable and there is open exploit available on the web: see it here (thanks to everybody who commented that article). So I don’t recommend to use cryptoloop but instead take a look at truecrypt that makes it possible not only to encrypt whole storage but also to create encrypted file just like I’ve described in 16 GB encrypted candy file article.

Continue reading…

Install Google Chrome (Chromium) on Ubuntu Lucid Lynx

There are several approaches to install Google Chrome browser for Linux (another name Chromium) in Ubuntu Lucid Lynx. According to the first approach you can download deb package compatible with Ubuntu Lucid Lynx just from Google Chrome website (direct link to deb) and get it installed using dpkg command line utility or gdebi (just open downloaded deb file with double-click).

Currently it is available as a beta so every time Google upgrades their google-chrome-beta_current_i386.deb package you will need to download fresh one and install it again over existing package. This is not so effective as using apt package manager with Google Chrome repository for easy installation and automatic upgrades.

Once you installed Ubuntu Lucid Lynx on your computer and connected it to Internet open terminal (command line) and type there the following:

sudo aptitude update
sudo aptitude install google-chrome-beta

This will install the latest version of Google Chrome (Chromium) browser and also will keep it up to date (Ubuntu checks for updates periodically and will notify you if fresh packages are available). Instead of using command line you can try Synatic Package manager that comes with Ubuntu Lucid Lynx by default and makes it possible to select packages to install without any commands. To open it go to System –> Administration –> Synaptic Package Manager, mark google-chrome-beta for installation and press Apply button. In a few minutes Google Chrome will be installed and appear in Applications –> Internet Gnome menu.

As for me Chrome is much more faster than other browser I’ve been using for a long time like Firefox and Opera but due to lack of extensions I wouldn’t recommend Google Chrome as primary browser. The most important extension for me is Nagios checker that is still in early stage of development for Chrome. Anyway here is official repository of Chrome extensions: https://chrome.google.com/extensions, there are not so many plugins as for Firefox but growing.

google chrome with linuxscrew.comGood browsing with Google Chrome!

Install Windows after Ubuntu Lucid Lynx

Sh*t happens. There is no more applications to manage my 6th generation iPod Classic 160 GB under Linux/Ubuntu. I have to install Windows as the second operating system along with newly installed Ubuntu Lucid Lynx (it rocks but this is for another post) to run iTunes.

For rather long time I’ve been using gtkpod, amarok, banshee, exaile or rhythmbox to sync my ipod under Linux/Ubuntu and load my music collection there. As we all know The Elder Brother Apple fights with interoperability and makes ipod/iphone users to use iTunes only. Any other applications that can read/write to ipod data format are prohibited by Apple. This also concerns Rockbox and ipod4linux alternative firmwares — once Apple encrypted ipod firmware it became impossible to use them. It definitely sucks. At least due to the fact there are millions of Linux users who are real or potential customers of Apple products. Anyways these facts have been discussed in various forums, blogs like this and similar but this post about how to install Windows as the second operating system along with Ubuntu or any other Linux.

gparted exampleThe first that we need to do is to create new partition for Windows and format it to NTFS. Exact steps to accomplish this depend on your HDD partition table e.g. there is one large ext3/ext4 partition for Ubuntu or there are several partitions for various distributions or mount points. Anyway you should use partition manager to create and/or format NTFS partition. I use gparted. It is graphical and it just works (use ‘sudo apt-get install gparted‘ if you run Ubuntu/Debian).

Second you should backup your MBR record and restore it after Windows installation that silently erases existing bootloader and installs windows one, use “dd if=/dev/sda of=/mbr.bin bs=446 count=1” to save MRB into mbr.bin file and “dd if=/media/sda/mbr.bin of=/dev/sda bs=446 count=1” to restore it from file to HDD.

To sum everything up here is the algorithm:

0. BACKUP ALL YOUR DATA!
1. Create NTFS partition using gparted.
2. Backup MBR using dd command e.g. “dd if=/dev/sda of=/mbr.bin bs=446 count=1″ (/dev/sda means your HDD).
3. Boot Windows installation CD and install it onto newly created NTFS partition.
4. Boot into Linux live CD  e.g. Ubuntu Live CD.
5. Restore MBR using dd e.g. “dd if=/media/sda/mbr.bin of=/dev/sda bs=446 count=1″.
6. Reboot.
7. Select Ubuntu in grub menu and boot it.
8. Setup grup for Windows booting.

In order to accomplish the last 8th item you should add the following text block to the end of grub config (read this article for detailed information):

title Microsoft Windows XP
root (hd0,1)
savedefault
makeactive
chainloader +1

Good luck!

P.S. If something goes wrong or you need more details you can take a look at the following article at ubuntu.com: Recovering Ubuntu After Installing Windows. It’s written in rather tangled manner but still informative.

16 GB encrypted candy file

Update: as far as cryptoloop is vulnerable and is not maintained I don’t recommend using below approach for creating encrypted for for those of you who require strong security. Use truecrypt to create encrypted filesystem within a file instead.

passwords.txtToday it came to my mind that it is time to make sensitive information stored on my usb flash drive encrypted but still transportable and easy to use. But I don’t want to have whole my 32 GB usb drive fully encrypted using truecrypt or something similar. It is just toooo slow. I also don’t want to use GPG for uncompressing files and directories every time I would like to read them and then create new GPG compressed file every time I save changes. This eats too much of my time and system resources. At the same time it is necessary to be able to use that usb drive under windows, mac, linux whatever (read/write files) but still have my directory structure with sensitive files encrypted. Here is the solution: create encrypted filesystem within a file named, say, 16GB.candy.bin that could be stored on regular windows formatted usb flash drive and then mounted under Linux using the password.

When it becomes necessary I can mount that 16GB.candy.bin as the regular ext3 filesystem with all those stuff like permissions, ownership etc. that is available on ext3 but not in FAT or NTFS. On my windows formatted flash drive candy takes only 16 GB so I can use the rest of space to store not so sensitive information like mp3, movies or photos. Moreover I on windows or linux to read it.

Let’s create that 16GB.candy.bin file with encrypted ext3 filesystem (read below explanations below carefully before just to copy/paste commands into CLI):

[root@artemn root]# cd /path/to/candy/

[root@artemn root]# modprobe cryptoloop

[root@artemn root]# modprobe aes

[root@artemn root]# dd if=/dev/urandom of=16GB.candy.bin bs=1048576 count=16000

[root@artemn root]# losetup -e aes /dev/loop0 16GB.candy.bin

[root@artemn root]# mkfs.ext3 /dev/loop0

[root@artemn root]# tune2fs -i 0 -c 0 /dev/loop0

Here are some points: using above commands we create encrypted file of 16 GB so if you need to have more or less just change “count=16000″ in dd line. “count=16000″ means 16GB so “count=20″ means 20MB. Path ‘/path/to/candy/’ is for example only so you should change it to real directory that is able to host encrypted file (16 GB in above example). Command losetup is present in most Linux distributions (btw I recommend Ubuntu especially newly released Lucid Lynx) but if it is not use your disro’s packet manager to install it or compile from sources (for super geeks only, Mr. Stallman if you read this article — Hello). Reader, you can replace “/dev/urandom” in dd line with “/dev/zero” that will make that command to finish faster but will lower security level of resulting file (read about AES for better understanding). You will need to enter the password when running losetup command so make sure it safe and long enough like ‘6U2sAsR37Hn8122dGsaPrew1twt’ but not ‘abc123′ or ‘iloveyou’.

Once commands are done you will get 16GB.candy.bin containing encrypted ext3 filesystem. You can store this file where ever you want, say, on a flash drive. If you loose it nobody won’t be able to open it until he (or she!) cracked AES encryption (use long passwords to prevent this). As the next step it is required to mount filesystem and store some files/directories in it:

[root@artemn root]# mkdir -p /mnt/candy

[root@artemn root]# cd /path/to/candy/

[root@artemn root]# mount -t ext3 -o loop,encryption=aes 16GB.candy.bin /mnt/candy

[root@artemn root]# cd /mnt/candy

[root@artemn root]# #save files, edit them, view or anything you want

[root@artemn root]# cd /

[root@artemn root]# umount /mnt/candy

When you unmount 16GB.candy.bin the changes are already saved there so it’s not required to compress and encrypt anything unlike with GPG.

P.S. This post is inspired by Loopback tricks article. Thanks to the author. Good luck!




Pages: Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 ...60 61 62 Next
Friendly Sites:Who is behind Linux Screw?
GeekyBits³ | Bash Cures Cancer | OMG! Ubuntu!
My SysAd Blog | Web Upd8
ZEPY | Linux config Wiki | Planet Sysadmin
a non-geek's linux notes | Linux Today
Linux HOWTOs, Tutorials & Projects with Adam Palmer | LinuxAlt.Com
My name is Artem N. (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››