We consider the critical and off-critical properties at the boundary of the
random transverse-field Ising spin chain when the distribution of the coup
lings and/or transverse fields, at a distance l from the surface, deviates
from its uniform bulk value by terms of order l(-kappa) with an amplitude A
. Exact results are obtained using a correspondence between the surface mag
netization of the model and the surviving probability of a random walk with
time-dependent absorbing boundary conditions. For slow enough decay, kappa
< 1/2, the inhomogeneity is relevant: Either the surface stays ordered at
the bulk critical point or the average surface magnetization displays an es
sential singularity, depending on the sign of A. In the marginal situation
kappa = 1/2, the average surface magnetization decays as a power law with a
continuously varying, A-dependent, critical exponent which is obtained ana
lytically. The behavior of the critical and off-critical autocorrelation fu
nctions as well as the scaling form of the probability distributions for th
e surface magnetization and the first gaps are determined through a phenome
nological scaling theory. In the Griffiths phase, the properties of the Gri
ffiths-McCoy singularities are not affected by the inhomogeneity. The vario
us results are checked using numerical methods based on a mapping to free f
ermions. [S0163-1829(99)14229-2].