Page suivante Page précédente Table des matières

6. Different Environments - On the Road

6.1 Related HOWTOs

  1. Security-HOWTO
  2. Multiboot-with-LILO-mini-HOWTO
  3. Ethernet-HOWTO
  4. NET-3-HOWTO
  5. Offline-Mailing-mini-HOWTO
  6. Plip-mini-HOWTO
  7. Slip-PPP-Emulator-mini-HOWTO

6.2 Configuration Tools

NetEnv

Do you use your laptop in different network environments? At home? In the office? At a customers site?

If yes, the small package "netenv" might be useful for you. When booting your laptop it provides you with a simple interface from which you can choose the current network environment. The first time in a new environment, you can enter the basic data and save it for later reuse.

Netenv sets up a file containing variable assignments which describe the current environment. This can be used by the PCMCIA setup scheme, e.g. like the one that comes with Debian/GNU Linux and perhaps others.

The netenv data can be used for things like:

  1. Network Device: Configure the network device for different environments.
  2. Choose a proper XF86Config: Think of using your laptop standalone with touchpad vs. connected to a CRT monitor along with an external mouse. For example, a wheel mouse could be used when docked, but the driver is not compatible with the normal trackpoint or touchpad.
  3. Windowmanager: You can set up your windowmanager according to the current location of your machine.
  4. Printing Environment: The netenv data can easily be used to set up the printing environment.

Netenv is available as Debian/GNU Linux package as well as tarball. It depends on dialog(1) for the menu system. It is developed by Gerd Bavendiek bav@rw.sni.de you may get it at http://www.uni-bielefeld.de/~portgym/net/netenv.html .

Mobile IP

Mobile IP allows a portable computer access to the Internet from different networks without changing its IP address.

Resources

  1. Linux Mobile-IP
  2. Linux Mobile IP from HP Labs Bristol by Manuel Rodríguez
  3. MosquitoNet Mobile IP
  4. Mobile IP at NUS
  5. Linux Mobile-IP
  6. Bay Area Research Wireless Access Network (BARWAN)

Sources: Kenneth E. Harker and Dag Brattli

DHCP/BootP

DHCP and BootP are also useful for working in different environments. Please see the DHCP-HOWTO and BootP-HOWTO.

PPPD Options

The pppd command can be configured via several different files: pppd file /etc/ppp/<your_options> .

/etc/init.d

You may even choose to do your configuration by editing the /etc/init.d files manually.

PCMCIA - Schemes

How can I have separate PCMCIA device setups for home and work? This is fairly easy using PCMCIA scheme support. Use two configuration schemes, called home and work. For details please read the according chapter in the PCMCIA-HOWTO by David Hinds.

Bootloaders

LILO

From http://www.mjedev.demon.co.uk/index.html <Martin J. Evans martin@mjedev.demon.co.uk> I have taken this recommendation: The first point to note is that init will take any arguments of the form name=value as environment variable assignments if they are not recognized as something else. This means you can set environment variables from the LILO boot prompt before your rc scripts run. I set the LOCATION environment variable depending on where I am when I boot Linux. e.g.


LILO: linux LOCATION=home

Or
LILO: linux LOCATION=work

Or simply
LILO: linux

where failing to set LOCATION means the same as LOCATION=home (i.e. my default). Instead of typing LOCATION=place each time you boot you can add an entry to your /etc/lilo.conf file and use the append instruction. e.g.
# Linux bootable partition for booting Linux at home
#
image = /vmlinuz
root = /dev/hda3
label = linux
read-only
# Linux bootable partition config ends
#
# Linux bootable partition for booting Linux at work
#
image = /vmlinuz
root = /dev/hda3
label = work
read-only
append="LOCATION=work"
# Linux bootable partition config ends

With the example above you can use "linux" for booting at home and "work" for booting at work.

Armed with the facility above, you can now edit the relevant rc scripts to test ENVIRONMENT before running ifconfig, setting up route etc.

Other Bootloaders

There are several other bootloaders which are often overlooked. Besides LILO, have a look at loadlin, CHooseOS (CHOS) (not GPL), GRand Unified Bootloader (GRUB), System Commander and take a look at ftp://metalab.unc.edu/pub/Linux/system/boot/loaders/. The NT boot loader or OS/2 boot loader may even be used.

X-Windows

From Steve <steve@cygnet.co.uk> I got a configuration for X windows with an external monitor: Note that I have introduced a neat trick! For my nice 17" monitor I start X with no options and get the default 16-bit 1152x864 display - but when using the LCD screen I specify a 15-bit display (startx -- -bpp 15) and get the correct 800x600 resolution automatically. This saves having to have two XConfig files.

More Info

