[ltp] trackpoint: 2.6.12 kernel patched, cannot echo to files

Marius Gedminas linux-thinkpad@linux-thinkpad.org
Sun, 30 Oct 2005 17:28:22 +0200


--M9NhX3UHpAaciwkO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Oct 30, 2005 at 07:53:37AM -0700, Kamesh Madduri wrote:
> Now when I do=20
> # sudo echo -n 1 > /sys/devices/platform/i8042/serio0/serio2/press_to_sel=
ect
>=20
> I get
> bash: /sys/devices/platform/i8042/serio0/serio2/press_to_select: Permissi=
on
> denied

That's because bash tries to redirect the output of 'sudo echo' to the
/sys/... file, but since bash runs without elevated privileges, it
cannot do so.

> Help me!

Do instead

  echo -n 1 |sudo tee /sys/devices/platform/i8042/serio0/serio2/press_to_se=
lect

or

  sudo sh -c 'echo -n 1 > /sys/devices/platform/i8042/serio0/serio2/press_t=
o_select'

or

  $ sudo -s
  # echo -n 1 >/sys/devices/platform/i8042/serio0/serio2/press_to_select
  # exit
  $

whichever is easier to remember.

Marius Gedminas
--=20
Computers are not intelligent.  They only think they are.

--M9NhX3UHpAaciwkO
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDZOaWkVdEXeem148RAonuAJ94uxoFGjrXKDv3MMCuy+6oXedHqgCfRKF4
IKd6lLd/K6JH+Foksnl+eAA=
=yZmX
-----END PGP SIGNATURE-----

--M9NhX3UHpAaciwkO--