I was trying to set the default shell the linux way on Mac OS X, but it failed horribly. No changed was made even after battling cryptic vi (urghh!) just to change the file that comes out in vi when you type sudo chsh username. I tried using the preference in terminal but then seeing that that will not use the login script, I'm afraid that it will miss out what its supposed to execute (some login scripts etc) when shelling out.
I found out this article on macosxhints. It basically states that you can either use the netinfo manager to change it or use the command
niutil -createprop . /users/shortusername shell /bin/ bash
While searching for the best method to stitch PDF together for the Mac OS X, I came across various methods, most of which involved some kind of tex related stuffs. When I was following the instructions, I came across difficulties such as trying to get the whole bulky pdftex package plus all its dependencies. I hit ctrl-c halfway being the impatient guy that I am. I also happen to have a Debian box and I just search for an answer on the Debian world and came across one by just using GhostScript. Read more about this exploration below.
On the Debian box you can stitch pdf together by just issuing a ghostscript command. So I wanted to see if it can be done for Mac OS X. I did an initial test by just typing
gsto see if I have it installed by fluke but its not there so i did
fink install ghostscript6There is actually another package on fink called ghostscript but I saw the description for ghostscript6 and it says for use with tetex so might as well get that one just in case in the future I DO need to use tetex. Its quite easy, fink grab around 4 extra files (might defer depending on what's already installed). Then all I did was
gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=outputpdf.pdf pdf1.pdf pdf2.pdfThe command above will basically create one outputfile called outputpdf.pdf that consists of pdf1.pdf and pdf2.pdf. You can replace pdf1.pdf with *.pdf and it will grab all the pdf files and output one pdf.
I will try to do an applescript later and see if I can actually hook this up so I have one archive.pdf and when I do a print to pdf it allows me to append to the archive.pdf. I don't know if some of you guys already have the answer to this.
An article on the web mentioned that you can just add applescript support to any Print dialog through the Save As PDF option like below.

To add a menu item to the PDF workflow pop-up menu, simply add one of the supported item types to any of the following directories:
on open these_items
try
set this_file to item 1 of these_items
tell application "Finder"
set the file_name to the name of this_file
set the parent_folder to (the container of this_file )as alias
end tell
tell application (path to frontmost application as string)
repeat
display dialog "Enter a name for file:" default answer file_name
set this_name to the text returned of the result
if this_name is not "" then exit repeat
end repeat
end tell
tell application "Finder"
set the name of this_file to this_name
set the target_file to ¬
(document file this_name of the parent_folder )as alias
end tell
tell application "Mail"
set the new_message to ¬
(make new outgoing message with properties ¬
{visible:true, content:" "})
tell the new_message
tell content
make new attachment with properties ¬
{file name: target_file } at ¬
before the first character
end tell
end tell
end tellon error error_message number error_number
if the error_number is not -128 then
tell application (path to frontmost application as string)
display dialog error_message buttons {"OK"} default button 1
end tell
else
tell application "Finder" to delete parent_folder
end if
end tryend open
It seems that 10.2.4 update caused the /etc/httpd.conf to be overwritten and the old file saved to httpd.conf.applesaved*. I found some hints on macosxhints that shows how to change it back. One method was to just copy back the file but this would mean that the mod_rendezvous will be overwritten. Another way which is much better is to put a file in /etc/httpd/users. Any file will do, for this case we can name it php.conf. I wonder though if this will break if there is a user named php. Below is the things to be added to php.conf
LoadModule php4_module libexec/httpd/libphp4.so AddModule mod_php4.cDirectoryIndex index.html index.php index.php3
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .php
At last today I managed to set up BusybeeOnline. I have been trying to postpone this for a while but a frustration that I had today led me to configure it as fast as possible. I was trying to find out how to make the Mac OS X Emacs21 port to do a normal FTP instead of using er.. see I forgot the name again. I probably come back again here to fill in the name of that function in emacs. Anyway I chose movable type which is perl based rather than php based (somehow I think I will regret this later). I'll elaborate of this installation in the extended entry section.
Movable Type is quite difficult to install. I have been installing many PHP applications before but I guess perl-based applications need all those libraries here and libraries there. Anyway to make things simpler. I downloaded the tarball which has all the libraries that is needed.
When I was trying to install it later after disconnecting from the internet on my local PowerBook G4, I found out that there are some libraries that are not included, particularly a the DBI:MYSQL or something like that. So since I was somewhere else when setting this up, I couldn't use MySQL as the database which I intended to. Luckily movable type allows Berkeley DB to be used (Note to self: read up more on Berkeley DB).
I renamed and dump the whole tarball into the /Library/WebServer/Documents/weblog directory and then change the mf.cfg file to include
CGIPath http://127.0.0.1/weblog/
DBUmask 0022
HTMLUmask 0022
UploadUmask 0022
DirUmask 0022
StaticWebPath /weblog-static/
And also change the datasource line to point to
/Users/zoo/db/weblog_tech
After that it I found out I have to copy the docs, images and stylesheet.css to another directory outside the weblog directory because when I modify apache's httpd.conf (in /etc/httpd/httpd.conf) and included a ScriptAlias Directory and a Directory directive, I've made the whole directory executable only so it thinks image is executable and stuffs. So I did that. I'm still confused about the place where the index.html should reside, because when I try to put it in weblog it still gave me the no permission to access error. So I guess i will have to find out where it should reside or do reshuffling of stuffs around in the webserver.
I've migrated the site on the live webserver. I hope it does have all the necessary perl libraries.
Well i give this a rest for a while coz I have to continue working on the gallery project that I have so that I can show something to my client.