Using a Laptop in Different Environments by Gerd Bavendiek . This article appeared in the August, 1997 issue of the Linux Gazette. This is an excellent, short technical article describing an easy way to setup your Linux notebook to boot into different network and printing configurations, especially useful for those who use their machines at home as well as other locations such as in the office, at school, or at a customer site.

6.3 Data Transport Between Different Machines

I don't have experience with this topic yet. So just a survey about some means of data transport and maintaining data consistency between different machines.

Hardware

  1. external harddisks
  2. ZIP drive

Wade Hampton wrote: "You may use MS-DOS formatted ZIP and floppy discs for data transfer. You may be able to also use LS120. If you have SCSI, you could use JAZ, MO or possibly DVD-RAM (any SCSI disc that you could write to). I have the internal ZIP for my Toshiba 700CT. It works great (I use automount to mount it). I use VFAT on the ZIP disks so I can move them to Windows boxes, Linux boxes, NT, give them to coworkers, etc. One problem, I must SHUTDOWN to swap the internal CD with the ZIP."

Software

Source Code Control System (SCCS)

Currently I had no time to check a SCCS system, such as RVS or CVS for this purpose.

CODA Filesystem

The Coda File System is a descendant of the Andrew File System. Like AFS, Coda offers location-transparent access to a shared Unix file name-space that is mapped on to a collection of dedicated file servers. But Coda represents a substantial improvement over AFS because it offers considerably higher availability in the face of server and network failures. The improvement in availability is achieved using the complementary techniques of server replication and disconnected operation. Disconnected operation proven especially valuable in supporting portable computers http://www.coda.cs.cmu.edu/ .

WWWsync

This is a program written in Perl that will update your web pages by ftp from your local pages. This was originally written for updating Demon home-pages, but will work with other providers which provide direct FTP access to your web pages. I didn't check this for laptop purposes yet. You may get the program at http://www.alfie.demon.co.uk/wwwsync/ .

6.4 Security in Different Environments

Introduction

I am not a computer security expert. Please read the Security-HOWTO for more information. I just collected some information below. Note, these means are just small steps to additional security, though I recommend that you use them.

Means of Security

  1. Kennsington Lock: AFAIK proprietary lock solution with different laptops http://www.kennsington.com
  2. SmartCards: by DESKO http://www.desko.de are not available for Linux yet. The only available laptop with a SmartCard builtin is the Siemens Scenic Mobile 800.
  3. User passwords: can be easily bypassed if the intruder gets physical access to your machine
  4. BIOS passwords: are also easily crackable, though sometimes harder than with desktops
  5. Name plates: to reduce the possibility of theft, you may want to have a nameplate made and affixed to the cover of the laptop. A nice one will cost you about $12, and can be made by any good trophy shop. They'll glue it on for you too. You could use double-sided tape instead, but glue is more permanent. You may even make an engravement into the laptop cover.
  6. Boot loader: a boot loader may be used to put your name and phone number (or whatever text you choose) into the boot sequence before the operating system is loaded. This provides a label that can't be removed by editing files or even doing a simple format of the harddisk.
  7. Antivirus policy: I have seen an antivir RPM somewhere. Check the BIOS for an option to disable writing at the boot sector.
  8. Database of stolen laptops: Just in case, there is at least one database of stolen laptops in the WWW, which is free of charge, but I have lost the URL.
  9. Laptop as a security risk itself: Since a laptop can easily be used to intrude a network, it seems a good policy to ask the system administrator for permission before connecting a laptop to a network.
  10. Secure Protocol: When connecting to a remote server always use a secure protocol.

6.5 Dealing with Down Times (Cron Jobs)

A cron-like program that doesn't go by time: anacron (like "anac(h)ronistic") is a periodic command scheduler. It executes commands at intervals specified in days. Unlike cron, it does not assume that the system is running continuously. It can therefore be used to control the execution of daily, weekly and monthly jobs (or anything with a period of n days), on systems that don't run 24 hours a day. When installed and configured properly, anacron will make sure that the commands are run at the specified intervals as closely as machine-uptime permits.

hc-cron This program is a modified version of Paul Vixie's <paul@vixie.com> widely used cron daemon. Like the original program it runs specified jobs at periodic intervals. However, the original crond relies on the computer running continuously, otherwise jobs will be missed. This problem is addressed by hc-cron, that is indended for use on home-computers that are typically turned off several times a day; hc-cron will remember the time when it was shut down and catch up jobs that have occurred during down time when it is started again. Felix Braun <fbraun@atdot.org> is the author of the programm, it is available at http://metalab.unc.edu /pub/Linux/system/daemons/cron .


Page suivante Page précédente Table des matières