Linux.com

Home Linux Community Community Blogs

Community Blogs



Hylafax, send a fax from the command line

In these days I'm stressing hylafax a lot, I think it's a nice and powerful program, stable, complete and reliable. When my job will be completed I'll publish some thoughts about it.

Server part is so stable and secure, client part, expecially for Windows clients have some lacks, there're a lot of win client all around but every software I've tried has some lacks so as a lot of you I've decided to write my own.

Few of them have everything I need, except the license and price, I mean I think it's right to charge for your work but while talking about an high ranking opensource software I was thinking it has good opensource clients as well.

No matter I'm deploying a base installation with a lot of different clients so I think I'll buy some commercial clients suitable for my needs (I was really impressed about ifax.com HylaFSP client) but by the way I think I'll deploy even few clients maded by me, I'm in an Active Directory network and few considerations and limitations about existing open source clients made me take the decision of writing some clients on my own.

Now let's start with the basics, you've started reading this article for getting information about sending faxes from command line, don't you ?

While deploying my new client I've read about how to send something from command line, this solution will be integrated in my new client. First you need to install command line hylafax-client, check out your favorite distro, most of them have a package called "hylafax-client" (Gentoo, Debian based and others), if don't have it take a log at a command called sendfax, your distro should have it somewhere.

here's the command:

sendfax -f " This e-mail address is being protected from spambots. You need JavaScript enabled to view it " -R -r "Fax Subject" -c "Coverpage comments" -x "Your recipient" -d "Recipient@1234567890" sendfax.example.document.ps

First you need to create your example document in PostScript format, if you've installed hylafax you'll have ps2xx utilities (ps2pdf, ps2ascii, ps2txt, pdf2ps, ...), use them to convert from your current format to Postscript if you don't have a PS ready document (dummy example: pdf2ps input.pdf output.ps)

then modify parameters according to your email address if you want to receive notification about the job status (failed, success), fax subject, coverpage comments if you've it and so on, obviously change 1234567890 with your destination fax number.

Pretty easy, isn't it ?

That's why I'm writing my own windows and linux wrapper, backend sendfax program is so easy to use so I just need few changes for adapting my AD integration

 

Let me know your thoughts

Ben

 

 

Good programmers have small brains!

I found this great little article about one of the most important skills required to be a great programmer. I loved this quote.

"most of programming is an attempt to compensate for the strictly limited size of our skulls. The people who are best at programming are the people who realize how small their brains are."


Its so true! Acknowledging your limited capacity will definitely make you a better programmer. Ever had that NullPointerException and instantly blamed the framework your using or the JVM? Remember a good tradesman never blames his tools.

Heres the article: http://www.codinghorror.com/blog/archives/000051.html

 

Slackware

Slackware 12.2:

It's same old slackware  style -- a simple distro, but with a twist....

Aside from a new kernel that supports some new driverless web cams

It also packs an upgrade/patch tool in the form of slackpkg, which greatly simplifies getting the latest patches/upgrades.

 It also works with common wifi devices out of the box, so no need to search for and download  drivers for your wireless LAN devices

 Another thing to watch out for is the 64 bit Slackware, which may be coming out really soon...

check out www.slackware.com 

 

 

 

The Lean green eco-friendly Linux machine

Green IT is one of the hottest of today's technology trends, and the GNU/Linux community has risen to the challenge. Along with several corporate partners, the GNU/Linux operating system provides solutions for dealing with power consumption, carbon emissions, and e-waste. See the eco-friendly advances of the GNU/Linux and FLOSS communities with green computing practices and how you can help the cause.
 

OpenSUSE Weekly News #74 WIP

Hello Friends,

ATM i'm workin' on the OpenSUSE Weekly News Issue 74. If you have anything (Posts, Blogs or other), you can send this to: This e-mail address is being protected from spambots. You need JavaScript enabled to view it . So i can add this to the next Issue...

 

Counting the days.

As I wait for the next release of Fedora in 6 days, recently I have been spending some time away from GNU/Linux and playing with OpenSolaris UNIX. And might I add that it is a very impressive distribution. From the implementation of ZFS (and the Time Slider feature in GNOME) to Dtrace along with some other nice features.

I have worked with Solaris for many years and while Sun has always been ahead of its time with features and functionality, they always lacked in usability over the GUI. Usability over the CLI was always great and always there, it is just the GUI never looked good as it traditionally defaulted to CDE until recently (GNOME).

Spending more time with ZFS just makes me look forward to seeing a stable Btrfs in the Linux kernel.

 

Pardus 2009 Alfa

You can download it from here

Pardus 2009 Alfa Version came with these features:

KDE 4.2.3
Linux kernel 2.6.30_rc7
Openoffice 3.1rc6
Firefox Web Browser 3.5beta4
Gimp 2.6.6
Xorg 1.6.2pre
Python 2.6.2
GCC 4.3.3
GLIBC 2.9

and EXT4 and more ofc :D . Be sure that you burn your CD's with maximum 16X Speed and DAO mode. This is first testing version, you can send the problems you fond to http://bugs.pardus.org.tr/

 

Petition for Linux support by Netflix

Dear Linux user,

 Ken Starks started a petition to ask Netflix to support Linux. Especially, to support the 'Watch Now' function Netflix offers. If enough people sign this petition, I am sure that Netflix will do so, unless they have a really good excuse to turn their back on all Linux users.

Sure, Netflix uses DRM to protect their content, and a lot of Linux users consider DRM evil. However, opening Netflix for Linux is only a first step; showing them that there are Linux users willing to use Netflix but at this moment not able to be doing so.

 If you agree that Netflix supports Linux, please sign this petition. It may serve as an example to other companies as well.

 On behalf of everyone who'd like to use Netflix with Linux, let me say 'thanks'. And with Ken's famous words I sign.

 All righty then...

 

