sontek ( John M. Anderson )

October 30, 2007

AutoFS - Automount network shares

Filed under: Linux, SUSE — Tags: , , , — sontek @ 12:32 am

Using AutoFS you can have all your network shares automatically mounted (CIFS, SMB, NFS, NIS) rather than defining every share in your /etc/fstab. To do this you just need to setup your /etc/auto.master (this is where it is on SUSE, it can be in a different file on other distros, check /etc/sysconfig/autofs for MASTER_MAP_NAME if its not there) with these lines:

 +auto.master
/net -hosts
/cifs /etc/auto.smb

the /net -hosts part says “mount all NFS shares on the network inside the /net folder”, -hosts is built into AutoFS and will scan your network for NFS shares.  The /cifs /etc/auto.smb says “mount all CIFS shares on the network in /cifs”, auto.smb is an external file AutoFS will read to figure out how to mount the CIFS shares.

So with this configuration you will now have the ability to just change into an nfs/cifs share as if it is already mount, like cd /net/fileserver/music or even list files in the share with ls /cifs/fileserver2/ebooks and it will auto mount the shares as you need them.  If you don’t use the shares for a certain amount of time (you can check /etc/sysconfig/autofs for DEFAULT_TIMEOUT to get the exact time), which allows you to roam network to network aimlessly always getting the shares on that network.

For more information check out the man pages for autofs, automount, and auto.master.

October 24, 2007

SHTorrent - Schedule torrent downloads with a shell script

Filed under: Bash, Programming — Tags: , , — sontek @ 11:16 pm

If you would like to parse torrent RSS feeds on a schedule and don’t want to bog your server down with Azureus, I wrote a basic shell script that you can drop into your cron jobs and have it do all the work for you.

You can download the latest release here or check out the latest code with svn co http://devtoo.net/svn/shtorrent

and then all you have to do is copy shtorrent-cron into cron jobs and you’re set!

You can submit bugs or feature requests at http://devtoo.net/projects/shtorrent/

The original concept was taken from BashT

October 16, 2007

Who would you rather work for Novell or Sun

Filed under: Linux, SUSE — Tags: , , , — sontek @ 5:39 pm

Aaron Toponce has posted up a poll on his blog here and I wanted to cover some of the hypocrisies in the post and express my own feelings.

I think Novell has done nothing but good things for the open source community by employing some of the best and brightest developers around the world to help develop some of the most innovative applications on the Linux desktop (Tomboy, Banshee, F-Spot, Open Office, Evolution, Compiz, AppArmor, and GNOME) and have even more great products coming down the line like Giver and Banter. They also provide us with a great distribution in openSUSE with features that no other distribution has, such as the SLAB menu, openSUSE build service, 1-Click Install and the codecs installer.

They also employ the kernel hacker Greg Kroah-Hartman (the maintainer of PCI, USB, I²C, driver core and the sysfs kernel) and are allowing him to improve hardware compatibility in Linux by running the Linux Driver Project.

So, to cast my vote, It would be a dream come true to work for such a great company like Novell.

And in response to his poll:

  1. Novell has made a reputation for itself by laying off employees at a whim, with the AppArmor devs being the most recent example.
    1. Sun does the same thing, its part of owning a large corporation. And there are many reasons for layoffs, it doesn’t make anyone evil.
  2. Sun has opened up nearly all of it’s Solaris operating system. Coming from a Solaris background in the early days, this is cool.
    1. How is “nearly” open source better than being completely open source like Novell is with SUSE?
  3. Even though Novell apologized to the community for its agreement with Microsoft, knowing that they could be swallowed up any day now by the Redmond giant makes me nervous.
    1. Sun made a deal with Microsoft years ago:
      http://www.sun.com/aboutsun/media/features/sun_microsoft.html
      http://www.microsoft.com/presspass/press/2004/apr04/04-02SunAgreementPR.mspx
  4. Sun seems to have a promising future, where Novell seems to be riding the razors edge. I guess time will only tell there, however.
    1. This is just FUD/speculation, but I would have to disagree, openSUSE is looking better than ever and same goes with the rest of the products developed at Novell, I think nothing but great things are to come from them.
  5. Sun has said, that if Microsoft goes on a patent litigation rampage, Sun will pull out it’s portfolio protecting Linux users.
    1. Novell has a policy for this http://www.novell.com/company/policies/patent/ and since a majority of their business is invested in Linux and Open Source, why should we doubt them? Especially when they haven’t done anything to make us doubt them.

I would also recommend reading this article which describes the SuSE take over by Novell and how they have helped the open source community.

October 12, 2007

Setting up openWRT

Filed under: Linux, openWRT — Tags: , , — sontek @ 12:55 am

To setup OpenWRT on your router you’ll first want to check the hardware list to make sure this is even possible. After that you just need to download the latest firmware (which is kamikaze right now). Extract the code and run make menuconfig which will bring up an ncurses setup so that you can select your favorite packages and setup the kernel. When you are done just run make and it’ll generate a folder called bin with your image in it, mine is called openwrt-wrt54gs_v4-2.4-squashfs.bin.

