Issue13

Differences between revisions 14 and 15
Revision 14 as of 2006-09-08 22:37:30
Size: 15651
Editor: 194
Comment:
Revision 15 as of 2006-09-09 00:40:06
Size: 19008
Editor: 194
Comment:
Deletions are marked like this. Additions are marked like this.
Line 239: Line 239:
== Feature Of The Week - ??? == == Feature Of The Week - keeping tasks alive ==

Go away or I shall replace you with a shell script!
How to keep jobs running and running.

Assumes you are running Ubuntu for the terminal.
Assumes you know somewhat familiar with what sudo is
 * http://help.ubuntu.com/community/RootSudo

This slogan found on some tee shirts actually has its roots in good system administration practice.
Imagine you have a process that falls over now and again if it there are times where it necessary to keep it going to you don't have to get out of bed to look after an angry customer in a different timezone.
Enter the joys of a shell script and inittab.

The simplest way to do it is in a line of text like this in a terminal*:

{{{
while : ; do echo “Do you Ubuntu ?”; sleep 2; done
}}}

However a misplaced “Control C” will cease the operation of this vital command.
A quick look at the command line here, we can break it down as follows:
{{{
while
}}}
the while command
{{{
: ;
}}}
Here we normally check for a condition, however it is a blank space so we have no conditions, In our case as we never want the code to cease operating so we put no conditions in there. ;-)
{{{
do echo “Do you Ubuntu ?”;
}}}
Here we do the real work, after the word do, in this case we use the command echo to produce on the screen the words Do you Ubuntu ?.
{{{
sleep 2;
}}}
When the code finishes check wait for two seconds and then move on.
{{{
done
}}}
If the condition that is checked for after “while” is met then exit.


If you need to keep a job going when you restart the box you have a choice put it in cron, or better still put it in inittab.


To do this do in a terminal add the following line to /etc/inittab

The line must start with a unique two letter combination at the start as an identifier. In this case we will use “aa”.

First let us create the previous command in a script. We are going to save the commands in a file called my_first_daemon in the /usr/sbin/ directory.

This can be done by using the command “nano” and using it in cojunction with “super user privileges”.

In a terminal:
{{{
sudo nano /usr/sbin/my_first_daemon
}}}
Enter this data into the file.
{{{
#!/bin/sh
date >> foo
ls -al >> foo
sleep 2
}}}

Save the file and exit.
{{{
Ctrl + X
Choose Y from the options.
}}}
Now let us tell the inittab file about the file so that it can keep the process running.
To add this script to the inittab file we need to edit the inittab file, this is done again using nano.
{{{
sudo nano /etc/inittab
}}}
We add this to the last line of the file.
{{{
aa:23:respawn:/usr/local/sbin/my_first_daemon
}}}
Then we restart init to allow the process to kick off.
{{{
sudo kill -HUP 1
}}}
If the command respawns too quickly it will be stopped in its tracks and a more measured response will occur. An attempt to start it again will occur. Then a while later it will relaunch the command.

This is all fine until you want to run a program as an ordinary user.
{{{
aa:23:respawn:/usr/bin/sudo -u username /usr/local/sbin/my_first_daemon
}}}
Please note the full paths to both files, they are needed for correct execution.

This is a rather light let of instuctions, you can find out a lot more with the following commands.
{{{
man sudo
}}}
{{{
man nano
}}}

WORK IN PROGRESS

Ubuntu Weekly Newsletter - Issue # 13

Ubuntu Weekly Newsletter - Issue # for the week of Sept 3 - 10 2006

You can always find this and other Ubuntu Weekly Newsletter Issues at: https://wiki.ubuntu.com/UbuntuWeeklyNewsletter

In This Issue

General Community News

Upstart goes live

Scott James Remnant threw the switch early this week and made upstart the default init for Edgy. Users of edgy will notice the following new packages:

  • startup-tasks definitions of essential tasks to run on startup

  • system-services - definitions of essential system services

    • these two packages are the upstart equivalent of "initscripts"
  • upstart - event-based init daemon

  • upstart-compat-sysv - compatibility for System-V-like init

Security Updates

After a pair of quiet weeks, there were 4 security updates this week:

Ubuntu 6.06 LTS Updates

New Apps In Edgy

Edgy sees GNOME 2.16 this week, uploads of which started on the 3rd and continued all the way through the formal release of GNOME 2.16 on the 7th. GNOME uploading team Sebastian Holbach were reportedly up very early some mornings, eager to beat each to packaging more of GNOME.

