This page is a collection of notes, partly for my own reference, on how to do various things with computers that I found difficult, or that took me a while to figure out. I want to have this information somewhere where other people can theoretically access it so I don't feel like I wasted my time figuring it out :).
The first thing to know is that Sparc machines expect the internal disk (well, the first one) to be SCSI ID 3, not zero as I had assumed. The internal CD-ROM is assumed to be SCSI ID 6. So, if you want it to work when you type `boot cdrom' at the `ok' prompt, the CD drive must be set to ID 6. I don't think these IDs are required, but they make life easier.
Secondly, you may get a message like `can't open disk label package' or a message about the wrong magic number: Referring to your CD drive, this seems to mean that the machine can't read the CD. However, referring to your hard disk, it simply means that the drive hasn't been formatted in a Solaris-friendly way. The installer won't be able to fix this for you, so you need to format it manually. Boot the system from the software disk 1 by typing `boot cdrom -sw', and you'll be taken to a single-user-mode command prompt, where you can run the program `format'. Tell it `y' when it asks about creating a new disk label, then format the disk. After this, solaris should install correctly.
# xauth merge /home/jim/.XauthorityReplace the path to my home directory with your own. Now root will be authorised to use your X server.
Alternatively, you can use 'sudo' to run apps that need root privileges, as this seems to keep your display settings and Xauthority intact.
/dev/hda1 /windows ntfs defaults,umask=0000 0 0The relevant part is the umask, which essentially allows all permissions (it's a zeroed bitmask) for all users.
/usr/lib/libgphoto2-2/print-usb-usermapto get a listing of supported camera types, and find yours. Copy its configuration line to the file
/etc/hotplug/usermap
/usr/share/doc/libgphoto2-2/linux-hotplug/usbcam.groupat
/etc/hotplug/usb/usbcam
# groupadd camerathen, in /etc/group, add users to the `camera' line:
camera:x:1002:fred,sally,bob
# /etc/init.d/hotplug restartFor a better explanation (slightly different due to being aimed at something other than Debian), see this page concerning libgphoto and hotplug.
You can use packages from fink, and this simple script, to burn CDs from the command line. This has the added advantage of being able to burn more than the 660mb the Finder's burning feature limits you to.
Required packages from fink:
#!/bin/bash if [ "$2" == "" ] then title="Untitled CD" else title="$2" fi echo "Calling mkisofs on folder $1 with title $title" mkisofs -V "$title" -o /tmp/currentcd.iso -J -r "$1" echo "Calling cdrecord" cdrecord -v dev=IODVDServices /tmp/currentcd.iso rm /tmp/currentcd.iso echo "Done making CD."Put this somewhere in your path, then call it with
$ sudo [script_name.sh] folder_with_cd_contents/ "Label of CD"The sudo is not required, but it allows cdrecord to set a higher priority, minimising the chance of buffer underruns.
If your browser seems to take an anomalously long time to load pages, pausing with a message 'resolving host' for more than say three seconds, check to see whether you have ipv6 compiled into your kernel. If so, remove the module or recompile your kernel without this feature.
To forward a range of TCP ports to a particular machine inside your NATed network, use a line like this:
iptables -t nat -A PREROUTING -p tcp --dport 6881:6999 -i ppp0 -j DNAT --to 192.168.1.6In this example, I'm forwarding connections aimed at ports from 6881 to 6999 on my network's external interface, ppp0, across my NAT machine and into the server at 192.168.1.6. (These are the ports to forward for BitTorrent).
If you want to forward a single port to a different port inside your network, specify it after the destination IP address, like this:
iptables -t nat -A PREROUTING -p tcp --dport 81 -i ppp0 -j DNAT --to 192.168.1.6:80This will cause traffic aimed at [external_ip]:81 to be forwarded to 192.168.1.6:80.
Debian package r-base
Starting with a text file of the form:
#Blockgap Similarity 0 0.997525 1 0.997678 2 0.997433 ....The following two lines will produce a plot of this data:
x <- read.table("filename.txt")
plot(x)
To alter the line/point style, you can say plot(x, type="l") for lines, for example.
To get the plot as a file for printing, latex-ing, etc, give the incantation postscript(file="myoutputfile.ps") before running plot.
If you have data with valid values but a scattering of outlying items with a particular value (such as ones or zeroes in a cosine measure) which disturb the zen qualities of your graph, you can exclude them manually in R without forshortening the graph (a correctly sized gap will be left, rather than erroneously closed up). (thanks to Steve for working this out.)
To remove all the values of 1 from a graph derived from a table:
x <- read.table("filename.txt")
tmp <- x[,2] == 1.0
plot(x[!tmp,])
If you want to set an environment variable only if it hasn't yet been set, use this:
if [ -z "$MYVARIABLE" ] then MYVARIABLE="value" export MYVARIABLE fiI'm using this to allow Terminal.app in MacOS X to set its DISPLAY properly for X11, without breaking the DISPLAY settings of remote hosts connecting to the machine.
from the weird-syntax department
$ mystring="this.html"
$ echo ${mystring%%.*}
this
Where '.' can be any character. I use this to get the names of files without their extensions.
To get the end of a string, use # instead of %. So this also works:
$ mystring="this.html"
$ echo ${mystring##*.}
html
Imagine you have a directory of files, and you want to pipe them through a program and have the output stored in a separate set of files. You can't do that with just a wildcard, as the output will only go to one file. Here's the solution:
Imagine we have three files, one, two and three. We want to send them through a program 'strip', and put the output to [file].stripped:
for myfile in *; do strip < $myfile > $myfile.stripped; done
I'm using the id3 library. Under linux, I can compile as follows:
$ g++ -lid3 progname.cc -o prognameThis is because the id3 lib is in my default include path (/usr/include). Fink libraries go into /sw/include, which isn't in gcc's include path. We fix this as follows:
$ g++ -I/sw/include -lid3 progname.cc -o progname(i.e. setting a custom include path). Now we get this error:
ld: can't locate file for: -lid3A linker error. What's happening is we've told gcc where to find the headers for the id3 lib, but not the binaries. We have to specify that too so the info can be passed to the linker:
$ g++ -I/sw/include -L/sw/lib -lid3 progname.cc -o progname
This is much simpler than it used to be (and much simpler than most tutorials imply). It used to be that you had to set up your IDE burner as a SCSI-emulated drive, but Linux 2.6 removed this requirement. Just make sure you have the sg module availabe to your kernel. Then install the packages mkisofs and dvdrtools.
Then the following commands will master and burn a DVD for you, assuming /dev/hdd is your burner's IDE address, and mydirectory/ contains your data:
mkisofs -udf -V "My DVD title" -o mycurrentcd.img -r mydirectory/
dvdrecord dev=/dev/hdd -dao currentcd.imgYou must run this second line as root, or using sudo.
In fact, dvdrtools has a competitor package, dvd+rw-tools. In this package is the all-in-one tool growisofs, which combines mkisofs's functionality with a way to burn directly to a DVD. It seems to work (simply pass it the option "-Z /dev/hdd" to tell it where your burner is), and gives slightly better progress reporting, but the above method works perfectly too.
For some reason, some installations of Vim won't allow you to backspace over text that isn't new (i.e. from before you last hit escape). To make this behaviour more logical, add the following to your .vimrc (or _vimrc on Windows):
set bs=2
scp doesn't have a --no-dereference option to stop it from following symbolic links, which makes it bad for backing up things like home directories. Instead, we can combine tar and ssh, like this:
ssh -l username remotehost 'cd parent-dir; tar -czpf - dir-to-backup' | ( cd some-dir; tar -xzvf - )So to backup rupert's home dir on cyclops, something like this:
ssh -l rupert cyclops 'cd ../; tar -czpf - rupert' | ( cd rupertdir-backup; tar -xzvf - )
Because udev creates all devices dynamically, you need to have the OSS support module installed in order to register /dev/dsp, /dev/mixer etc: Simply make sure you load the module snd_pcm_oss (by adding it to /etc/modules, for example).
Let's say we want to list out every text file (.txt) in the whole filesystem. I used to use something like "cat *.txt; cat */*.txt; cat */*/*.txt ..." which is tedious.
First, here's how to get the name of every file:
find / -name "*.txt"We call the program 'find', telling it to search the whole filesystem (/).
Now, we can pass this list of files to 'cat' using 'xargs'. Watch:
find / -name "*.txt" | xargs cat'xargs' passes each word in turn to cat, and 'cat' cats that file. If your filenames might have spaces in them, you need to make sure that xargs passes whole lines rather than words; use find's option '-print0' to tell it to delimit with NULL instead of newlines, and xargs's option '-0' to tell it to use NULL instead of space as a delimiter (the order of arguments to 'find' here is important):
find / -name "*.txt" -print0 | xargs -0 cat
Other args after the variable filename?:
find / -name "*.txt" -exec myprog \{\} arg2 arg3 \;
or
find / -name "*.txt" | xargs -iFILENAME myprog FILENAME arg2 arg3
Sometimes you'll have a file that starts with a hyphen ('-'). If you try to do something to it, like "less -myfile.txt", the program will think this is an option rather than a file name. Escaping the name using quotes or backslashes (or even wildcards...) doesn't work. Instead, you can do this:
less -- -myfile.txtThe '--' at the start tells the program not to treat anything else on the line as an option. This seems to work for every program.
The DG834G is an ADSL modem/wireless router. It contains a nameserver which, on the unit I installed, is exceedingly flaky and unusable - it times out on most lookups and gives inconsistent answers. It apparently could be your ISP, if you'd like to look into that. A workaround is to set the unit's nameservers manually through the web interface, instead of letting it fetch them through DHCP. Then, when clients are connected to it, the nameservers they in turn receive through DHCP are your ISP's real ones instead of the local unit's IP address, and this then works properly.
With a single-button mouse, you get three mouse buttons like this:
Debian installs /var/lib/cvs with permissions for the group 'src' only. So add yourself to that group. As root:
# adduser yourname src
JPilot, the Palm-Desktop equivalent for X, is available precompiled in SGI's freeware collection. Simply change the serial port settings to use /dev/ttyfn (where n is the number of the port your palm is connected to), and 115200 bps. /dev/ttyf* is just one of the names which map to the serial ports, the f standing for "flow control" - the full list is available at microcosmos.
On my Octane, I had to use /dev/ttyf2 - /dev/ttyf1 gave the error "pi_bind: Resource busy". I don't know if this is a configuration issue on my machine though.
If you're getting errors like Invalid command 'PerlSetVar' when trying to use Perl content in Apache2 under Debian, you need to install mod_perl. The package to grab is libapache2-mod-perl2. Once you've installed this, you need to enable the module using the command a2enmod (no args, follow the prompts).
Very roughly:
phpbb_db_backup.sql to the new machine.mysql -u root -p, log in with the mysql root password, run drop database phpbb2, then create database phpbb2, then quit.mysql -u USERNAME -p phpbb2 < phpbb_db_backup.sql. USERNAME could be root, or phpbb2, depending on whose password you know. I used root.phpbb2-xx/install/ and put it into your /usr/share/phpbb2/siteTo get the blog package blosxom to display in your local timezone, you need to use the plugin 'timezone'. In the Debian package, this plugin is provided automatically, in /etc/blosxom/plugins/timezone. Otherwise, grab it from the plugins section of the blosxom main page and put it into the plugins directory specified in your main blosxom cgi script.
In the timezone plugin, edit the line my $blog_timezone = "EST5EDT"; to give your local timezone. For me, this was my $blog_timezone = "Australia/Sydney"; - you can probably put in whatever you find in the file /etc/timezone and it will work.
If your linux bootup fails with something like:
VFS: Cannot open root device "hda3" or unknown-block(0,0) Please append a currect "root=" boot option Kernel panic: VFS: Unable to mount root fs on unknown-block(0,0)then triple-check that you compiled all the IDE disk related things you need into the kernel (not as modules). For me it was IDE/ATA2 support set as a module (I have a feeling this was the kernel config default!)
To change the indentation level of several lines of code, use the < and > keys.
For example, to indent the current line, you would type:
>>To indent the next four lines, you could type:
4>>And to use it in : commands, you can use it like:
:3,9>All of these work to de-indent something as well, as in:
3<<
I'm certain there are more automated ways to do this, but here's the basic recipe for changing a debian package's dependencies by hand.
mkdir debcontents; cd debcontents; ar x ../mypackage.debmkdir control; cd control; tar zxvf ../control.tar.gzcontrol - modify the "Depends:" line to your heart's contenttar cvvzf ../control.tar.gz *cd ..; ar r mynewpackage.deb debian binary; ar r mynewpackage.deb control.tar.gz; ar r mynewpackage.deb data.tar.gzThe /etc/fstab line should look like this:
//windowsserver/myshare /mnt/myshare smbfs defaults,credentials=/home/fred/.smbpasswd 0 0
The credentials file referenced in the above line will contain your username and password, and can be any name/place you like. It looks like:
username=fred password=prettysecretTo keep it secure, don't forget to chmod it so only you and root can read it:
chmod 600 .smbpasswd
Drupal uses .module files which are php files, but Vim doesn't automatically use the php syntax style. Here's a way to force it (put this in your .vimrc file):
function SetPathSyntax()
if bufname("") =~ "module$"
set syntax=php
endif
endfunction
autocmd BufReadPost * call SetPathSyntax()
"module$" here is a regular expression for matching any filename ending in "module".
Adapted from here, which has some alternative approaches as well. A rather easier solution from there is:
autocmd BufRead,BufNewFile *.module set syntax=phpNote that you could match a certain directory to set a syntax on a certain path:
autocmd BufRead,BufNewFile ~/code/phpstuff/* set syntax=php
Imagine for example that you want to break a big paragraph into individual sentences, one per line. you want to replace occurrences of "." with ".<CTRL-M>". But typing "Control-M" simply sends an "enter" command to vim, so you must tell it an escape sequence is next by typing Control-V first. So your keystrokes will be:
:%s/\./\.<CTRL-V><CTRL-M>/gWhich will look, when you type it, like:
:%s/\./\.^M/g
In a large .tar.gz file, you can grab particular files you want without extracting the whole thing. Say you want contacts.txt from backup.tar.gz: To find the full path of that file, do:
$ tar tzf backup.tar.gz |grep contacts.txt
The machine returns something like home/fred/docs/contacts.txt
To extract this file from the archive, you can type:
$ tar zxf backup.tar.gz home/fred/docs/contacts.txt
Screen, being ncurses-y, uses its own scrollback buffer instead of letting your terminal app do it, so scrolling normally won't work. Instead, you can tell screen to go into "copy mode" with CTRL-a ESC. Then use the arrow keys, pgup/pgdn, etc.
This shouldn't be here on the hints page, but anyway - here's a precompiled MozTrayBiff for linux-powerpc, in case anyone needs it. It's compiled against ThunderBird 1.0.2: mozTrayBiff-1.1-powerpc-linux-tb1.0.2.xpi.
Situation: You have a PHP script that works well for the web, but you want to run it from the command line.
php4-cli or equivalent. This will give you a php command-line interpreter.You may get an error like this: Fatal error: Call to undefined function: mysql_connect(). If so, simply edit /etc/php4/cli/php.ini and uncomment the line ;extension=mysql.so.
I wanted to integrate a new install of MediaWiki into an existing Drupal site. The goal was to let only Drupal users make changes to the Wiki, but let everyone view it.
The (imperfect) solution involves using a cron job to copy the data from the drupal user table to the mediawiki one, and a few special settings to let MediaWiki work this way.
$wgPasswordSalt = false;$wgGroupPermissions['*']['edit'] = false;$wgGroupPermissions['*']['createaccount'] = false;Background reading: Wikipedia: HyperText Transfer Protocol; Charles Miller: HTTP Conditional Get for RSS Hackers
GET /pics.html HTTP/1.1 Host: www.example.com <enter>
Last-Modified: Mon, 15 Aug 2005 12:19:31 GMT. You can use this value in a conditional GET to request the document only if it has changed:
GET /pics.html HTTP/1.1 Host: www.example.com If-Modified-Since: Mon, 15 Aug 2005 12:19:31 GMT <enter>If the document is unmodified, you will get a response
HTTP/1.1 304 Not Modified.
Instead of using the Last-Modified header, you can use the ETag - for example, you could receive the header ETag: "449e64-2d1-76971180". This is just a unique identifier for the current revision of the document you are looking at. If you cache the ETag, when you send it back using the If-None-Match header, the server will only give you the document if its ETag differs from yours (that is to say, if it has a different revision of the document):
GET /pics.html HTTP/1.1 Host: www.example.com If-None-Match: "449e64-2d1-76971180" <enter>
>>> print "%04d" % 8
0008
Where '0' is "pad with zeroes instead of spaces", and '4' is the field-width in chars. To pad with spaces, you'd use "%4d" instead.
Python seems to obey Awk-like rules for formatting - see The GNU Awk User's Guide - Format Modifiers for more details.
Install Sun's JRE:
jre-1_5_0_06-linux-i586.bin/usr/bin/java to:
GNU Readline handles the Bash command-line; its settings are stored in ~/.inputrc. The following settings belong in there:
set show-all-if-ambigous onset bell-style visibleset editing-mode vi (this is totally cool; you get to ESC into command mode and then delete, paste, move around as if on a single line in a Vi session)There's a convention whereby when you send an HTML email, you also attach a plaintext version of the mail for other readers to display. Use this sparingly, as many 'plaintext' readers can actually hand-off HTML to an external browser conveniently; if your plaintext version is less useful than your HTML version, you may be worsening the experience for these users.
The format looks like this:
From: Sender Name <sender@example.com> To: Recipient Name <recipient@example.com> Subject: A simple multipart mail MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_aba27aebf67dca4e7e241159a76a7a3b" ------=_Part_aba27aebf67dca4e7e241159a76a7a3b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Plaintext part goes here. ------=_Part_aba27aebf67dca4e7e241159a76a7a3b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8Bit Content-Disposition: inline HTML part <em>should</em> go here. ------=_Part_aba27aebf67dca4e7e241159a76a7a3b--
The boundary specified on the 5th line can be any unique string. It is then used on a line by itself, prepended by "--", to indicate the boundaries between the parts. The last part is ended by the boundary string with "--" before and after.
To generate a unique boundary string in PHP, you can use something like
$boundary = "----=_Part_" . md5(uniqid(time()))but any unique string will do. Make sure it's unique between emails as well, otherwise some readers will assume you're quoting the text of a previous email when you send a new one.
Other notes:
POST / HTTP/1.1 Host: localhost:8000 (rest of the usual HTTP headers) Content-Type: application/x-www-form-urlencoded Content-Length: 20 one=first&two=secondIf you want to upload a file using the form element
<input type="file">, you need to add a parameter to your form:
<form method="post" action="your_cgi_script" enctype="multipart/form-data">This instructs the browser to use a MIME-style multipart encoding for the pieces it sends to the script. If we post a file called
myfile.txt, which looks like
This is my file. This is line two.from a form with two fields, the first a text field called 'one' and the second a file field called 'two', then the POST request looks like this:
POST / HTTP/1.1 Host: localhost:8000 (usual http headers here) Content-Type: multipart/form-data; boundary=---------------------------27619426910078454862098207839 Content-Length: 367 -----------------------------27619426910078454862098207839 Content-Disposition: form-data; name="one" hello -----------------------------27619426910078454862098207839 Content-Disposition: form-data; name="two"; filename="myfile.txt" Content-Type: text/plain This is my file. This is line two. -----------------------------27619426910078454862098207839--OK, what about posting binary files? Let's do the same experiment with a small binary file. The relevant part of the MIME message comes out like this:
ontent-Disposition: form-data; name="two"; filename="binaryfile.bin" Content-Type: application/octet-stream (binary gunk) -----------------------------4086840483308214071763412686--
Sometimes in Internet Explorer, when you click "Install ActiveX Control" on a web page you get redirected to an earlier page instead of the control being installed. This may be because of a workaround for broken sites going wrong. To get around it, try holding down CTRL while going to the page which triggers the "Install ActiveX Control" message - it should pop up a standard dialog rather than the little top-of-the-window one, which might work better.
This happened to me when trying to visit the Dell Remote Access Controller (drac) on a server - the Media page tries to load an ActiveX control, but instead redirects to the login screen when you click to install it. The above trick fixed this for me.
Tony Schreiner's explanation (describing this fix in more detail)
To enable passwordless logins, you have to generate a key on your workstation (ssh-keygen) and then put it in the .ssh/authorized_keys file on the target server(s). Here's how to do this without having to log in and edit/create that stuff manually on the remote machines:
ssh YOURSERVER 'mkdir -p -m0700 .ssh; cat - >> .ssh/authorized_keys' < .ssh/id_dsa.pub(You can leave out the
mkdir -p -m0700 .ssh; part unless you've never invoked SSH on the target machine before.)
If you do this a lot, you could use a script, like this:
#!/bin/sh if [ "$1" == "" ] then echo "Need [user@]host" exit fi ssh $1 'mkdir -p -m0700 .ssh; cat - >> .ssh/authorized_keys' < ~/.ssh/id_dsa.pub
If a wireless network you connect to requires you to log into a web page before you can use the net, you can automate it in the following fashion (specifics are for a BlueSocket-controlled network I use, but the principle should be similar for you):
Put the following script somewhere, say /home/fred/scripts/wirelesslogin.sh
#!/bin/bash curl -s --insecure https://LOGIN-MACHINE/login.pl -d _FORM_SUBMIT=1 -d which_form=reg -d bs_name=YOURNAME -d bs_password=YOURPASSWORD > /dev/nullThis script should log you into the wireless network - get it working before trying the next step.
Now you just need to have the script run when the network interface comes up. On Debian/Ubuntu, this is done by adding a script to /etc/network/if-up.d/ (this assumes your wireless interface is eth1, and that the IP range of your locked-down network is 192.*):
#!/bin/sh
if [ ! -x /home/fred/scripts/wirelesslogin.sh ]; then
exit 0
fi
if [ "$METHOD" = loopback ]; then
exit 0
fi
# We only want to run this for wireless logins:
if [ "$IFACE" != "eth1" ]; then
exit 0
fi
FIRSTIPBYTE=`/sbin/ifconfig eth1 |grep "inet addr" |sed "s/.*addr://" |sed "s/\..*//"`
if [ "$FIRSTIPBYTE" = 192 ]; then
/home/fred/scripts/wirelesslogin.sh
logger "Running wireless login script."
else
logger "NOT running wireless login script (detected first IP byte as $FIRSTIPBYTE)"
fi
Open question: Does this script necessarily get run when the machine wakes from ACPI sleep?
If you copy your root filesystem into a physically different partition (for example when restoring from backups), the UUID of that partition will change. If your /etc/fstab addresses partitions by UUID, you may get errors on booting like findfs: Unable to resolve 'UUID=xxxxx'. To retrieve your new UUIDs, you can run ls -l /dev/disk/by-uuid/. (the output of tune2fs -l /dev/[your partition] will also list the partition's UUID for ext2/3 partitions.) At this point you can modify the UUIDs in /etc/fstab to the new ones and reboot.
If you want to have a large number of mini-zones in one zone file, you can use the $ORIGIN directive to change the current context of the zonefile. For example, if your zonefile is myhouse.mystreet.mycity, your implicit origin is myhouse.mystreet.mycity.. When you specify a host, for example
kitchen IN A 10.0.1.1it is inferred to be a shorthand for
kitchen.myhouse.mystreet.mycity.. If you want to change the origin within part of the file, you can do something like this:
$ORIGIN myhouse.mystreet.mycity. kitchen IN A 10.0.1.2 ;i.e. kitchen.myhouse.mystreet.mycity. $ORIGIN otherhouse.mystreet.mycity. kitchen IN A 10.0.2.2 ;i.e. kitchen.otherhouse.mystreet.mycity.To specify the origin itself, you can use
@ (or, I think, even an empty space):
$ORIGIN myhouse.mystreet.mycity. @ IN A 10.0.1.1 ;i.e. myhouse.mystreet.mycity.If you have an identical series of CNAMEs (i.e. aliases) that you'd like to be true for multiple mini-zones, you can specify them in a separate file and use
$INCLUDE. So if you make a file called mystreet.mycity-cnames:
diningroom CNAME kitchen ;diningroom is an alias for kitchen office CNAME study ;office is an alias for studyand then include that file in your zonefile
mystreet.mycity:
$ORIGIN myhouse.mystreet.mycity. kitchen IN A 10.0.1.2 study IN A 10.0.1.3 $INCLUDE data/mystreet.mycity-cnames $ORIGIN otherhouse.mystreet.mycity. kitchen IN A 10.0.2.2 study IN A 10.0.2.3 $INCLUDE data/mystreet.mycity-cnamesthen the result will be, for example, that
office.myhouse.mystreet.mycity is an alias for study.myhouse.mystreet.mycity, and office.otherhouse.mystreet.mycity for study.otherhouse.mystreet.mycity.
This is really useful for sites that like to launch new (target="_new" or whatever) windows all the time
about:configThe above seems to be the default setting in Windows Firefox, but not in the Debian/Ubuntu packages.
For a WEP network, you could have an entry like:
auto ath0 iface ath0 inet dhcp wireless-essid your-essid.... wireless-key abc123....For a WPA (2?) network, something like:
auto ath0 iface ath0 inet dhcp wpa-ssid your-essid.... wpa-passphrase your passphrase here...(more detail from Andete)
Seems like linux has trouble assigning the same interface name (eth0, eth1...) to the same physical card each time; various solutions exist, but the newest is to use udev:
/etc/udev/rules.d/70-persistent-net.rules (or similar for your distribution)75-persistent-net-generator.rules; modify the interface names to your heart's content
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:11:22:33:44:55", NAME="eth4"
I'm not entirely sure what causes the generator to re-run (and presumably destroy your changes) but the changes do survive a reboot.
If you need to access the VMware bios settings (for example to select boot devices), the BIOS screen may disappear too quickly. To solve this, edit your .vmx file to add this line:
bios.bootDelay = "5000"(Solution from this thread)
Often find yourself needing to test a name-based virtualhost on a non-production machine, where the names don't actually resolve to the machine you're testing? Try this handy script:
#!/bin/sh echo "GET / HTTP/1.1 Host: $2 "| nc $1 80eg:
getwithname.sh mytestmachine.local newfeature.mylivesite.com