Now that you have the firmware file you need to transfer it to your router, the best way to do this is with a tftp client, so grab tftp with your package manager (in suse: zypper in tftp) and run the following commands:

tftp 192.168.1.1
binary
rexmt 1
timeout 60
trace
Packet tracing on.
tftp> put openwrt-wrt54gs_v4-2.4-squashfs.bin

and then power cycle your router, this will copy the new firmware over and install it, it will reboot on its own so just wait until it comes back up and then you’ll need to telnet into the router to change the root password (by default, there is no password):

telnet 192.168.1.1
root@OpenWrt:~# passwd
Changing password for root
New password:

Now you will be able to use SSH to configure the rest of the settings. By default the wireless is turned off so that it isn’t open to the world, to re-enable it you just need to edit /etc/config/wireless and comment out the line option disabled 1 by placing a pound (#) in front of it. You will probably want to setup WPA/PSK/WEP while you are in there, here is my config:

config wifi-iface
option device wl0
option network lan
option mode ap
option ssid cortex
option encryption psk psk2
option key ******

Now all you have to do is restart networking /etc/init.d/network restart and you’ll have a fresh openWRT router. On the speakeasy.net speedtest I’m getting speeds like:

Download Speed: 9895 kbps (1236.9 KB/sec transfer rate)
Upload Speed: 1565 kbps (195.6 KB/sec transfer rate)

which is about double what I was getting with the default firmware on my router.

The biggest caveat, if you aren’t familiar with doing routing in Linux with iptables, is that there isn’t a easy to
use admin site to do the configuration for you anymore, everything has to be done through ssh.

For more information you can check out the following links:

http://wiki.openwrt.org/OpenWrtDocs/Installing/TFTP
http://downloads.openwrt.org/kamikaze/docs/openwrt.html#x1-50001.1.2

October 11, 2007

Horizontal Scroll Bug in Firefox

Filed under: Linux, Xorg — Tags: , , , — sontek @ 9:22 pm

An annoying bug in Firefox is that it detects the horizontal scroll sent by synaptic as the back/forward actions rather than scrolling. To fix this you need to go into firefox and type about:config in the location bar.  And then filter for mousewheel.horizscroll.withnokey.

You need to set the action to be 1 (2 is forward/back) and  set sysnumlines to true.

so it should look like:

mousehweel.horizscroll.withnokey.action = 1
mousewheel.horizscroll.withnokey.sysnumlines = true

and then you will be able scroll properly!

You can also disable the scroll completely if you don’t want it at all by adding Option “HorizScrollDelta” “0″ to the input section of xorg.conf

October 10, 2007

Moving a file with a hyphen in it in Linux

Filed under: Linux — Tags: , — sontek @ 6:46 pm

If you have a file that begins with a hyphen, like “-TODO-” in Linux, and you try to access it from the command line (by using vim, mv, cat, etc.), you’ll be greeted with the nice error:

sontek@inspidell:~> cat -TODO-
cat: invalid option — O
Try `cat –help’ for more information.

the reason for this is because its actually processing the filename as the commandline arguments -T -O -D -O -,  so if you have a file that begins with a hyphen and you need to access it via the command line you need to tell bash not to process arguments, you can do this with the argument ‘–’, like:

sontek@inspidell:~> mv — -TODO- tasklist

October 7, 2007

GCC adds CLI support

Filed under: .NET, C#, Linux, Programming — Tags: , , , , , — sontek @ 1:28 am

GCC has just added CLI (Common Language Infrastructure) support, this is a great step for mono because there has been a lot of controversy over implementing a language/infrastructure designed by Microsoft, even if it was released as an open standard from ECMA. This shows that the open source community is finally embracing mono as a viable solution for doing development. You can read more about it here: http://gcc.gnu.org/projects/cli.html

October 4, 2007

Go download openSUSE 10.3!!

Filed under: Linux, SUSE — Tags: , — sontek @ 12:33 am

The openSUSE 10.3 torrents can be found here:

http://download.opensuse.org/distribution/10.3/iso/torrent/

and if you can’t use bittorent wherever you are, you can use the metalinks here: http://download.packages.ro/metalink/opensuse/

to get more information on metalinks go here: http://en.opensuse.org/Metalinks

October 1, 2007

Utah openSUSE 10.3 Release Party

Filed under: Linux, SUSE — Tags: , — sontek @ 7:34 pm

I’m very excited about the openSUSE 10.3 release, there have been a lot of great changes and we are going to celebrate all the hardwork that went into it by having a launch party on Novell’s Provo campus in Building A (the open source technology center) at 6:00 pm on October 4th. We would love to have any contributors that will be in Provo on Thursday to come and tell us about about the features they helped get into 10.3. We will also be providing release DVDs and NFS network shares for anyone who is interested in using 10.3 and can help new users get it up and running on their machines.

You can read the release notes here

The party will be at:

1800 Novell Pl, Provo, UT
Building A (Open Source Technology Center)

So come help us celebrate the 10.3 release with pizza and soda!

Powered by WordPress