Krannywidlinux

i’m hearing to Pink Floyd-Comfortably Numb

Posted by: krannywidlinux on: January 7, 2008

The other day when i was on some mailing list someone posed me a question.He wanted to add a line at the end of his emails telling about what song was currently playing on his XMMS. Something like “Currently listening to Pink Floyd-Comfortably Numb”. This is what I did

First create a file SongSignature.sh ss.sh with the following lines
#!/bin/bash
echo Now listening to $@ > mysong.txt

Put it in your home directory and then do a chmod a+x ss.sh on it so that everyone has execute permissions on it. Next, start XMMS, goto Preferences, and in the Effect/General Plugins tab, select the Song Change plugin’s properties. Specify ~/.ss.sh %s in the properties box. What happens now is that whenever a song changes, its name is put in the mysong.txt file (in your home directory).

The next part is dependent on your email client. In most good mail clients (like Mozilla Thunderbird) you can attach a file as a signature. Use mysong.txt as your  signature file and ur done with.

PS 1:Me listening to  Iron_Maiden-Brave_New_World

Configuring Vsftpd in Ubuntu

Posted by: krannywidlinux on: January 7, 2008

Actually the idea of this post comes from My friend kulbir saini .But his post much implied configuring on fedora.so thought of to make lyf easier 4 Ubuntu users…To start off with Vsftpd stands for very Secure FTP Daemon.Before configuring vsftpd itself, you must decide whether to run it as a standalone dæmon or by way of a super-server, inetd or xinetd. In previous versions of vsftpd, its developer recommended using it with xinetd due to xinetd’s logging and access-control features. However, vsftpd versions 1.2 and later have native support for most of those features. For this reason, I recommend u to run it as a standalone daemon.Now to install vsftpd just type:

sudo apt-get install vsftpd

and ur done  with….

Now its time to configure ur vsftpd.conf file present in etc directory.actually default configuration is a little bit paranoid.so we have to tweak with it…u can use my vsftpd.conf available here…Don’t forget to backup before you use my configuration.
sudo cp /etc/vsftpd.conf  /etc/vsftpd_backup

Now  make a writable directory for anonymous user.

cd /home/ftp
sudo mkdir uploads                                             sudo chmod 777 uploads

With this configuration I can log into ftp server with anonymous user ( without username and password ). After logging in, the anonymous user jailed in /home/ftp directory ( pointed by anon_root ). I can’t go outside. I can download files from /home/ftp directory but not create, delete anything from this directory. But I can write and delete files in uploads.If I write files in uploads or upload files in uploads, the files automatically belong to ‘kranny’ user.
To run this server:
sudo /etc/init.d/vsftpd start

To stop it:
sudo /etc/init.d/vsftpd stop

To restart it:
sudo /etc/init.d/vsftpd restart

you can mount your required folders to the ftp directory with a mount -bind command…..but each time the system restarts you should do the same thing again n again…Instead run my bind.sh evrytime u restart ur computer…

PS 1:Time is 1.00 am n 4m 1 hr mom is shouting 4m the back to shutdown the sys.I thk shez cmg 2 break it  …

PS 2: The look of ftp listing in firefox 3 beta 2 is really awesome….u can chk it out here

ftp

Making Flash Player Plugin work with Firefox in Ubuntu 7.10

Posted by: krannywidlinux on: January 6, 2008

Erased previous installation and installed Ubuntu 7.10 afresh. When I tried to check the blog stats in wordpress.com, which uses Flash for the chart, it gave me a missing plugin error. It also showed me a little pop up to install the plugin, but unfortunately it did not work. So I decided to try the alternative Gnash plugin, but it too didn’t seem to work.

A bit of googling took me to some Ubuntu Help Forum post where it was advised to get the Flash Player from the Adobe site and install it. This involves downloading the tar.gz file, extracting it out and running the flashplayer-installation script which installs the player. But this is to be done in the command line, followed by answering some simple questions. It asks to specify where the mozilla plugin directory is, which is /usr/lib/mozilla (and the plugin directory within), but this step kept failing.

