The Linux and Unix Menagerie: “So I leave you with this pun, that both begs to be written and, at the same time, put out of its misery: You can’t have your Pi and eat it…”

Read Source

Leave your Comment

Vincent Danen introduces two command-line programs, wall and mail, that allow you to send simple alerts and e-mail messages to users.

———————————————————————————————————————

The command line is a great environment for doing many things. It can be used to schedule commands, navigate directories, chain simple commands together to create complex commands, automate system monitoring, and more. The flexibility that the command line offers makes it worth investing the time into learning more about it, as its power far exceeds that of GUI operating environments.

CLI environments, especially with multi-user systems such as servers, provide a great way to communicate between users as well. Two tools in particular are of great value: wall, which will communicate messages on all active consoles, and mail, which will send e-mail via the command-line.

Wall is an interconsole “instant messenger” and is available on all Linux and UNIX systems. With it, you can broadcast alert messages, such as an impending system reboot or other maintenance process. Using wall is simple:

$ wall "just fooling around"

Broadcast message from vdanen (pts/16) (Mon Aug  4 20:47:03 2008):

just fooling around

Any user logged into the system will see the identical notice. The only exception is when a user has set their “message” flag off. For instance, to disable seeing these wall notices, use:

$ mesg n
$ mesg
is n

The mesg command takes exactly one of two arguments: y and n; if no argument is supplied, it shows the current message value.

Another useful tool is the mail command, which will send e-mail messages on the CLI. This can be used in conjunction with a command such as at to send reminder e-mails, or it can be used to send an alert when a task or command is complete. There are a few different providers of the mail command; some distributions use the mailx package, others use nail, others the original Berkely mail package. If mail doesn’t work as expected, read the mail(1) manpage. Most mail commands use the same syntax for the basics, however. To send an e-mail to an SMS relay to alert you of an upcoming meeting, use:

$ echo "20 minutes to meet with Sally." | /bin/mail -s "Meeting" sms@myhost.com

This will send an e-mail with the subject “Meeting” to sms@myhost.com; the body of the message will contain, “20 minutes to meet with Sally.” As has been illustrated, this can be used as a quick means of sending reminders, or it can be used to send the output of jobs when completed. The mail command takes standard input as the body of the message; other options can be used to specify CC and BCC recipients as well.

E-mail messages sent via mail are sent from the calling user on the system’s hostname; for instance, if the user account joe were sending this on the system foo.bar.org, then the e-mail would be seen to come from joe@foo.bar.org. Because of this, you may want to ensure proper message rules are in place that permit the relaying or reception of these addresses, or adjust the hostname of the computer accordingly.

Get the PDF version of this tip here.

Delivered each Tuesday, TechRepublic’s free Linux and Open Source newsletter provides tips, articles, and other resources to help you hone your Linux skills. Automatically sign up today!




Read Source

Leave your Comment

The KDE community has released KDE 3.5.10, a maintenance release for the KDE 3.5 series of the popular Linux desktop. Meanwhile, KDE developers continue work on bringing service-oriented computing to KDE, as well as a new Amarok media player and enhanced Qt support. KDE also has adopted the Free Software Foundation Europe’s Fiduciary License Agreement.
- The KDE Community has announced the
availability of KDE 3.5.10, a maintenance
release of KDE, the free desktop for GNU
Linux and other Unix flavors.
The KDE desktop is the system of choice
for a broad array of Linux users. And although the KDE
community released KDE 4.1 at the end of
July, K…

Read Source

Leave your Comment

Recently I wrote about how you can open (and use) Linux applications in Windows using a combination of PuTTY and XWin32. This system was fairly easy but a bit cumbersome. With a recent update to XWin32 Live, PuTTY has been removed from the equation and the setup/use is now easier than ever.

How XWin32 Live makes this easier is with the simple integration of PuTTY into XWin32. And it’s not just easier now — it’s also cleaner. Gone is the unsightly (and unwieldy at times) full-screen gray X Windows box that had to remain open during your session. Now everything is packed tightly into one small window.

Let’s take a look at how this is done.

This blog post is also available in PDF format in a TechRepublic download.

Getting and installing

To get the latest XWin32 Live download, head over to the download page on StarNet and download the file that fits your version of Windows. Once the file is downloaded, install it by double-clicking the icon.

Running XWin32 Live

Now that XWin32 Live is installed, you need to first run the X-Config application from the XWin32 X.X menu on the Start menu (where X.X is the release number). When you open this window, you will be greeted by the main configuration window (Figure A) that contains everything you need to get your XWin32 instance set up.

Figure A

Here you see a session already set up (monkeypantz), which was quickly created using the Wizard.

The first thing you need to do is click on the Wizard button. This wizard will walk you through the setup of your XWin32 session. The first step in the Wizard is to select the session type and give the session a name (Figure B). Select SSH and enter a name for the session.

Figure B

In order to use the Live session type, you must have the Live server set up on your Linux machine.

Once you have completed this step, click Next.

The second step is to enter the host you will be connecting to (Figure C.) This can be either an FQDN or an IP address. Once you have completed this step, click Next to move on.

Figure C

When using SSH, the SSH daemon must be running on the host machine.

The third step is to enter the username and password you will use to connect with (Figure D). This username and password must be a valid username/password combination that exists on the host machine. Once you have completed this step, click Next.

Figure D

If you allow root ssh login, you can use the root user — but I wouldn’t suggest it.

The final step in the configuration is to select the command to run on the remote host (Figure E). Now don’t worry, you don’t have to know the actual Linux command. In fact, all you need to do is select from the list. Select Linux (unless you know you are connecting to a different type of machine that requires a different terminal listing command or the addition of X auth). Once you have completed this configuration, click Finish and you’re ready to start a session.

Figure E

As you click on each type, the command will appear in the Command line. Or you can just enter the command manually.

Starting an XWin32 Live session

Once you have finalized your configuration, you will notice the XWin32 Live Icon in the System Tray (Figure F). If you right-click on that icon, you will notice a “My Session” entry in the menu. Click on that to reveal the configured sessions you have. Select the session you want to connect to and fairly quickly that X session will connect. The only thing you will see is the equivalent of the Windows command window (Figure F) and a message window telling you the session has successfully connected (Figure G).

Figure F

This window is actually an Aterm instance running in the Windows command window.

Figure G

You can safely close this window once you have connected.

Once you are connected, you can issue the command to run the Linux application you want to run. As you can see in Figure H, I have Konqueror running in Windows XP. Konqueror runs exactly as it would in Linux (with the exception that Konqueror cannot, through XWin32, copy or move files from the host to the client).

Figure H

You can navigate around the Linux system, and you can move files from one location on the host to another (just not from host to client).

Once you close the XWin32 session and the XWin32 icon is no longer in the System Tray, you will need to go back to the Start Menu, open the X-Win X.X submenu, and select X-Win32 to place the start-up icon back in the System Tray.

Other configuration options

There are a number of other configuration options in the X-Config window. In the Security tab you will notice a section for Allow By XAuth Cookie and Allow By Address. If you choose to use Allow By XAuth Cookie, you will need to import the ~/.Xauthority binary file from the Linux host to the Windows client machine. Once using this, you will be sure that only connections to machines that match that cookie will be allowed. The same thing, in a simpler manner, is enabled when you configure XWin32 to connect to only specific hosts.

Final thoughts

StartNet has made tunneling Linux/UNIX applications onto Windows machines even easier. Gone is the clutter of the unsightly X Windows screen as well as the need for a separate SSH client. So if you have a need to run Linux/UNIX applications on your Windows machine, this is truly the best option.




Read Source

Leave your Comment