If you use sudo you can automatically re-start scripts that need to be run as root by adding a check at the beginning of the script and executing sudo if the script is not running as root:
if [[ $UID -ne 0 ]]; then sudo -p 'Restarting as root, password: ' bash $0 "$@" exit $? fi The inclusion of "bash" in the sudo command is to avoid problems if the script does not have its execute bit set. The "exit $?" causes the shell to exit with the status from the script instance that sudo runs. __________________________ Mitch Frazier is the System Administrator at Linux Journal Original link: http://www.linuxjournal.com/cont... Movino is a cool new open source project (geared specifically at Linux and Mac OS X) which allows you to send live video feed from your cellular phone to your website.
Movino consists of: * A broadcasting application for Symbian S60 phones Movino was written by Martin Storsjo, Johannes Berg, Tom Sundstrom and Johan Waaramaki. Good job, guys -- thanks for the fun new toy. Check out Movino for yourself. __________________________ Carlie Fairchild is the publisher of Linux Journal. Original link: http://www.linuxjournal.com/cont... If you need to remove a path from the PATH variable before your script runs add this to the beginning of the script:
PATH=$(echo $PATH | sed -e 's;:\?/home/user/bin;;' -e 's;/home/user/bin:\?;;') If you need, you can re-add it at the front of the list with: PATH=/home/user/bin:$PATH Or you can re-add it at the end of the list with: PATH=$PATH:/home/user/bin Original link: http://www.linuxjournal.com/cont... Version 1.0 This guide explains how to integrate APC (Alternative PHP Cache) into PHP5 on a Fedora 8 system (with Apache2). APC is a free and open PHP opcode cacher for caching and optimizing PHP intermediate code. It's similar to other PHP opcode cachers, such as eAccelerator and XCache. I do not issue any guarantee that this will work for you!
1 Preliminary NoteI have tested this on a Fedora 8 server with the IP address 192.168.0.100 where Apache2 and PHP5 are already installed and working. I'll use Apache's default document root /var/www/html in this tutorial for demonstration purposes. Of course, you can use any other vhost as well, but you might have to adjust the path to the info.php file that I'm using in this tutorial.
2 Checking PHP5's Current StateFirst, before we install APC, let's find out about our PHP5 installation. To do this, we create the file info.php in our document root /var/www/html: vi /var/www/html/info.php Afterwards, we call that file in a browser: http://192.168.0.100/info.php As you see, we have PHP 5.2.4 installed... Version 1.0
Author: Falko Timme Last edited 04/15/2008 This tutorial shows how you can set up a Mandriva One 2008 Spring (Mandriva 2008.1) desktop (with the KDE desktop environment) that is a full-fledged replacement for a Windows desktop, i.e. that has all the software that people need to do the things they do on their Windows desktops. The advantages are clear: you get a secure system without DRM restrictions that works even on old hardware, and the best thing is: all software comes free of charge. I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!
1 Preliminary NoteTo fully replace a Windows desktop, I want the Mandriva One 2008 Spring desktop to have the following software installed: Graphics:
Internet:
The final release of Fedora 9 has been delayed by two weeks, so I thought I’d take this chance to look at what you can expect from Fedora 9 and why you should be excited! Oh, and if you want other people to feel as excited about Fedora 9 as you’re going to once you’ve finished reading this article, why not give it a digg. New Desktops Fedora 9 ships with GNOME 2.22 and KDE 4.03 by default, and while KDE 4.0x has received a lot of attention and buzz in the free software world, this GNOME release is also very exciting. Softpedia called it “A truly amazing desktop!”, and with features like Cheese, the new international clock and integrated window compositing they could be right. One significant feature that has appeared in this release that has come from active Fedora developer Alexander Larsson is the improved file management abilities provided by GVFS, allowing the queuing of file transfers and increased resilience to failures. Also new in GNOME for Fedora 9 is integration of support for the X RandR extension: this allows a user to do many things, including drag and drop configuration of multi-head monitor set-ups. This particular feature landed too late to make it upstream for the 2.22 release, but it will be included in the next up-stream release; it has already been taken up by other distributions too, so great work Sren! If this feature interests you, check out this cool video on John Palmieri’s blog that shows it in action. As I said already, KDE 4.03 is set to be included in the final release as the default KDE option. Traditionally, Fedora has been seen as a GNOME centric distribution, but as a result of the hard work of the KDE SIG [Special Interest Group] this is no longer the case and KDE can be seen as an equal citizen in Fedora. The fact that Fedora is set to be the first major distribution to ship KDE 4 by default, and with so much attention given to the details such as ensuring that all KDE 3.x applications will continue to work, demonstrates Fedora’s ongoing commitment to providing users with the latest and greatest free software on a stable platform, while providing upstream developers with increased exposure which is guaranteed to improve the quality of their software. If you need to copy a CD to your hard drive:
prompt@shell$ dd if=/dev/cdrom of=/path/to/cdcopy.iso For a DVD: prompt@shell$ dd if=/dev/dvd of=/path/to/dvdcopy.iso Original link: http://www.linuxjournal.com/cont... |
This week we take a look at the all-time favorite articles ever featured on LinuxJournal.com. We'll feature the top 25 in this series, presenting you with five each day this week. These 25 articles alone represent tens of millions of page views on LinuxJournal.com. Top Articles 1 - 55. The Ultimate Linux/Windows Systems by Kevin Farnham I recently converted my Toshiba notebook computer into a dual-boot system, running Windows XP Pro and Ubuntu Linux. I was hoping I'd be able to use cross-platform applications such as Mozilla Firefox, Mozilla Thunderbird, AbiWord, Gnumeric and SciTE transparently, no matter which operating system was currently booted. This article describes the steps I took to make this possible. Read more. 4. The Ultimate Distro by Glyn Moody The name of Gaël Duval's new distro, Ulteo, with its hint of the word "ultimate", smacks of a certain ambition. But Duval probably means it in the sense that it is the last distribution you will ever need to install, because thereafter it will "self-upgrade automatically," as the announcement of the alpha release put it. Ease-of-use has been a constant theme in Duval's work. When he launched his first distro, Mandrake, in July 1998, one of his stated goals was "to provide a working and easy-to-install linux-distribution to people who don't want to spend too much time in installing and configuring their Linux system : just install it and USE IT." Read more. 3. Boot with GRUB by Wayne Marshall GRUB: it's neither larva, fast food nor the loveliest of acronyms in the GNU herd of free software. Rather, GRUB is the GNU GRand Unified Bootloader. And, it is truly the greatest loader for booting Linux and practically any other OS—open source or otherwise—you may have scattered on your platters. Read more. 2. GNU/Linux DVD Player Review by Jon Kent Playing DVDs under GNU/Linux has not had the happiest of histories, what with the DeCSS debacle and subsequent legal battle. So you'd be forgiven for thinking that you will never be able to play your DVDs on your GNU/Linux system. Luckily, this is not the case, and there are several applications available for you to download and use. The issue with DeCSS is still with us but is slowly getting clearer. However, this has left some of the DVD players officially not supporting encrypted DVDs, although unofficially, playback is possible via third-party additions. Read more. 1. Why Python by Eric Raymond My first look at Python was an accident, and I didn't much like what I saw at the time. It was early 1997, and Mark Lutz's book Programming Python from O'Reilly & Associates had recently come out. O'Reilly books occasionally land on my doorstep, selected from among the new releases by some mysterious benefactor inside the organization using a random process I've given up trying to understand. Read more. Original link: http://www.linuxjournal.com/cont... This week we take a look at the all-time favorite articles ever featured on LinuxJournal.com. We'll feature the top 25 in this series, presenting you with five each day this week. These 25 articles alone represent tens of millions of page views on LinuxJournal.com. Top Articles 6 - 1010. Exchange Functionality for Linux by Hans-Cees Speel Previously I reviewed a mail server for Linux that features integration with Microsoft's Outlook and offers calendaring/scheduling options with shared busy/free information. However, it did not have many features that Outlook offers in corporate mode, including sending meeting requests to groups of users who can then reply and delegating rights so secretaries can manage their bosses agendas on-line. This current review shows a year's time was enough for Linux solutions to arise that can compete with Microsoft Exchange and Outlook and offer a lower price, with all the important features included. Read more. 9. 3D Xgl Compiz Eye Candy for Ubuntu/Kubuntu Dapper and NVidia by Nicholas Petreley To each his own, but I love eye candy. When I heard that you could get the 3D Xgl and Compiz environment running on Ubuntu/Kubuntu dapper (my default distribution), I immediately searched the web for instructions. Most of the instructions take a reasonably timid approach, which gets your 3D environment running in a test console (the second display, or :1). I'm more adventurous, however, and I immediately went for a total replacement. What follows are instructions for doing the same. Read more. 8. Industrial Light and Magic by Robin Rowe Star Wars, Episode II: Attack of the Clones, released in May 2002, is Industrial Light & Magic's (ILM) first movie produced after converting its workstations and renderfarm to Linux last year. Located north of San Francisco in San Rafael, California, ILM was founded in 1975 to produce the visual effects for Star Wars. Although owned by George Lucas, ILM produces visual effects for more than Lucasfilm productions, such as the Star Wars and Indiana Jones films. Many other studios seeking that bit of something extra on the cutting edge of special effects use ILM. ILM has received 14 Academy Awards, including ones for its work on Forrest Gump, Jurassic Park, Terminator 2, Who Framed Roger Rabbit? and E.T. Read more. 7. Building a Call Center with LTSP and Soft Phones by Michael George A new customer approached us with a need to provision the office. The customer was receptive to open-source software and was interested in using Linux. Being a nonprofit organization, the budget for the project was tight. Read more. 6. Python Programming for Beginners by Jacek Artymiak Despite what assembly code and C coders might tell us, high-level languages do have their place in every programmer's toolbox, and some of them are much more than a computer-science curiosity. Out of the many high-level languages we can choose from today, Python seems to be the most interesting for those who want to learn something new and do real work at the same time. Its no-nonsense implementation of object-oriented programming and its clean and easy-to-understand syntax make it a language that is fun to learn and use, which is not something we can say about most other languages. Read more. Original link: http://www.linuxjournal.com/cont... This week we take a look at the all-time favorite articles ever featured on LinuxJournal.com. We'll feature the top 25 in this series, presenting you with five each day this week. These 25 articles alone represent tens of millions of page views on LinuxJournal.com. Top Articles 11 - 1515. UNIX under the Desktop by Doc Searls and Brent Simmons When Steve Jobs introduced Apple's new iMac in January 2002, the spotlight was focused entirely on the physical architecture of the first mainstream computer that fully defied the term “box”. The new iMac is a white dome with a flat screen that floats on the end of a chrome arm. It looks like a cross between a Luxo lamp and a makeup mirror. Jobs called it “the best thing we've ever done”. Read more. 14. Getting a Windows Refund in California Small Claims Court by Steve Oualline Getting a Microsoft Windows refund from a manufacturer is seldom easy to do. In this article, I describe some techniques you can use to get your refund, including how to deal with the manufacturers (and all their excuses) and going to small claims court. Read more. 13. Setting up a VPN Gateway by Duncan Napier A virtual private network (VPN) is a tool that enables the secure transmission of data over untrusted networks such as the Internet. VPNs commonly are used to connect local area networks (LANs) into wide area networks (WANs) using the Internet. Perhaps you need to build a VPN between two offices but are not sure if the large infrastructure costs associated with an enterprise-level VPN solution are justifiable. The performance of applications that are intended for use over LANs (for example those that use network file sharing) seriously can be degraded over WAN connections. Likewise, lower bandwidth and longer latency in WAN connections can affect adversely the reliability and performance of groupware and thin-client applications. Perhaps you have a home office and would like to use your high-speed internet access to connect seamlessly and securely to your office LAN through an IPSec-capable router. Or perhaps you are just curious about VPNs and IPSec in general and want to experiment. Read more. 12. Monitoring Hard Disks with SMART by Bruce Allen It's a given that all disks eventually die, and it's easy to see why. The platters in a modern disk drive rotate more than a hundred times per second, maintaining submicron tolerances between the disk heads and the magnetic media that store data. Often they run 24/7 in dusty, overheated environments, thrashing on heavily loaded or poorly managed machines. So, it's not surprising that experienced users are all too familiar with the symptoms of a dying disk. Strange things start happening. Inscrutable kernel error messages cover the console and then the system becomes unstable and locks up. Often, entire days are lost repeating recent work, re-installing the OS and trying to recover data. Even if you have a recent backup, sudden disk failure is a minor catastrophe. Read more. 11. Streaming MPEG-4 with Linux by Donald Szeto Seven years ago, when I was still a clueless kid, I played my first video clip on the Internet using a 56k connection. It was in Real Media format and contained a video track in 11Kbps and a mono audio track. All the buffering drove me crazy. Today, with all sorts of high-speed lines, you seldom come across network congestion during playback of a streamed video clip. This new speed has enabled rapid development of multimedia on the Internet. One of them is video streaming. Read more. Original link: http://www.linuxjournal.com/cont... This week we take a look at the all-time favorite articles ever featured on LinuxJournal.com. We'll feature the top 25 in this series, presenting you with five each day this week. These 25 articles alone represent tens of millions of page views on LinuxJournal.com. Top Articles 16 - 2020. AVI Movie Players and Capture by Robin Rowe Last we tried some MPEG players, including aKtion, gmpeg, gxanim, MPlayer, plaympeg, XAnim, xine and Xtheater. We also looked at the Be operating system in order to compare its video capabilities with Linux. Read more. 19. Compiling Java with GCJ by Per Bothner Java has not become as pervasive as the original hype suggested, but it is a popular language, used a lot for in-house and server-side development and other applications. Java has less mind-share in the free software world, although many projects are now using it. Examples of free projects using Java include Jakarta from the Apache Foundation (jakarta.apache.org), various XML tools from W3C (www.w3.org) and Freenet (freenet.sourceforge.net). See also the FSF's Java page (www.gnu.org/software/java). Read more. 18. sendmail: Introduction and Configuration by Eric Jorn Seneca With the growth of the Internet, e-mail has quickly become the main vehicle to spread information through the public at large. As the demand for fast, cheap and reliable e-mail grows, more individuals are turning to Linux to provide a fast, cheap and reliable solution. Read more. 17. Deploying the Squid proxy server on Linux by Ian Spare To provide Internet access for users in the SAS Institute Europe, Middle East and Africa (EMEA), a number of proxy servers have been installed both at the country office level and centrally at SAS European Headquarters in Heidelberg, Germany. Read more. 16. Linux and Scooby-Doo by Robin Rowe
Original link: http://www.linuxjournal.com/cont... This week we take a look at the all-time favorite articles ever featured on LinuxJournal.com. We'll feature the top 25 in this series, presenting you with five each day this week. These 25 articles alone represent tens of millions of page views on LinuxJournal.com. Here we go... Top Articles 21 - 2525. Introduction to Named Pipes by Andy Vaught One of the fundamental features that makes Linux and other Unices useful is the “pipe”. Pipes allow separate processes to communicate without having been designed explicitly to work together. This allows tools quite narrow in their function to be combined in complex ways. Read more. 24. VLANs on Linux by Paul Frieden To begin, we must have a more formal definition of what a LAN is. LAN stands for local area network. Hubs and switches usually are thought of as participating in a single LAN. Normally, if you connect two computers to the same hub or switch, they are on the same LAN. Likewise, if you connect two switches together, they are both on the same LAN. Read more. 23. Linux Network Programming by Ivan Griffin Like most other Unix-based operating systems, Linux supports TCP/IP as its native network transport. In this series, we will assume you are fairly familiar with C programming on Linux and with Linux topics such as signals, forking, etc. Read more. 22. DVD Authoring by Ian Pointer Traditionally, DVD authoring has been an expensive affair. Full-featured professional applications can cost thousands of dollars, while cheaper products, such as Apple's iDVD, have arbitrary restrictions that significantly reduce their usefulness. A new open-source effort, dvdauthor, is bringing the possibility of low-cost, professional-grade DVD authoring to Linux. Although it doesn't yet support all the features of the DVD specification, development is proceeding at a fast pace, and new features are being added with each release. Together with a more established open-source toolkit, mjpegtools, this article explains how to construct a relatively complex DVD application, a photo album, with dvdauthor. We also illustrate the various features that dvdauthor currently supports and how to use open-source tools to construct a DVD-R that can play on almost every DVD player. Read more. 21. Port Knocking by Martin Krzywinski Firewall administrators are challenged to balance flexibility and security when designing a comprehensive rule set. A firewall should provide protection against malfeasants, while allowing trusted users to connect. Unfortunately, it is not always possible to filter out the bad guys, because filtering on the basis of IP addresses and ports does not distinguish connecting users. Bad guys can and do come from trusted IP addresses. Open ports remain a necessary vulnerability: they allow connections to applications but also may turn into open doors for attack. This article presents a new security system, termed port knocking, in which trusted users manipulate firewall rules by transmitting information across closed ports. Read more. 16 - 20: Top 25 LinuxJournal.com Articles of All Time, Part 2 11 - 15: Top 25 LinuxJournal.com Articles of All Time, Part 3 6 - 10: Top 25 LinuxJournal.com Articles of All Time, Part 4 releases Apr. 17 1 - 5: Top 25 LinuxJournal.com Articles of All Time, Part 5 releases Apr. 18 Original link: http://www.linuxjournal.com/cont... |
|||||||||||