jump to navigation

Simple File Sharing in Linux – revisited December 24, 2009

Posted by Rajeesh in linux.
Tags: , ,
9 comments

Meiga, the lightweight and easy to use content sharing software appeared in Fedora updates (Fedora 11 and 12) as of November 30, 2009. Thanks to Enrique, maintainer of Meiga and  Thomas, who reviewed and approved Meiga for Fedora. So, now onwards just use the package manager to install Meiga on Fedora.

Furthermore, Enrique requested to send a patch for adding the SPEC file to the source, so that any user who obtain the source can also easily build the RPMs. The result is here, and another patch to modify the build script to include this feature is here. I have also created the DEB package for Ubuntu 9.10, which is yet to appear in the Meiga website.

Now, in my previous post detailing the necessity which resulted in the discovery and packaging of Meiga, I have mentioned that I couldn’t find a very easy Linux-to-Linux file sharing tool (as easy as you can do in Windows, using Samba). Enter Dolphin.

Since KDE 4.3, I’ve been ~exclusively using KDE as the primary desktop environment, and it is awesome. While wandering through the unknown and unexplored realms of the default file manager in KDE, I came across a handful of very useful features.

  1. Split View : Within the single window (rather, single tab) – two views of folders are possible. This is very handy when I want to compare and/or copy files from one folder to other.
    Dolphin Splitview

    Dolphin's Split View feature

  2. In-Shell access : Press “F4″ from any folder, another view with the terminal will open – now run your favourite rsync command from there and synchronize your personal files.

    Dolphin's In-Shell feature

    Dolphin's In-Shell feature

  3. Fish : Fish is the protocol to transfer files over SSH (or RSH). KDE/Dolphin implements and integrates the Fish protocol, which makes to share and/or copy files over the network damn easy. So, whenever you have two Linux boxes, start sshd (the OpenSSH daemon) on the system where files are to be shared, and just point to “fish://<ip_address_of_host>/” in the location bar of Dolphin. Dolphin will then ask the username/password for the host machine, and once logged in, browse all the files/folders the user has access to.

    Dolphin Fish authentication

    Fish asking for authentication

    Dolphin copying files over Fish

    Dolphin copying files over Fish

GNOME/Nautilus users can use the “sftp://” protocol for the same effect.

ExMan release 0.3 November 24, 2009

Posted by Rajeesh in linux.
Tags: , , ,
3 comments

I have been hindered by some reasons for sometime and couldn’t give much attention to many projects, let alone writing blog posts. Good news is that I resumed working on them again, and have been fixing bugs and adding new features to ExMan.

ExMan is now tagged with version 0.3 which includes the following bug fixes and enhancements:

  • ExMan is now available as source tar ball, RPM, and DEB for Ubuntu. Ubuntu packages were requested by many, so tonight I went ahead and downloaded Ubuntu 9.10, installed it in VirtualBox on Fedora 12, then installed the qt-dev-tools packages and built ExMan, learned creating DEB packaging in an hour (it was much simpler compared to learning how to prepare RPMs), and created .deb for Ubuntu.
  • Drag-n-Drop capability: You have added an entry, now you just drag-n-drop it down, ExMan will automatically create a new row. If you dropped it into an existing row, the contents of the dragged columns are copied.
  • Drag and Drop to create a new entry

    Drag an existing row and drop into empty area

    Dropped into empty cell

    Dropping into empty area created a new row

    Drag and Drop contents

    Drag and Drop contents into existing entry copies them

  • Cut-Copy-Paste: Now you can do those fancy ‘cut-copy-paste’ with familiar keystrokes – Ctrl+X, Ctrl+C and Ctrl+V. [This was the toughest to implement, as QTableWidget or QTableWidgetItem do not implement them by default]
  • Proper Unicode storage support: Write entries in your native language. ExMan will store them and display them back properly now. There was a bug which prevents Unicode characters not being displayed back properly, which is fixed now.
  • ExMan used to crash while deleting some rows with the Delete (“X“) button. Fixed in this version.
  • There was a bug which didn’t modify the amount when it changed multiple times. Fixed in this version.

Go ahead and try it. If you find any bug, or want to add a cool new feature, do let me know. For developers, the git repository is available at git://exman.git.sourceforge.net/gitroot/exman/exman

Why doesn’t mget and mdelete play nice together? July 16, 2009

Posted by Rajeesh in linux.
Tags: ,
add a comment

One of my colleagues needed a shell script which should:

  1. connect to an external system via FTP
  2. change to a remote directory
  3. get all the files in the directory to local machine
  4. and delete all the files in the remote directory

The ftp commands mget and mdelete can be used to retrieve and delete multiple files respectively. And the code snippet would be:
do_ftp()
{
rm -f $FPTLOG
ftp -n -v <remote_host> <<FTP >$FTPLOG 2>&1
user <user> <password>
cd  $REMOTE_DIR
lcd $LOCAL_DIR
mget *.txt
mdelete *.txt
bye
FTP
}

This should do the job, right? Unfortunately it doesn’t. mget works, but the mdelete afterwards isn’t triggering at all when I checked vsftpd.log.

I managed to save the day by putting a harmless command in between (looks like they need a mediator!).

mget ZCNT_RECON_FBL1N_*.txt
ls         #Needed this for mdelete to work
mdelete ZCNT_RECON_FBL1N_*.txt

Geeks, any explanation on why this happens?