Two women were contentedly passing a tube of sweets between themselves.

A chap in a Pringle sweater, which would not have been out of place in a golf club, was perusing his Herald crossword, or it might have been the sudoku, I couldn't quite see. Someone else was taking a photograph of the walls. Then a respectful silence descended as the speakers came in, and the room began to talk about murder. Lots of murders. Horrific murders too.

When it comes to the printed page it seems, Glaswegians like a good murder. It's a curious Janus-like position to hold, but people in Glasgow like to portray the city as one of the friendliest in the world, but they also like a good gruesome death or two when they read about the place.

For this was a bright sunny day in Glasgow at the weekend yet the main hall at the Mitchell Library was full of about 200 people at the opening weekend of the Aye Write! book festival to discuss Crime and the City, or why Glasgow lends itself to ugly deaths on the printed page of crime fiction.

Glasgow's role in such fiction is not new of course. No Mean City is often quoted as the popular work of fiction in the thirties which portrayed the grim squalor of Gorbals and the razor gangs who terrorised the area. I don't think it's read much now, but politicians at the time condemned it for giving Glasgow a bad name. Surprisingly the Glasgow Herald of the day was quite forgiving. In a review it pointed out that the characters in the book were "vile, pathetic and contemptible" but astutely pointed out: "Their portrayals of violent deeds and brutal passions make the flesh of well-bred readers shudder delightfully."

And that's still a truth today. The audience at the Mitchell was a gentle cross-section of folk who would not be out of place at a church social, yet they still craved the delightful shudder that a book about the seedier side of the city brings them.

Actually, although No Mean City was a big success, it didn't lead to a great life for author Alec McArthur. An unemployed baker living in Gorbals, he watched life around him in that teeming pre-war area which housed 50,000 people and 120 pubs in an area no bigger than a city park. He wrote his local knowledge into his tale of razor gangs, and a publisher wisely hired a London hack, Charles Kingsley Long, to turn McArthur's rambling prose into a pot boiler. McArthur could never write a book as good as No Mean City again, and he died on the banks of the Clyde after drinking a bottle of disinfectant.

Since then there have been books which portrayed Gorbals in a more lenient light of couthy neighbours looking out for each other. However I recall the words of Harry Diamond, former press officer at Glasgow council who grew up in Gorbals, the son of Jewish immigrants from Russia. "I have read several books about Gorbals, most of them sentimental, nostalgic drivel. My Gorbals had ignorance, stupidity, every disease known to mankind, malice, violence, illiteracy and unbelievable cruelty to partners and children." Gosh, don't hold back there, Harry.

Since then the stand-out Glasgow crime fiction has been the Laidlaw books by William McIlvanney who could take the driven plot of a police procedural yet dust it with lyrical prose. "It was Glasgow on a Friday night. The city of the stare," is the start of his second Laidlaw novel. If only I could have recalled Shakespeare as easily then my Higher English might not have been such a slog.

McIlvanney, although from Kilmarnock, loves Glasgow, but he started that book on a Friday night when the friendliness of the citizens can become distorted when strong drink is added to the mix.

The speakers at Aye Write! included Malcolm MacKay from Stornoway, author of a Glasgow trilogy set in the city's criminal underworld which begins with the award-winning The Necessary Death of Lewis Winter. When asked why he chose Glasgow as the setting for his books, he answered truthfully: "Stornoway doesn't have a lot of crime. Glasgow has convincingly tough but interesting people and locations." Malcolm, perhaps wisely, does not go into too much detail about the Glasgow of his books - it is novels about people in the shadows of society and the locations have a shadowy feel to them.

Perhaps too much detail does not work. I once read a novel by a major American author who had a section located in Glasgow where a killer gave his location away by the creaking of the stairs as he crept up, gun in hand, a Glasgow tenement. I immediately wanted to write to his publishers telling them Glasgow was not New York and its tenements have non-creaking stone stairs rather than wood. Clearly I take these things too seriously. Or there was the Christopher Brookmyre novel with a car chase through named streets in Glasgow's south side. I broke off reading it in order to check Google maps that they went down one-way streets in the correct direction.

Asked if he was giving Glasgow a bad name, Malcolm replied: "I tend to think it's not our responsibility to act as salesmen for the city."

The Glasgow audience nevertheless was charmed. Aye Write! had 5000 visitors at that sunniest of weekends in Glasgow with another 10,000 expected over the next few days. Clearly the demise of book-reading is sometime off.

So we can accept Glasgow at its worst in crime fiction. Perhaps that's a sign of maturity. But only of course when it's fiction. Recent events have shown that in the real world we are still profoundly shocked when innocent people come up against the worst in our city.