It used to be that when you popped an Ubuntu cd in, it would ask you if you wanted to upgrade, even if you had put a 4.10 cd in your 5.10 computer. Michael Vogt has finally fixed this and thus renabled support for this feature in update-notifier 0.43.1.

Over the past several weeks the KDE Guidance team has been working on usability of the tools, which has resulted in several straight-from-SVN uploads by various Kubuntu developers, including Anthony Mercatante.

The final pieces of work on LTSP came together this week. Oliver Grawert uploaded ltsp 0.99, which turned on session and login selection in LDM, the login manager for thin clients. In addition, code for the sole essential spec for Edgy, ltsp-dhcp-autogeneration, landed in ltsp 0.100.

Pete Savage was being doing a great deal of work with the student control panel, a tool for teachers to be able to see and control their students desktops. With student-control-panel 0.4.1, his work of providing lockdown (via the GNOME lockdown tool, Pessulus), killing processes, sending messages and start applications on the students machines arrives.

Another Summer of Code project hit the archives this week, this time it was Chris Jones' onBoard 0.81 (previously known as SOK or Simple Onscreen Keyboard), an onscreen keyboard. Also uploaded was a helper library, virtkey 0.41, which emulates the key presses onboard sends out.

Other new releases include: mono 1.1.17.1 dbh 4.5.0 fspot 0.2.0 (bug fixes and beginnings of new development work)

Ubuntu

Kubuntu

KDE 4 Packages

Packages of the first KDE 4 developers release are now available for Edgy from kubuntu.org and will soon be appearing in the Ubuntu archive. These are very much for developers and testers only, good luck with them.

http://kubuntu.org/announcements/kde4-3.80.1.php

Kubuntu Support Team

The Kubuntu Support Team is a group of Kubuntu enthusiasts who have taken it upon themselves to ensure that community support for Kubuntu is as good as it is for Ubuntu. They will be working with and within existing teams to ensure wiki pages, IRC support, documentation and forums have correct instructions for Kubuntu throughout.

https://wiki.kubuntu.org/KubuntuSupportTeam

Kubuntu Meeting

Our community meeting welcomed in a new Kubuntu Memeber in Fathi Boudra, who has been packaging numberous applications in both Kubuntu and Debian. We also discussed critical bugs to be fixed, the possibilities of Strigi and Digikam, feedback and bug reporting with likeback & gdb and the Kubuntu Support Team.

https://wiki.kubuntu.org/Kubuntu/Meetings

Kubuntu Community Coordinator

At the last Community Council Hobbsee was given the title of Kubuntu Community Coordinator, if you want to know how to help out in Kubuntu give Hobbsee a ping on IRC and you will be sent in the right direction.

Updates to Guidance and System Settings

Sebas has blogged about his work on the new power manager applet

http://vizzzion.org/?blogentry=631

Meanwhile Sime has been busy improving the search feedback in System Settings, and improving the layout of the gamma tool in displayconfig, both now available in Edgy.

Willow NG Available for KDE

The web filtering tool from Edubuntu, Willow NG, has been ported to KDE thanks to Robert Day as part of the Ichthux project.

Available in Edgy (soon) as willowng-config-kde.

Edubuntu

Xubuntu

Launchpad News

Warning /!\ NO CLUE what I'm doing, edit at will! -- kiko


Highlights


Welcome to another round of Launchpad updates. This has been an even busier three weeks, and the list of changes below seems to go on forever!

Bug tracking

Let's start out by covering a feature in our bug tracker I would like to call your attention to. The advanced search page for bugs now provides a set of interesting options for people managing bugs for a distribution: filtering based on status of remote bugs and upstream reports linked to your bug. Launchpad now offers three new filtering options:

  • Bugs that need to be linked upstream
    • Ubuntu URL: http://tinyurl.com/oavke The first option is very useful for the bug triage team: it points out bugs that have been identified as upstream issues but for which no remote bug watch has been established yet.

  • Bugs that are closed upstream:
    • Ubuntu URL: http://tinyurl.com/kdjx7 This option is useful for package maintainers: it points out bugs that have been marked as resolved (or rejected) upstream. These bugs are prime candidates for packaging work, because all that's needed to fix the issue is package a new version.

  • Bugs not known to affect upstream:
    • Ubuntu URL: http://tinyurl.com/l49be This option lists bugs which have not been identified as upstream issues; this is currently the vast majority of bugs open on Ubuntu.

This update also provides us with a number of improvements to bug tags: creating a new tag now offers a confirmation step, you can do advanced searches for tags, and the portlet listing bug tags includes counts of open bugs.

Translations