Pitivi 0.13.1

Huge updates to Pitivi are headed this way for July.  0.13.1 is the frame work that should be identical to the finished build with exceptions to the plug-ins.

Pitivi is powered by the Gstreamer and can work smoothly with any format Gstreamer can handle.  Since 2008 Collabora Multimedia has sponcered the ongoing development.

Newest release video can be found on YouTube.

 If you want help, support, or just learn more about the project you can find all this and more at pitivi.org.

 

ssh, scp without password to remote host (Look Ma, no Password !)

Here I'm, back again on SSH stuff, as you can see from my previous posts (search blogger name = "ben") OpenSSL and SSH stuff is very interesting and useful for me, so I wrote down a lot of notes on them, this time I'll show you how to connect to an SSH host without password input.

Yeah, I know, there're a lot of folks all around explaining you how to do that but I promise to make it easy 'n' dirty, without hassling you too much, just the basic steps for connecting to your remote host and make it working.

What would you do with this tutorial ? for example:

  • you can ssh to your remote host without requiring a password, this is safe and secure (it uses SSH public/private keys) until you keep your private keys for yourself. A quite recurring task if you've a lot of machines to manage
  • Copy files from an host to another, not only as utility but even for basic administration task, if you manage a network you know what I mean
  • Grant someone access to certain hosts for his job (be careful ok ?)
  • Use all the other SSL suite across hosts, this is not only for ssh or scp, all SSL suite is involved, look at my articles on SSH port forwarding for example, there are a lot of them (blogger: ben)
  • Impress your boss or whatever you'd like


Ok, let's get started

Let's assume you've two hosts:
mylocal - the host from where you want to connect
myremote - the host where you want to connect to

 

1) From mylocal create an ssh rsa key pair for host validation, here's how: 

mylocal:~# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx user@mylocal
The key's randomart image is:
+--[ RSA 2048]----+
....
+-----------------+



2) Now you need to copy the public key to your remote host, do NOT copy the private key, obviously use scp to do this

mylocal:~# scp ~/.ssh/id_rsa.pub myremote:~
Password:
id_rsa.pub 100% 391 0.4KB/s 00:00

so now you've your public key copied fine, let's connect to remote host now



 

3) Connect to your remote machine (myremote)

mylocal:~# ssh root@myremote (root or your remote username)
Password:
Last login: Wed May xx xx:xx:xx xxxx 2009 from mylocal on ssh
myremote ~ #



4) Check out .ssh stuff, if .ssh dir doesn't exist you need to create it

myremote ~ # ls -la ~/.ssh
ls: cannot access /root/.ssh: No such file or directory
If you get something like this you need to create the dir, so:
myremote ~ # mkdir .ssh
myremote ~ # chmod 700 .ssh



5) Now copy your ssh public key into authorized keys file and delete it when finished, so:

myremote ~ # cat ~/id_rsa.pub >> .ssh/authorized_keys
myremote ~ # chmod 600 .ssh/authorized_keys
myremote ~ # rm id_rsa.pub
NOTE: If you've a Debian remote host you MUST use this instead:
myremote ~ # cat ~/id_rsa.pub >> .ssh/authorized_keys2
myremote ~ # chmod 600 .ssh/authorized_keys2
myremote ~ # rm id_rsa.pub
First row is used for all major distros (Gentoo in my real example), Debian users must use the second one, check your ssh man page for details on your setup (first is the most common case)



6) FINAL TEST
Ok let's go back to our local host and try to make something to see what happens:

mylocal:~# scp example.file root@myremote:/tmp/
example.file 100% 169 0.2KB/s 00:00
mylocal:~# ssh root@myremote
Last login: Wed May xx xx:xx:xx xxxx 2009 from mylocal on ssh
myremote ~ # ls -la /tmp/example.file
total 1
-rwxr-xr-x 1 root root 169 May xx xx:xx example.file
Did you see it ? I'll hope so.
As you can see you can copy or connect to host without supplying passwds




Note (read)

Sometimes additional configurations are requested on remote ssh daemon, this may vary from your distro setup and basic security configuration, if final test failed you'll probably have PublicAuthentication or RSA disabled.
In this case you need to change them, don't worry it doesn't affect or lower your current security, tipically this change is done by editing /etc/ssh/sshd_config file, you need root access for it.
sshd_config path may vary between different distro even it's the most common name

To get the correct configuration, see that the following attributes are set (not commented or set to "no") in your sshd_config file

RSAAuthentication    yes
PubkeyAuthentication yes

If you change sshd_config file with these values you need to restart ssh daemon (something like: /etc/init.d/sshd restart)

 

Hope it helps someone
Let me know if you need help or further suggestions
Andrea Benini Ben

 

Comparing UNIX innovation

This article compares and contrasts some of the innovations of the latest releases of AIX 6.1, Solaris 10, and HP-UX. Learn the differences on how to work with certain tasks, such as networking and performance tuning. Also, see at a high level some of the virtualization differences among these big three. You decide what you prefer best.

 
Page 114 of 146

Upcoming Linux Foundation Courses

  1. LFD211 Introduction to Linux for Developers
    08 Dec » 09 Dec - Virtual
    Details
  2. LFS220 Linux System Administration
    08 Dec » 11 Dec - Virtual
    Details
  3. LFD331 Developing Linux Device Drivers
    15 Dec » 19 Dec - Virtual
    Details

View All Upcoming Courses


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board