the itjerk

my adventures with personal technology

Subscribe to RSS feed

Posts tagged with "linux"

raspberry pi

, , , ...

Cheap computing's had a lot of promises for machines under $100. The Raspberry Pi, designed by the British not-for-profit foundation of the same name, is a "single computer on a board" that features an ARM processor and high-quality graphics, all for USD$35.00. It's designed to interest kids in computer programming, science, etc. Engadget has a rather tepid review here.


The unit is the size of a credit card, and has connections for USB, Ethernet, SD card (required for booting), HDMI (audio and video), RCA video and a 3.5mm audio jack. It's ARM, so software needs to be compiled for that processor; both Debian and Fedora have been ported, so yes, it's ostensibly a Linux box. It also has a GPIO connector, which means it can also be programmed to do about anything (robotics, interfacing, etc). The unit is powered by 5v, and most any micro-usb charger will do.

To get the Pi running, you'll need a pre-loaded OS on an SD card, connect (wired or wireless) keyboard and mouse, hook up to video via HDMI or composite, and power it with 5v via micro-usb.

I got into the queue with RS Online (one of two exclusive distributors) to order one on March 1st, and actually placed my order on May 24th. Next update when it's in my hands!

On the web:
Raspberry Pi Official Site
The MagPi Magazine
Wikipedia - Raspberry Pi

ubuntu 12.04 LTS precise pangolin

, , , ...

The latest version of Ununtu Linux operating system was released today. Named "Precise Pangolin" and carrying the number 12.04, it is a LTS (long term support) release that will be supported for the next five years.

Installation was painless after a reboot of the previous 11.10 was needed to get the "Distribution Upgrade" button to show up in Update Manager. Unity is still Unity, and I'm beginning to care less and less about specific applications, themes, HUD, global menus, etc. The work is what is important. Banshee was replaced by Rhythmbox; it also crashed when I attempted to run it, so it was quickly removed. I did get a few "internal errors" when Rhythmbox did its import, but smartly enough, I was informed that they were already reported. There was also a kernel update immediately after the upgrade.

On the web:
Download Ubuntu

linux as as desktop

, , , ...

I first started using Linux to run slimserver for my Squeezebox, though I *attempted* to run versions as early as the 2.3 kernel. Since then, it's come a long way, baby. I switched from Corel Linux to Redhat to Fedora and then Ubuntu. It's become my primary desktop, my test server, and a lot more, all on my third self-assembled computer; Linux reminds me again and again why I love computers and computing.
Geek, I know.

Just some other random thoughts on Natty Narwhal:

1. Unity stinks. As in the previous post and video from Linux Journal, I too fail to see the "better" in the change to it. The Dash is not workable, and the launcher is a waste of non-configurable space. Call me a Gnome guy.

2. I've started to use Workspaces, but it begs for the panel at the top of the screen. Call me a Windows guy.

3. Banshee is one amazing media player. Now if it would only quit without having to kill it.

4. Hard to get used to both the new scroll-bars and windows going full-screen when moving the top title bar. Also, mouse has unclickable dead spots in the middle-left of the screen. It's the little things...

5. Firefox 4.0.1 is your friend, Chromium could be. Opera is still a pain to install on Linux. Why is that?

ubuntu 11.04 natty narwhal

, , , ...


Okay, I've pretty much concluded that Unity sucks in the previous post. After two years, it was time for a clean install of Ubuntu. Of the various benefits, what I find most useful is that it makes me rethink which applications I am using, and why am I using them. We tend to develop a fetish for certain apps, which in and of itself is okay, but ultimately computers are tools, and whatever gets the job done, gets the job done. So with a clean install, I can rethink everything.

Natty Narwhal has of course the controversial choice of Unity desktop as default, but otherwise its shaping up to be what I expect from Ubuntu - a distribution that just works. Few quirks - moving windows by the title bar makes them go full-screen, have to shift-page-up/down in terminal, Firefox still doesn't remember it's window position on the desktop.

Here's my installation notes:

11.04 Natty Narwhal, April 28th 2011, clean install on a new HD

1. Installed from 32bit Desktop DVD. checked mp3 support.

2. change login window options, sudo apt-get install nautilus-open-terminal (restart of x), openssh-server, numlockx, landscape-common, gufw, lame, vorbis-tools

3. mount 2nd hard drive; create /mnt/music/, change permissions, put in /etc/fstab:
/dev/sdb1  /mnt/music     ext3    defaults,relatime        1 2
ln -s /mnt/music /home/one/music (put in banshee prefs)

