Open

modules/Header_Footer/pntemplates/header_footer_page.htm


and insert the javascript before the </head> tag.


 

I wanted to add an option to nautilus where I can right-click a folder and get an “open in terminal” option. So I ended up associating folders with gnome-terminal which is a very bad idea. Every time I click a folder now, or even going to Places->Home Folder it opens up a terminal.

To fix this you have to edit the file
./local/share/applications/mimeapps.list

Delete the line

inode/directory=userapp-gnome-terminal-WA3WSV.desktop;

save the file and everything should be fine again.

 

When I upgraded my server from Lenny to Squeeze I encountered a problem with the pg_upgradecluster command.

pg_upgradecluster 8.3 main
Error: Could not get cluster default encoding

There were several issues. I had already removed the Postgres 8.3 installation and that somewhat broke my whole setup.

/etc/init.d/postgresql start or stop

wouldn’t do anything. I had several postgres related processes running on the old cluster. So first, I killed them by their pid.

kill 34221
ps axu | grep postgres

The second line confirmed that postgres was now finally stopped. Issuing the upgradecluster command yielded a different error now:

Error: specified cluster is not running

This was due to the missing Postgres 8.3 installation. This version does not exist in Squeeze anymore, so I had to edit my sources.list to point to

deb http://ftp.de.debian.org/debian/ lenny main contrib non-free
aptitude update
aptitude install postgresql-8.3

Fortunately, this doesn’t conflict and also doesn’t pull in any dependencies from Lenny either. After doing that, the upgrade worked:

pg_upgradecluster 8.3 main
 
Stopping old cluster...
Disabling connections to the old cluster during upgrade...
Restarting old cluster with restricted connections...
Creating new cluster (configuration: /etc/postgresql/8.4/main, data: /var/lib/postgresql/8.4/main)...
Moving configuration file /var/lib/postgresql/8.4/main/postgresql.conf to /etc/postgresql/8.4/main...
Moving configuration file /var/lib/postgresql/8.4/main/pg_hba.conf to /etc/postgresql/8.4/main...
Moving configuration file /var/lib/postgresql/8.4/main/pg_ident.conf to /etc/postgresql/8.4/main...
Configuring postgresql.conf to use port 5433...
Disabling connections to the new cluster during upgrade...
Roles, databases, schemas, ACLs...
Fixing hardcoded library paths for stored procedures...
Upgrading database redmine...
Analyzing database redmine...
Fixing hardcoded library paths for stored procedures...
Upgrading database tracks...
Analyzing database tracks...
Fixing hardcoded library paths for stored procedures...
Upgrading database root...
Analyzing database root...
Fixing hardcoded library paths for stored procedures...
Upgrading database postgres...
Analyzing database postgres...
Fixing hardcoded library paths for stored procedures...
Upgrading database template1...
Analyzing database template1...
Re-enabling connections to the old cluster...
Re-enabling connections to the new cluster...
Copying old configuration files...
Copying old start.conf...
Stopping target cluster...
Stopping old cluster...
Disabling automatic startup of old cluster...
Configuring old cluster to use a different port (5433)...
Starting target cluster on the original port...
Success. Please check that the upgraded cluster works. If it does,
you can remove the old cluster with
 
 
pg_dropcluster 8.3 main
Don’t forget to remove Postgresql 8.3 again after that.


 

If you ever need to use the Windows SDK command shell (vcvarsall.bat or setenv.cmd) in an automated fashion, you can use this batch snippet to load it up from a command line. This works for Windows 7 SDK under Windows XP. Other Windows versions might work but are untested.

@ECHO OFF
REM ## This is needed for setenv.cmd later
setlocal EnableDelayedExpansion
REM ## STORE OLD DIR
set olddir=%cd%

REM ## DETERMINE SDK DIR
SET SDKREG=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0
SET SDKDIRQUERY=reg query "%SDKREG%" /v InstallationFolder
FOR /F "tokens=2* delims= " %%A IN ('%SDKDIRQUERY%') DO SET SDKDIR=%%B
REM Tab followed by Space ^^^^^^

REM ## STARTUP COMPILE ENVIRONMENT
call "%SDKDIR%\bin\setenv.cmd"

REM ## RESET DIRECTORY
chdir /d %olddir%
REM ## YOUR COMMANDS GO HERE
© 2011 Jörg Rüppel | Impressum Suffusion theme by Sayontan Sinha