This page documents various odds and ends that I have had problems sorting out, or problems that I can never remember the answer for. Maybe they will help someone else too.
Firstly establish what device the memory stick is. Plug it in and examine the last few lines of the message log.
# tail /var/log/messages
Something similar to the following is displayed.
Jun 12 15:32:25 jenny kernel: usb 1-5: new high speed USB device using ehci_hcd and address 3 Jun 12 15:32:25 jenny kernel: scsi5 : SCSI emulation for USB Mass Storage devices Jun 12 15:32:30 jenny kernel: Vendor: Kingston Model: DataTraveler2.0 Rev: 4.70 Jun 12 15:32:30 jenny kernel: Type: Direct-Access ANSI SCSI revision: 00 Jun 12 15:32:30 jenny kernel: SCSI device sdc: 499200 512-byte hdwr sectors (256 MB) Jun 12 15:32:30 jenny kernel: sdc: Write Protect is off Jun 12 15:32:30 jenny kernel: sdc: assuming drive cache: write through Jun 12 15:32:30 jenny kernel: SCSI device sdc: 499200 512-byte hdwr sectors (256 MB) Jun 12 15:32:30 jenny kernel: sdc: Write Protect is off Jun 12 15:32:30 jenny kernel: sdc: assuming drive cache: write through Jun 12 15:32:30 jenny kernel: sdc: sdc1 Jun 12 15:32:30 jenny kernel: Attached scsi removable disk sdc at scsi5, channel 0, id 0, lun 0 Jun 12 15:32:30 jenny kernel: Attached scsi generic sg2 at scsi5, channel 0, id 0, lun 0, type 0 Jun 12 15:32:31 jenny scsi.agent[4761]: disk at /devices/pci0000:00/0000:00:10.4/usb1/1-5/1-5:1.0/host5/target5:0:0/5:0:0:0
Note the reference to sdc: sdc1 - this is the device being used in this instance. Assuming directory /home/steve/mem exists, this can be mounted as follows.
# mount -t vfat -oumask=0000 /dev/sdc1 /home/steve/mem
Here are two ways. From the XWindows machine, ssh to the other machine. Then run the application, e.g.
(steve@candy:~)$ ssh fanny ... (steve@fanny:~)$ xterm &
Or, on the XWindows machine, enter
$ xhost +
This will allow access to this machine's XWindows by any other machine on the network.
On the remote machine, enter
$ DISPLAY=IP-alias:0.0 $ export DISPLAY
IP-alias is the full name of the XWindows machine, e.g. candy.stevesearle.com
Use the switchdesk command. For example, to set the default desktop to kde:
$ switchdesk kde
This needs to be run from a virtual terminal, i.e. outside of the X Window system.
You are probably using namespace std which is masking the global tolower and replacing it with std::tolower. To get round this code the line as follows.
transform(send.begin(), send.end(), send.begin(), ::tolower);
Program foo needs to dynamically call library bar. But it can't find it. First check to see that it exists
$ locate bar
If this doesn't display bar (preceded by its path) then you do not have the library on your system and need to download it.
If it does find it, (e.g. displays a line like /usr/local/bar) then you don't have the directory it is in (e.g. /usr/local) in the list of locations that your system looks for libraries in. To add it to the list, edit /etc/ld.so.conf and add a line for the directory (e.g. /usr/local). Then run
# ldconfig
to update the links and cache for the run time linker.
This means that the client library is compiled with support for a compressed client/server protocol. The fix is to add -lz last when linking with -lmysqlclient.
Certain distros, including Red Hat and Fedora, default to setting up a client-only version of sendmail, that only listens on the localhost interface. To get round this on Fedora, edit /etc/mail/sendmail.mc and delete or comment out the 127.0.0.1 DAEMON_OPTIONS line as follows.
dnl #DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
Then regenerate the sendmail-cf file and restart sendmail.
# make -C /etc/mail # service sendmail restart
See the Sendmail FAQ for more details.
Even though you have set your preferred home page, when you start Mozilla it goes to some other page. Go -> Home does work, however.
Enter about:config as the URL for Mozilla to open. Find the browser.startup.homepage_override.1 setting, and change its value to false, by right clicking and selecting modify.
Download the JRE rpm from Sun. Change the downloaded file to make it executable and run it.
# chmod 755 /tmp/jre-1_5_0_08-linux-i586-rpm.bin # /tmp/jre-1_5_0_08-linux-i586-rpm.bin
Now create a link in the Mozilla plugins directory to the JRE library.
# ln -s /usr/java/jre1.5.0_08/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins
Restart Firefox.
Make sure you have XFree86-devel installed.
Display the digraphs table by changing to the command mode if necessary, and entering :digraphs. Look for the character you require and note either the two character or three digit code for the character. Return to insert mode and either type Ctrl-K followed by the two character code, or Ctrl-V followed by the three digit code. Both of these will cause the character to appear.
E.g. A © symbol can be create with Ctrl-K Co or with Ctrl-V 169.
Or, help! I'm getting mount: RPC: Unable to receive; errno = No route to host.
Or, why are my OpenOffice files allways read only if they are on a nfs server?
Much of the following section came from or was derived from the excellent HOWTO: Configure NFS for control by Firewalls and IPTABLES written by Chris Lowth.
Getting NFS through a firewall is complicated because by default some of the TCP/IP and UDP ports used are randomly generated. This behavior needs to be changed by altering the NFS start scripts to set it to use the same ports each time, and then opening the firewall for this ports, as well as port 111 for the Portmapper daemon and port 2049 for NFS.
I set the Status daemon port to 4000, and the mountd port to 4001. To do this, edit /etc/sysconfig/nfs (it may need to be created) and add the following lines.
STATD_PORT=4000 MOUNTD_PORT=4001
The NFS Lock Manager port is set to 4002. This is done by adding the following line to /etc/modprobe.conf.
options lockd nlm_udpport=4002 nlm_tcpport=4002
The rquotad port is set to 4003, this time by editing /etc/services. Add rquotad lines as follows.
rquotad 4003/tcp # rquotad rquotad 4003/udp # rquotad
Now add the following lines to /etc/sysconfig/iptables (before the -j REJECT line). This will allow nfs clients to access these services.
... # NFS exports # Portmapper -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 111 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 111 -j ACCEPT # NFS -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 2049 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT # Status -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 4000 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4000 -j ACCEPT # mountd -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 4001 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4001 -j ACCEPT # NFS Lock Manager -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 4002 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4002 -j ACCEPT # rquotad -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 4003 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4003 -j ACCEPT ... -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited ...
At this point the server needs to be rebooted. Restarting NFS and IPTABLES isn't sufficient. After rebooting, running rpcinfo -p (as root) should give ouput similar to the following (i.e. all services using the port numbers we have chosen).
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 4000 status
100024 1 tcp 4000 status
100021 1 udp 4002 nlockmgr
100021 3 udp 4002 nlockmgr
100021 4 udp 4002 nlockmgr
100021 1 tcp 4002 nlockmgr
100021 3 tcp 4002 nlockmgr
100021 4 tcp 4002 nlockmgr
100011 1 udp 4003 rquotad
100011 2 udp 4003 rquotad
100011 1 tcp 4003 rquotad
100011 2 tcp 4003 rquotad
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100005 1 udp 4001 mountd
100005 1 tcp 4001 mountd
100005 2 udp 4001 mountd
100005 2 tcp 4001 mountd
100005 3 udp 4001 mountd
100005 3 tcp 4001 mountd
NFS Clients should now successfully be able to get through the firewall now.
Boot into GNU/Linux from your emergency boot diskette (You do have one, don't you? If not you can create a GRUB boot diskette).
Enter grub (assuming you didn't boot into it). At the grub prompt enter the following to reinstall grub to the MBR
grub> root (hd1,0) grub> setup (hd0) grub> quit
The root command sets the partition that holds the grub files - in this case the first partition on the second drive. The setup command installs grub on the MBR of one of the drives - in this case the first drive.
On Fedora Core 3, running the following command cures this. Don't know why. You only need to do it once.
# execstack -s /usr/sbin/ntpd