3a. mount NAS via cifs
sudo apt-get install samba samba-tools system-config-samba smbfs
sudo smbpasswd -a username
sudo nano /etc/samba/smb.conf (add share for whatever to share (old use the old smb.conf)
then mount Network Drive in /etc/fstab:
//XXX.XXX.XX.XX/one /mnt/backup cifs auto,credentials=/root/.smbcredentials,uid=1000,gid=1000,rw 0 0
create .smbcredentials (as root)
cd /root/
echo username= > .smbcredentials
echo password= >> .smbcredentials
chmod 600 and edit smbusername + pwd

4. install apache2, mysqlserver, php5, drupal6. restart. setup websites. untar and copy to /var/www. import, but first  create an empty database. 
mysql> CREATE DATABASE XXXX; then
mysql -u root -p XXXX < XXXX.sql
sudo /etc/init.d/apache2 restart
Works!

5. add  deb http://debian.slimdevices.com stable main to /etc/apt/sources.list, then sudo apt-get install squeezeboxserver. set library folder and other preferences.

6. AmazonMP3 downloader (what a pain), Opera, Chromium, Filezilla, Nicotine-Plus, Grsync, Pinta, Gimp, Audio Extractor (gstreamer ugly!) (edit rip path with gconf2), VLC, EasyTag, Ubuntu restricted extras!, check gmail

7. scripts and crontab. scripts into /usr/bin then chmod a+x
for cron, need to run as root (sudo crontab -e) then "sudo /etc/init.d/cron restart"


On the web:
http://ubuntuguide.org/wiki/Ubuntu:Natty

i hate unity

, , ,

Ubuntu Linux 11.04 (aka Natty Narwhal) is here, and I'm in the middle of a clean install to a newish hard drive. More about that later. But in the meantime, I hate Unity. It just sucks (especially Launcher and Dash). Easy enough to fix, just choose "Ubuntu Classic" at the system login screen and it all goes away... for now.

Linux Journal's Shawn Powers sums it up quite eloquently on the clip below:

ubuntu 10.10 on 10/10/10

, , , ...

Couldn't resist the upgrade to Maverick Meerkat, Ubuntu 10.10, today, Sunday October 10th. Everything installed without incident (even though I had to power cycle because my &*& *%$* kvm quit working), and Squeezebox Server, Apache and MySQL, digital audio are all working fine. Nice new look, including to Ubuntu's website as well.

One thing I will have to do is setup the 3rd party repositories for Slimserver, Opera and Sun Virtual box. Google Chrome made the cut however.

On the web:
Ubuntu Desktop Edition

command line music player

, , , ...


Is this cool or what?! Music On Console is a command line music player. It brings me way back into the days of DOS, but this is no retro app. It's full featured, supports output to ALSA, JACK and OSS, and is fun and easy to use. For instance, to play a Squeezebox Server stream, simply run mocp, type "o" to open the stream, and enter "http://localhost:9000/stream.mp3". Next, open a browser to the Squeezebox Server interface and viola! Thanks to Linux Journal's October issue for the tip. This got my geek up big time!

On the web:
Music On Console

enter  -- starts playing
  s      -- stops playing
  n      -- plays next item from the playlist
  b      -- plays previous item from the playlist
  space  -- pause
  p      -- pause

  S      -- plays at random
  R      -- repeats the same song in a loop,
	    Next (X button below) must be OFF
  X      -- switches to play sequentially
  o      -- plays a file from the Internet
  u      -- moves playlist item up
  j      -- moves playlist item down
  Ctrl+u -- adds the URL to the playlist
  g      -- searches marked string in file names
  /      -- searches marked string in file names

  r      -- rereads the directory
  T      -- switches to the theme selection menu
  f      -- toggles display mode of song titles
  TAB    -- switches marker bar between the playlist
	    and the file manager panels
  l      -- switches between displaying the playlist
            or the file manager panel
  P      -- switches full path in the playlist
  H      -- toggles hidden files view
  Ctrl-t -- toggles song duration time
  Ctrl-f -- toggles format file view
  m      -- moves to directory entered in config file
  G      -- moves to directory with currently played file
  i      -- moves to marked directory
  U      -- moves to upper directory
  a      -- adds a file to the playlist
  A      -- adds a directory recursively to the playlist
  C      -- clears the playlist
  V      -- saves the playlist
  d      -- removes marked item from the playlist
  Y      -- removes all empty items from the playlist

  < -- decreases volume by 1%
  ,      -- decreases volume by 5%
  >      -- increases volume by 1%
  .      -- increases volume by 5%

  x      -- toggles the mixer channel
  ?      -- shows help

  !      -- goes to a fast dir 1 (set in config file)
  @      -- goes to a fast dir 2
  #      -- goes to a fast dir 3
  $      -- goes to a fast dir 4
  %      -- goes to a fast dir 5
  ^      -- goes to a fast dir 6
  &      -- goes to a fast dir 7
  *      -- goes to a fast dir 8
  (      -- goes to a fast dir 9
  )      -- goes to a fast dir 10

  F1     -- executes ExecCommand1 (set in config file)
  F2     -- executes ExecCommand2
  F3     -- executes ExecCommand3
  F4     -- executes ExecCommand4
  F5     -- executes ExecCommand5
  F6     -- executes ExecCommand6
  F7     -- executes ExecCommand7
  F8     -- executes ExecCommand8
  F9     -- executes ExecCommand9
  F10    -- executes ExecCommand10

lucid lynx

, , , ...

The upgrade to Ubuntu Lucid Lynx 10.04 took a while but was without major incident. Still, a few things to fix:

1. Login Window: sudo -u gdm gconftool-2 --set --type boolean /apps/gdm/simple-greeter/disable_user_list true

2. Mediawiki - Blank pages. From MediaWiki: "A blank white page indicates a PHP error which isn't being printed to the screen. To [reveal] this, add the following lines to the LocalSettings.php file, underneath the <?php:"
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );

