Vlad's Musings

Thursday, July 21, 2005

FC4: Enabling suspend to RAM

I've found another nice Dell D600 FC setup page here. Among other things it has the instructions for setting up S3 mode (suspend to RAM). You can refer to the original page for the instructions, I'm also including my version of these same instructions here for completeness.

To get Hibernate to work you you'll need log in as root (su -) a create a new file /etc/acpi/events/sleep.conf with the following content:

event=button/sleep *
action=/etc/acpi/actions/sleep.sh
You'll also need to create the file /etc/acpi/actions/sleep.sh with:
#!/bin/tcsh
# Script to drive the system to S3
# suspend-to-ram
#
# JRA Jan 2005

# Step 1: preparing sleep
if (-e /suspending) then
echo "already in the process of suspending. Please be patient."
else
/bin/touch /suspending
/usr/bin/killall -s SIGUSR1 cpuspeed
/usr/bin/chvt 1 # necessary to make DRI work
/sbin/service anacron stop
# USB doesn't suspend without unloading first
/sbin/rmmod ehci_hcd
/sbin/rmmod uhci_hcd
#save the system time
/sbin/hwclock --adjust
/sbin/rmmod wacom # only necessary of you have wacom stylus
/sbin/rmmod -as
/bin/sync

# Step 2: send sleep command via ACPI
echo mem > /sys/power/state

# Step 3: wake-up and reload
/sbin/hwclock --hctosys
/sbin/modprobe ehci_hcd
/sbin/modprobe uhci_hcd
# initialise X
xinit /bin/false -- :1
/usr/bin/chvt 7
/sbin/service anacron start
/sbin/service cpuspeed restart
rm /suspending
endif
Make sure that the file is executable (to do this run chmod 700 /etc/acpi/actions/sleep.sh). Finally you'll need to restart the acpi system: service acpid restart.

Lotus Notes 6.5.4 on Fedora Core 4

I have finally managed to get the Lotus Notes to work under Linux. I'm hoping that the following instructions will help someone solve this problem with less pain and frustration then I had to experience.

The good news is that it is possible to get Notes working under FC4, the bad news is that you need to install it under Windows first and then copy the files across. This was not a problem for me as I'm using a dual boot laptop, but it may be a problem for others.

In hindsight the majority of my problems were with Wine and the fact that there are a number of different recommendations on the web about which version people should use. Basically there are 3 different recommendations:

  • to use an old version 20041014 (which in many people's opinion is the most stable)
  • to use the most recent RPM for the target platform
  • to use the latest stable source release
I've tried all three of these at least once in different combinations and have found that I had best results with the LATEST SOURCE release (currently 20050628).

To install Notes properly:
  1. download the source tar file from http://www.winehq.com/site/download.
  2. extract it with tar zxvf
  3. cd and execute ./tools/wineinstall
  4. copy files from Lotus/Notes directory on the Windows partition to ~/.wine/drive_c/Program\ Files/Lotus /Notes
  5. Copy over files from "Documents and Settings/All Users/Application Data/Lotus" on the windows partition to ~/.wine/drive_c/Documents and Settings/All Users/Application Data/Lotus
  6. Copy over files from "Documents and Settings//Local Settings/Application Data/Lotus" on the windows partition to ~/.wine/drive_c/Documents and Settings//Local Settings/Application Data/Lotus
  7. All the files you've copied will need to be owned by you so if they are currently owned by root go to ~/.wine/drive_c and run chown -R : *
  8. Finally copy mfc42.dll and msvcp60.dll from Windows/system32 on the windows partition to ~/.wine/drive_c/windows/system
  9. Run Notes by executing: wine "C:\Program Files\Lotus\Notes\nlnotes.exe"
NOTE1: DO NOT follow the install instructions from the wine documentation!!! This will build and install wine properly BUT it will not configure it. It seems that they have changed the procedure so that wineinstall script does everything but have not updated the documentation to reflect this.
NOTE2: You HAVE TO run wineinstall as a standard user (i.e. not root), otherwise wine will be installed but the configuration will be owned by root and you won't be able to use it.
NOTE3: Steps 5 & 6 are optional and only required if you've actually used the Notes installation under Windows and would like to preserve your mail history and other databases.
NOTE4: If the Notes window shows up with the error: "You cannot use the Administration program while the Domino Server is running. Either shut down the Domino Server (but keep the file server running) or choose the icon labeled 'Lotus Notes' instead." This is because of incorrect file permissions on the files you've copied from the Windows partition. To resolve it just go to the 3 locations you've copied files to and execute: chmod -R +rwx *

Let me know if you have any problems,

Vlad

PS. Here are the main articles that helped me debug my installation problems:
Notes 6.5.1 on Linux and Wine
How to Use Lotus Notes on Linux with Wine
wine-bugs mailing list: [Bug 2643] Can't get Lotus Notes 6.5.2 running

Sunday, July 17, 2005

As promised Fedora Core 4 setup

I've just upgraded to the latest kernel (2.6.12-1.1398_FC4) and thought I'd use it as a guide for what needs to be done to set up FC4 on a Dell Latitude D600 laptop.

FC4 should install without any problems and should recognize all hardware except for the wireless network card. After the install I strongly recommend that you do the following:

1. Run 'yum update' to get the latest versions of the installed packages. As far as I know the stock standard FC4 install CDs/DVD come with 2.6.12-1.1369_FC4 kernel which is already getting a bit old so you'll probably want to update to the new version.

2. Once the upgrade has been completed you can set up your wireless network card by following the instructions from this
link. The simplest thing would be to use the driver that is shipped with the kernel and just install the firmware v2.2. I have personallyhpersonallyole decided to go with the full install approach and have installed firmware v2.3 and driver v1.04. As I am writing this I have just noticed that a new version of the driver (v1.06) is available and I might try that later on tonight.

3. If you've followed the instructions from the website and have rebooted at the end of the install you should have a working wireless connection except if you are running a network that uses WPA for security (as is the case with me). To get the WPA authentication to work you'll need to install the wpa_supplicant. Either Google for a recent FC3/4 RPM or download the source and compile it. Personally I had problems compiling it on FC4 so I opted for a slightly older version for which I was able to find an RPM. Once you install it all you will need to do is configure it ,edit /etc/wpa_supplicant.conf, and set it up to run at startup:


echo wpa_supplicant -ieth1 -c/etc/wpa_supplicant.conf -wB >> /etc/sysconfig/network-scripts/ifup-wireless
echo killall wpa_supplicant > /etc/sysconfig/network-scripts/ifdown-wireless
chmod +x /etc/sysconfig/network-scripts/ifdown-wireless