Search:  
Gentoo Wiki

Qsubmit


This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc

Contents

Introduction

qSubmit is a multiplatform application (runs on Linux, Windows and every other OS that supports qt4) that lets you send ed2k files to your mldonkey simply via clicking on them from within a browser. Of course, it only makes sense if you are using mldonkey, since it does not work with other p2p clients. qSumbit was written in Qt4 and simplifies the process of downloading ed2k links tremendously. Furthermore it offers adequate visuals feedback so you see whether sending the download to the mlcore was successful or not.

What you need

The Ebuild

Since the ebuild provided for qSubmit is not part of the portage repositry, you must first obtain the ebuild and copy it into the appropriate directory and do some more additional steps in order to build the digest etc. The steps necessary for this are described in this howto HOWTO Installing 3rd Party Ebuilds, so referr to it if you want to know more about the way third party ebuilds are integrated into your local portage tree. We will nevertheless outline the necessary steps required to install the ebuild in section installaion.

The ebuild can be fetched from this site: [1]. The location is likely to change, so don't however so always refer to this howto in order to know where the newest ebuild can be fetched from.

Installation

The installation of this thrid party ebuild requires following steps:

  1. Adding PORTDIR_OVERLAY="/usr/local/portage" to your /etc/make.conf if this has not already been performed.
  2. Downloading the latest qSubmit ebuild from [2] or [3] and copying it into /usr/local/portage/net-p2p/qsubmit. You may need to create the directory if has not already present. Do this with
mkdir -p /usr/local/portage/net-p2p/qsubmit. 
  1. Issue ebuild /usr/local/portage/net-p2p/qsubmit/<your-qsubmit-ebuild>. Replace <your-qsubmit-ebuild> with your current qsubmit ebuild, e.g.
ebuild /usr/local/portage/net-p2p/qsubmit-0.4.1.ebuild manifest
  1. Add qsubmit to your /etc/portage/package.keywords since it is marked unstable. You can do this with the command:
echo "net-p2p/qsubmit" >> /etc/portage/package.keywords
  1. Now you can emerge qSubmit with
emerge qsubmit

Browser configuration

Now, that qSubmit has successfully been installed, you must configure your browser(s) to send the ed2k links to mldonkey, whenever you click on them. This procedure is different for every browser, and we'll only consider the most popular browsers that are available on GNU/linux.

Mozilla and Firefox

which qsubmit

from the command line. That is all it takes to integrate qSubmit with Mozilla/Firefox.

Visual guide for Mozilla/Firefox

Konqueror

Create a file called ed2k.protocol with following entries in your /usr/kde/<YOUR_KDE_VERSION>/share/services. Of course <YOUR_KDE_VERSION> must be replaced with your specific KDE version, for example 3.5. If you are not sure about the location of your kde-installation you can utililze the following command that is already provided by your kde-installation:

localhost ~ # kde-config --prefix
/usr/kde/3.5

Thus, you may copy the above file into the right directory with:

localhost ~ # cp ed2k.protocol "$(kde-config --prefix)/share/services"
File: /usr/kde/<YOUR_KDE_VERSION>/share/services/ed2k.protocol
[Protocol]
exec=/usr/bin/qsubmit "%u"
protocol=ed2k
input=none
output=none
helper=true
listing=false
reading=false
writing=false
makedir=false
deleting=false

Opera

Visual guide for opera

Configuration

Config dialog
Config dialog

The first time you run qSubmit, it will offer you a configuration dialog. The default values are pretty sane and should work for most users, so change them only if you know what you are doing or if they don't work for you. Even thought the configuration dialog is only displayed the first time after installation (i.e. when no configuration file can be found), you can always get to the same dialog by calling qSubmit without commandline arguments and then clicking on the configuration button. You can do this by simply typing qsubmit in your terminal or by pressing Alt+F2 and entering qsubmit. Pressing Enter will then launch qSubmit. This works for kde and gnome alike.

Using qSubmit

Multiple ed2k's
Multiple ed2k's

After configuring and restarting Firefox to set the changes into effect, simply clicking on ed2k links within your supported browser will initiate qsubmit. One of the very usable features of qSubmit is that when you come across a site filled with a LOT of ed2k links you can simply paste in the html-source of the site into qSubmit and make it extract all ed2k links automatically rather than clicking on every single link. This greatly simplifies downloading multiple ed2k files.

It can also be used to download ordinary files that can be fetched via http or ftp. In this regard mldonkey functions as a simple downloader like wget etc. This will not work with relative urls however. They are simply ignored. The mentioned html-source can be obtained with view > show source' under firefox, Konquerer and opera. In order to display the dialog into which the html-source or an arbitrary list of ed2k links can be pasted, start qSubmit without any command-line arguments. You can do so with starting qSubmit straightly from your terminal-emulator or by pressing Alt+F2 and then typing qsubmit and clicking enter in the displayed command-dialog.

Adding new translations

The tools provided with qt4 make translating qt apps a breeze. All you need to do is extracting the qSubmit tarball into a directory of your choice and then modify the qsubmit.pro file located in its src directory to include your language. Then you run lupdate and then open the created translation file from within linuguist (which is also provided by qt4). You can then translate all strings into your language and then save the translation file. In order to create a binary-translation file you must click File>'Release from linguist's File menu. The outputted file then can be used with qSubmit. Beneath is a more detailed step to step description of this process.

cd
tar xvfj /usr/portage/distfiles/qsubmit-<version>.tar.gz
cd qsubmit-<version>/src
TRANSLATIONS = qsubmit_de.ts \
               qsubmit_fa.ts \
               qsubmit_<language 1>.ts \
               qsubmit_<language 2>.ts

Replace <language 1> and <language 2> with the correct appreviation for your language. de for example stands for german and fa stands for farsi.

Note that versions prior to 0.2.2 require the *.qm files to be located in the same directory where the qsubmit executable resides. Gentoo however requires the translation files to be located in /usr/share/<qt application>/translations/. The ebuild follows the gentoo way of placing the translation files so they do not work in the aformentioned versions of qsubmit (>=0.2.1). In order to test the translation files you generated you can either temporarily put the *.qm files to where qsubmit is installed (/usr/bin/) or build qsubmit manually and experiment with it in the build-directory. Version 0.2.2 and higher work correctly in this respect, so you can place the *.qm files into /usr/share/qsubmit/translations.

Troubleshooting

In case you find some bugs or have suggestions on how to improve qSubmit, you can contact its developer at ml81@gmx.de.

Screenshots

See also

Retrieved from "http://www.gentoo-wiki.info/Qsubmit"

Last modified: Mon, 22 Sep 2008 09:45:00 +0000 Hits: 12,266