Here's the error:
Parse error: syntax error, unexpected T_NAMESPACE, expecting T_STRING in /var/www/mediawiki/includes/Namespace.php on line 46 

Evidently there is an incompatibility with PHP 5.3.1 and Mediawiki 1.15.1. Found a solution here.
Note this "fix" could backfire in the future with an update; I've got backup.

3. Opera, Squeezebox and Virtual box repositories were disabled on upgrade (but not Google's Chrome repo!). I'll have to re-enable them in Software Sources.

deb http://debian.slimdevices.com stable main
deb http://deb.opera.com/opera/ stable non-free
deb http://download.virtualbox.org/virtualbox/debian karmic non-free


ubuntu 9.10, karmic koala

, , , ...

Did the distribution upgrade on Friday. Took a while to download, as I imagine about a million others were doing the same thing. Relatively seamless, here's my notes:

1. had to change this line in /etc/fstab to get the 2nd internal drive to mount properly:
/dev/sdb1 /mnt/music ext3 rw,user,exec 1 2

2. ran this to get GDM to _not_ show list of all users (gconf doesn't work):
sudo -u gdm gconftool-2 --set --type boolean /apps/gdm/simple-greeter/disable_user_list true

3. Grip was uninstalled. Using SoundJuicer, lots to get used to.

4. Opera - no channel, but in Synaptic. Will it update?

5. Volume Control - Hardware Profile - Analog Stereo Duplex. Got it?

6. Squeezeboxserver (another new name) - uninstalled on upgrade, have to wait until it's fixed to work with MySql 5.1. Thanks Logitech. BTW, in the last year, it's changed names from slimserver to squeezecenter to squeezeboxserver.

UPDATE: Installed the testing repo and Version: 7.4.2 - r29092 @ Sat Oct 31 04:00:55 PDT 2009 has corrected the problem.

linux box, restored

, , , ...

Okay, the hardware I put together works like a champ and I'm tickled pink with my new KVM switch. I dropped the Ubuntu 9.04 Jaunty Jackalope CD in the drive and let it do its thing. From what I could tell, the previous box made the switch from Fedora Core 5 or 6 to Ubuntu with Dapper Drake 6.06! Thus, after six (6) distribution upgrades, it was just time for a clean install. How sweet it is - I had no idea the 9.04 login art looked like that! But practically speaking, it's always nice to give a rethink to all the software I use/don't use. And there's no better place to start than with a squeaky clean, fresh installation of your operating system.

Before I go further, I should tell you about one mistake I made: although I didn't use the previous system hard drive on the new box (I had a spare laying around), I did't do a good job of preparing everything to be transfered over to the new box. Fortunately I could reboot from the old drive and get all my old setttings, preferences, web stuff and mysql database (for the wiki) saved to DVD, and make any mental notes about what apps I had/want, certain permissions on folders, and other tweaks etc.

Now let's get the machine back to work. First up were updates, and a lot of them. Update Manager took care of everything, then even reminding me to reboot. Then I added some really basic tweaks I just gotta have (remember to restart X afterwards). The second command avoids storing duplicates in ~.bash_history, (I picked it up from Linux Journal):
sudo apt-get install nautilus-open-terminal openssh-server numlockx landscape-common ntp
echo "HISTCONTROL=ignoreboth" >>~/.bashrc

Second Hard Drive
My linux box has always had a second hard drive, containing all my music. I'll automount that by first creating a mount point in /mnt, fixing its permisions, and then access it by creating a symbolic link in my home directory:
sudo mkdir /mnt/music
sudo chown username:username /mnt/music
sudo chmod 755 /mnt/music
Then, I add the following to /etc/fstab so that the drive actually mounts at boot (make sure to verify that the drive is indeed sdb1):
/dev/sdb1  /mnt/music     ext3    defaults,relatime        1 2

MediaWiki
Installing MediaWiki was quite easy and painless: First, using Synaptic Package Manager, I searched for MediaWiki, checked it, and let it install all the required packages including apache and mysql. Easy or what? Then, I had to get the old database and wiki files off the old computer by backing up the wikidb using mysqldump command, and then tarballing the wiki folder (located in /var/www)
mysqldump -u root -p wikidb > backup/location/wikidb.sql
sudo tar -czvf backup/location/mediawiki.tar mediawiki
To get them up and running on the new machine, there's just one addition step; you first have to create a new database in mysql before you can replace it with the old one.
mysql –u root –p
Create database wikidb;
exit
mysqldump -u root -p wikidb < backup/location/wikidb.sql
sudo tar -xzvf backup/location/mediawiki.tar /var/www/mediawiki
That's it, it worked. (One note: I did setup the new box with exactly the same hostname and users as the previous. Be sure to use the same mysql password, otherwise you'll need to edit the LocalSetttings.php file.)

Squeezecenter
Okay, next was to reinstall the Slimserver, whoops, Squeezecenter software on the new box. Just add the following repository to the sources list, and the rest is easy.
deb http://debian.slimdevices.com stable main
sudo nano /etc/apt/sources.list
sudo apt-get update
sudo apt-get install squeezecenter
Finally open up your web browser and run the setup by going to "http://localhost:9000/". It did ask me to update the firmware on my Squeezebox. Also, remember to install MP3 support first, Ubuntu does not support it out of the box.

Restricted Formats
And that's been made exceptionally easy by installing one package:
sudo apt-get install ubuntu-restricted-extras
And for DVD support:
wget -c http://packages.medibuntu.org/pool/free/libd/libdvdcss
sudo dpkg -i libdvdcss2_1.2.10-0.2medibuntu1_i386.deb

Windows Support
Samba is a protocol that provide for interoperability between Linux and the Windows operating system. It's now a fairly easy process to install and configure: First, install the appropriate packages. Second, set your samba username and encrypted password (I use the same as my user account). Next edit your smb.conf file to configure the shares on the linux box, and finally restart samba to make it all work.
sudo apt-get install samba samba-tools system-config-samba smbfs
sudo smbpasswd -a username
sudo nano /etc/samba/smb.conf [see below]
sudo  /etc/init.d/samba restart
Here's what I put into smb.conf so that my home folder can be accessed
[share]
path = /home/username
browseable = yes
writeable = yes
Now, when I browse my linux box from Windows, I see a folder called "shares" with my home folder inside, and am able to access it once I authenticate.

I also have a network drive from Buffalo that I use for backup. To get it to automount at boot, we'll again look to /etc/fstab. Here's it's entry:
//192.168.0.17/share/music /mnt/backup cifs auto,credentials=/root/.smbcredentials,uid=1000,gid=1000,rw 0 0
CIFS, or Common Internet File System defines the type of file system we're going to mount. It's interchangeable for the smbfs that we installed above. Credentials points to a file that authenticates the drive, without having to reveal the information. Here's how it's created:
cd /root/
echo username=theusername > .smbpasswd 
echo password=thepassword >> .smbpasswd 
chmod 600 .smbpasswd
Finally, the uid and gid mark the proper permissions to access the drive as my user account. Straight forward, eh?

The Rest
  • Firefox needs Adobe Flash installed, though I think it's part of restricted-extras. Oddly enough, Adobe has still yet to release a 64bit version of Flash, so we're stuck in 32bit version of the OS until then. Also, Mozilla changed the way Firefox stores bookmarks. No longer is the bookmarks.html file insider your Firefox profile folder the most recent version of your bookmarks. Best is to either a) export your bookmarks using Firefox's Organize Bookmarks tool, or better yet, find .json files in the bookmark backup folder (in your Firefox profile) and restore the most recent one.
  • From Synaptic Package Manger, I installed: Audacity, Audacious, Grip, Easytag, Disksearch and Nicotine Plus. Along with Movieplayer and Rhythmbox, that's all I need for music. Oh yeah, and GTKpod, and the command line tools flac and oggenc. Remember to copy the settings files/folders from the old computer. They're located in ~/, and are hidden files (they start with a "dot", eg, .filename).
  • Shared Printer from Windows machine was simple. Haven't tried the scanner.
  • Still have to add some scripts: music_backup, dlame and converto. Another post.
  • See my post about the Dell Mini 9 to read about sshfs.
June 2013
S M T W T F S
May 2013July 2013
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 29