On the translations front, we are (finally) proud to announce the opening of Edgy translations in Rosetta! After a lot of hard work in getting the initial data setup right, and processing a billion uploaded templates and translations, Rosetta is now offering translators with a new distribution release to work on, but without losing the work that was done in Dapper.

Rosetta now also displays the identity of the person who entered the latest version of an approved translation for a string. This allows translation reviewers to assess work done and provide feedback to translators, tightening the process of getting top quality translations.

Support

A number of important changes also went live on the support tracker this week. If you visit the Ubuntu page for tickets at:

you'll notice that the display is now formatted using a table, which provides a much more compact display of tickets. It also allows for simple searching and ordering through tickets, one of the top requested features for the support tracker; as an example you can see open tickets sorted newest first at:

New support requests now go through a guided process, which first tries to locate similar reports, avoiding duplicates and helping users get answers faster. You can test this for yourself on our staging server:

and entering a summary; the next step will list similar tickets, if they are found.

Also new in the support area is the fact that Karma is properly attributed to people providing answers and updating tickets; the listings will soon be updated to include the top contributors in this area as well.

Other news

Other noteworthy updates: the official URL for the specification tracker has been changed to http://features.launchpad.net/ as part of our branding cleanup. A /very/ serious amount of work went into refactoring and cleanup of Soyuz, our distribution management system, and we are currently in the process of running our first smoketest to verify that the changes were successful (and we caught a performance regression already). On the branch management front you can now safely change branch metadata without causing imports to fail; this should make the feature more robust over time and is one of the first practical benefits of the bzr transition.

Finally, handling of OpenPGP and SSH keys has been overhauled and sanitized; if you had trouble registering keys, or signing the Code of Conduct, now would be a great time to test and provide us with feedback.

Again, I'll close by reminding people of the launchpad-users mailing list which is shared between developers and users of Launchpad:

Come help us define what Launchpad should become. Thanks!


Read the full announcement, including a detailed changelog, at:


Bug Stats

New Bugs: # BR Closed Bugs: #

Infamous Bugs

In The Press

Media watchers may have noticed that Forbes is paying an unusual amount of attention to Linux and open source software. That positive trend continues with their look at Mark Shuttleworth and Ubuntu.

"Ubuntu now has 4 million users, half of which are governments, universities and a smattering of businesses. It adds new ones at a rate of 8% per month. After its public release in October 2004, Ubuntu quickly deposed Red Hat's Fedora as the most popular version of Linux on DistroWatch, a Web site that caters to Linux users. Ubuntu works in 22 languages, and Canonical, the company Shuttleworth set up to distribute his software, will send a free Ubuntu CD anywhere in the world. New users rave about the simple user interface, which has gained recent converts in a couple of well-known bloggers who switched from Apple Computer's OS X."

There's more at http://www.forbes.com/technology/2006/09/05/linux-ubuntu-opensource_cz_mr_0906shuttleworth.html

Tectonic interviews Canonical's education programme manager Richard Weideman in its look at the prospects for open source in education.

"We are also participating in high level projects and studies, funded by organisations such as the European Union, to build blueprints for the next generation. These collaborations of education experts and learning culture experts, alongside technical organisations like ourselves, take the benefits of an open source future for education as a given," he says.

"Right now, open source is now firmly on the education agenda; it is no longer a fringe element but a cornerstone. This is the year to be on the lookout for large scale deployment and successes."

Read more at http://www.tectonic.co.za/view.php?id=1146

Feature Of The Week - keeping tasks alive

Go away or I shall replace you with a shell script! How to keep jobs running and running.

Assumes you are running Ubuntu for the terminal. Assumes you know somewhat familiar with what sudo is

This slogan found on some tee shirts actually has its roots in good system administration practice. Imagine you have a process that falls over now and again if it there are times where it necessary to keep it going to you don't have to get out of bed to look after an angry customer in a different timezone. Enter the joys of a shell script and inittab.

The simplest way to do it is in a line of text like this in a terminal*:

while : ; do echo “Do you Ubuntu ?”; sleep 2; done

However a misplaced “Control C” will cease the operation of this vital command. A quick look at the command line here, we can break it down as follows:

while  

the while command

: ;

Here we normally check for a condition, however it is a blank space so we have no conditions, In our case as we never want the code to cease operating so we put no conditions in there. Wink ;-)

do echo “Do you Ubuntu ?”;

Here we do the real work, after the word do, in this case we use the command echo to produce on the screen the words Do you Ubuntu ?.

sleep 2;

When the code finishes check wait for two seconds and then move on.

done 

