Wednesday, December 19, 2007

Download Manager For Linux

I've tested a lot of download manager for linux,
aria, d4x, Multiget and the firefox downthemall,

my best experience is Orbit download manager+WINE, can be downloaded from here.

Works great. No worries!!!

Thursday, December 13, 2007

Proftpd Anonymous Configuration

Although i recently installed gproftpd which provides a graphical interface to manage proftpd, the following configuration is for the proftpd

First make a user which maps to the anonymous, (this is needed because the files being written/uploaded to the server needs an owner and we thus create the user and its alais anonymous.

sudo adduser ftpuser, or through Gnome/KDE's GUI interface.

This should create the skeleton directory and stuffs. We will share /home/ftpuser/ftpshared folder as a public folder, make sure its writable.

Put the following code at the bottom of proftpd.conf, in xampp it can be found in /opt/lampp/etc/proftpd.conf

<Anonymous /home/ftpuser/ftpshared>
User ftpuser
Group ftpuser
UserAlias anonymous ftpuser
AllowOverwrite off
AuthUsingAlias On
AnonRequirePassword Off
<Limit STOR CWD XCWD CDUP MKD READ WRITE DIRS>
AllowAll
</Limit>
<Limit DELE>
DenyAll
</Limit>
<Limit LOGIN>
AllowAll
</Limit>
DisplayLogin /home/ftpuser/ftpshared/welcome.msg
</Anonymous>

The allowed methods are written in caps within the Limit tag as attributes, the configuration i've done is greedy configuration, ie it allows to read and write but doesnot allow to delete any of the files or folders.

Also create a file /home/ftpuser/ftpshared/welcome.msg and put your welcome message inside it. We're done!!

Cheers!!

Mount a folder inside another folder (Binding)

I'll show you how to mount a folder residing somewhere in a filesystem to another folder.

Its a line command,
sudo mount -o bind /sourcefolderurl /destinationfolderurl

Done! Now where is it useful?
I ran into this problem during my ftp server setup,
ftp://myserver mapped to file system /media/sda7/ftpshared, ie ftp://myserver/a.mp3 mapped to /media/sda7/ftpshared/a.mp3.

But i also had to share /opt/cache/apt/archives (all the .deb files) within the ftp server, creating symbolic links wasn't working since proftpd worked in a chrooted environment, thus this was a good solution.

sudo mount -o bind /opt/cache/apt/archives/ /media/sda7/ftpshared/archives

To automatically mount the folder, make an entry in /etc/fstab file at the very end,
/var/cache/apt/archives /media/sda7/ftpshared/archives auto bind,gid=46,defaults 0 0

And on every boot, the folder is automatically mounted.

Cheers!!

Sunday, December 9, 2007

Edubuntu Setup Tips and Tricks

Update: We new have a separate LTSP related blog for Nepali Deployments, check it out here

A)

The usplash was giving resolution problem.
It was fixed by changing the /etc/usplash.conf file and setting
cat /etc/usplash.conf
xres=640
yres=480

Nice!!

B)
Now originally the client were successfully logging in, but after sometime they stopped working, it was strange but after debugging and following links below, i found that edubuntu and sabayon (gnomes configuration editor, or sth...)

The discussion links have been posted here
exactly my problem
https://lists.ubuntu.com/archives/edubuntu-users/2007-June/001199.html

then it forwarded to sth ssh related, update ltsp ssh keys
https://lists.ubuntu.com/archives/edubuntu-users/2007-June/001202.html

in the last link, there was option to simply remove sabayon and well guess what? it worked perfectly!!!
sudo aptitude remove sabayon

I was glad that there wasn't much dependencies related with sabayon.

B.1)HowEVER!!
I reinstalled sabayon watching so many cool stuffs about it on the net. All i needed to do was to add the users/client to the profile and done!!

C)
The server was giving problems with bad gdm login screen, was fixed easily by reconfiguring the x-server
sudo dpkg-reconfigure -phigh xserver-xorg

D) Local USB Mount missing!!
Asked about it in #edubuntu in freenode.net and got this link
https://bugs.launchpad.net/ubuntu/+source/ltsp/+bug/160420
and scanning for the fix, got to this place,
http://article.gmane.org/gmane.linux.terminal-server.general/22270

The modifications i made as mentioned in the mailing list above are
a) comment out
env['DISPLAY'] = 'localhost:10.0' to # env['DISPLAY'] = 'localhost:10.0' in
/usr/sbin/ltspfsmounter


b) in file /opt/ltsp/i386/usr/share/ldm/rc.d/S10-delayed-mounter,
add a -X line to ssh connection string like this
ssh -X -S ${LDM_SOCKET} ${LDM_SERVER} "/usr/sbin/ltspfsmounter ${DIR} add"

c) finally update the ltsp image by executing
sudo ltsp-update-image

Friday, December 7, 2007

Recover Grub using Ubuntu Live CD

If you have lost grub after install Windows and cannot boot Linux then this tip will help you restore grub and the boot Linux.

What we need?
Ubuntu Live CD

Steps
a) boot from Ubuntu Live CD
b) Open terminal
Applications > Accessories > Terminal

c) You will see the gnome terminal,Now we need to enter grub. In the terminal type
sudo grub

d) Now you will see a different prompt called grub>
Everycommand below will be typed in the grub> menu.
We need to find the root device, that contains the GRUB's first and second boot files
grub> find /boot/grub/stage1
(hd0,0)

Note that your output might be different depending upon the partition where u install linux, example say (hd0,6) or (hd1,5). When (hd0,0) is mentioned below, replace it with the output that u see here.

e) grub> root (hd0,0)

f) grub> setup (hd0)

g) now restart your computer and you should see your old grub screen, and your linux should work as well.

Cheers
Reference:
1) LINUX COOKBOOK by Carla Schroder