This is where the hacker jumped out of me and made me to look into the source code of flashplayer-installation script to find out where it was going wrong and what I rather need to do to install. This script is accompanied by the actual plugin file `libflashplayer.so`. The scripts just performs some checks and copies this file to the mozilla plugin folder with a permission 755 for root:root. Then it checks for the existence of an environment variable `MOZ_PLUGIN_PATH pointing to the plugin directory for Firefox to detect the plugin.

This is the manual step to install the Flash Player plugin for Mozilla Firefox in Ubuntu 7.10

  1. tar xvzf install_flash_player_9_linux.tar.gz
  2. cd install_flash_player_9_linux
  3. sudo cp libflashplayer.so /usr/lib/mozilla/plugins
  4. sudo chmod 755 libflashplayer.so
  5. vi ~/.bashrc and add `export MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins` (i.e. the command within the “)
  6. Run Firefox (all opened Firefox windows should be closed before doing this installation)Adobe site

Thus, we have added the export command to .bashrc of the user so whenever he logs in, the environmental variable gets set and thus his Firefox can detect the Flash player plugin.

When things like installation script fails do not give up. A true geek looks into the script and does what the installer does. This is what that is awesome about GNU/Linux and FOSS, even when one door is locked there is surely another door which can be opened. What needs is an effort to search for the door and try opening it )

Update: Trying to file a bug lead me to the solution. The md5sum mismatch has been fixed in the package, but uploaded into Hardy repository rather than Gutsy. But we can get the .debs from here and install with dpkg

Setup a Dialup connection in linux

Posted by: krannywidlinux on: January 3, 2008

ive found this to be a problem for every new-bie and thought of to share with u guys.Actually i’m using ubuntu 7.04 at present.this post doesnt assume that your Linux distro recognises your modem.

So first connect your modem and start off with lsusb and see the output if you see there your mobile’s manufacture name.
then execute “sudo wvdialconf”This tries to detect the baud rate of your modem and writes it to /etc/wvdial.conf

and also you have to make some manual changes to wvdial.conf,like update the username and password options…so execute the command sudo gedit /etc/wvdial.conf if you are using Gnome
or sudo kate /etc/wvdial.conf if you are using KDE

our wvdial.conf should look like

[Dialer Defaults]
Modem = /dev/ttyUSB1
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
stupid mode = 1
Modem Type = Analog Modem
Phone = *99#
ISDN = 0
Username = a
Password = b
Baud = 460800

now if ur using ubuntu then voila ur done with …..coz it automatically updates DNS server in resolv.conf.If u use any other distro open file:/etc/resolv.conf and enter following setting service named start
nameserver 202.56.230.5
nameserver 202.56.250.5
and save it…..

thats it u are done with…..just type wvdial and ur connected to net…….just type ctrl+c to disconnect……or type Killall pppd to kill all active connections……

Some common problems 1. Internet connected successfully but page is not opening

fire up following command
gedit /etc/resolv.conf

and enter this
nameserver 208.67.222.222 nameserver 208.67.220.220
Now u will be able to open web page without any problem.

2 when ever i try to connect internet i get this error (Device or Resource busy)
This is the common problem with dialup connection via dial up.
Possible solution.
1. remove usb cable from the port and reinsert it. If that not help than.
2. run following command
wvdialconf /etc/wvdialconf
it will remap ur usb port to ttyACMO1or 2

Life is much better in ubuntu. ubuntu automatically update the dns server detail in resolv.conf whenever user dial dialup connection. and ubuntu automatically update the wvdial.conf file with dialup/phone setting whenever user fireup this command
sudo wvdialconf
but on other distro user have to enter following command to update wvdial.conf file
wvdialconf /etc/wvdial.conf
as root

Updates for the Comments::::::::::::::::::::

f you use Idea GPRS then your string will be like
init1 = AT+CGDCONT=1,”IP”,”internet”,”",0,0

if you use BSNL gprs in south zone of India then string will be like
init1 = AT+CGDCONT=1,”IP”,”",”portalsouth.cellone.in”,0,0

and use the following username & password if you use bsnl gprs
Username = ppp
Password = ppp123

for hutch use
init1 = AT+CGDCONT=1,”IP”,”www”,”",0,0

If u have ny other problems regarding connecting net then feel free to bug me…..

RECOVERING YOUR LINUX DISTRO

Posted by: krannywidlinux on: January 3, 2008

Actually ive made the same post at blogspot but want to shift to wordpress so posting here…Many ppl out there are wondering if we can get back our linux installation after installling windows.this post is completely dedicated to it.To start of with windows uses the ntldr for activating the initial boot and linux uses grub….grub is more powerful than ntldr as we can
include a total of 26 o.s as far as i knw…..
our assumptions are that we had installed our grub on MBR,and u have a live cd wid u.
now when u install Xp after installing Linux ur grub gets overwritten with the ntldr and we have to get back our grub to dual boot.

Step 1:boot the live-cd and open the terminal

Step 2:fire up with the command sudo grub

step 3:If you are not sure which partition actually holds these files, use the command “find /boot/grub/stage1
it will return something lyk (hd0,5)as in my case….

Step 4: Now, set the GRUB’s root device to the boot directory, like this:                       issue command “root (hd0,5)”
Note:remember there is a space btw root and (hd0,5)

Step 5:Once you’ve set the root device correctly,its time to setup grub now with the command “setup (hd0)”

if everything is done as said above then ur done with…….just reboot ur computer and edit ur grub conf file for any changes req…..

Blog Stats

  • 12,499 hits