If the condition that is checked for after “while” is met then exit.

If you need to keep a job going when you restart the box you have a choice put it in cron, or better still put it in inittab.

To do this do in a terminal add the following line to /etc/inittab

The line must start with a unique two letter combination at the start as an identifier. In this case we will use “aa”.

First let us create the previous command in a script. We are going to save the commands in a file called my_first_daemon in the /usr/sbin/ directory.

This can be done by using the command “nano” and using it in cojunction with “super user privileges”.

In a terminal:

sudo nano /usr/sbin/my_first_daemon

Enter this data into the file.

date >> foo
ls -al >> foo
sleep 2

Save the file and exit.

Ctrl + X
Choose Y from the options.

Now let us tell the inittab file about the file so that it can keep the process running. To add this script to the inittab file we need to edit the inittab file, this is done again using nano.

sudo nano /etc/inittab

We add this to the last line of the file.

aa:23:respawn:/usr/local/sbin/my_first_daemon

Then we restart init to allow the process to kick off.

sudo kill -HUP 1

If the command respawns too quickly it will be stopped in its tracks and a more measured response will occur. An attempt to start it again will occur. Then a while later it will relaunch the command.

This is all fine until you want to run a program as an ordinary user.

aa:23:respawn:/usr/bin/sudo -u username /usr/local/sbin/my_first_daemon

Please note the full paths to both files, they are needed for correct execution.

This is a rather light let of instuctions, you can find out a lot more with the following commands.

man sudo

man nano

Upcoming Events

Hungarian Ubuntu Conference 2006

The [http://www.fsf.hu FSF.hu Foundation] and the [http://ubuntu.hu Hungarian Ubuntu Community] proudly presents the first Hungarian Ubuntu Conference. Many well-known developers have accepted our invitation to present, in English some Ubuntu related projects: Mario Đanić (Edubuntu Developer), Ante Karamatić (Ubuntu Developer, Ubuntu Printing Team), Jani Monoses (Xubuntu Lead Developer), and Raphaël Pinson (Kubuntu Core Developer, Itchtux Lead Developer).

The conference will be held on the 28th October, 2006 (Saturday) in Building 'I' of the Budapest University of Technology and Economics, Budapest, Hungary.

We also plan to have the presentations streamed online, so that anybody can watch in real time. Stay tuned for futher info on that!

For more informations, please visit the [http://ubuntu.hu/konf/?q=english homepage] of the conference. The organizers are happy to help you with anything, including travel infomation or cheap accomodation, just use the contact form.

Linuxfest Ohio

The one-day Linuxfest Ohio has been announced for 30th September 2006 with an impressive list of presenters. Opening the show is an Ubuntu double-bill from Jeff Waugh with "Linux for Human Beings", followed by Jorge "whiprush" Castro:

Registration for the event, to be held at the the Greater Columbus Convention Centre is free:

If the Ubuntu showing didn't impress you. Jon "maddog" Hall will be there, along with Michael Johnson (of 'rpm' fame) showing off 'rbuilder'. Chris DiBona will be leaking secrets from Google and to top it off, the Columbus Zoo keepers are promising to attend with a pair of Genuine Real Live Penguins(tm). Don't let our feathered friend see Tuxracer!

Software Freedom Day

September 16th 2006:

Software Freedom Day (SFD) is a worldwide celebration of Free and Open Source Software (FOSS). Our goal in this celebration is to educate the worldwide public about of the benefits of using high quality FOSS in education, in government, at home, and in business -- in short, everywhere! The non-profit company Software Freedom International provides guidance in organizing SFD, but volunteer teams around the world organize their own SFD events to impact their own communities.

To find out how you can do it yourself learn more here:

You can prepare by burning some disks yourself and join the community out there.

Additional News Resources

As always you can find more news and announcements at:

and

Conclusion

Thank you for reading the Ubuntu Weekly Newsletter. See you next week!

Credits

The Ubuntu Weekly Newsletter is brought to you by:

  • Corey Burger
  • Christian Reis
  • Szilveszter Farkas
  • John Little
  • Paul Sladen
  • Jonathan Riddell
  • anyone else that contributes
  • And many others

Feedback

This document is maintained by the Ubuntu Marketing Team. Please feel free to contact us regarding any concerns or suggestions by either sending an email to ubuntu-marketing@lists.ubuntu.com or by using any of the other methods on the [https://wiki.ubuntu.com/MarketingTeam Ubuntu Marketing Team Contact Information Page].

UbuntuWeeklyNewsletter/Issue13 (last edited 2008-08-06 17:00:53 by localhost)