It depends on the object of the preposition. Each object, by convention, has a front and a back and if one is positioned next to the object's front, then one is in front of the object. Likewise if one is positioned next to the object's back, then one is behind the object.
The front of a television is the screen, and therefore when watches television one is in front of it. A TV repairman might sit behind it.
A desk is an interesting thing, though, because the front and back of a desk sometimes varies with the placement in the room and the type of desk. The term, "behind a desk" is typically used when the desk is out in the open and comes between the person sitting at the desk and a person entering the room so that from the visitor's perspective the person is sitting behind the desk. Desks designed for this kind of placement usually have ornate "fronts" as opposed to desks designed to go up against a wall that have simple plywood or cardboard panels on the back. However when the desk is pushed up against a wall one typically just speaks of sitting at the desk rather than in front of or behind it.