Comment 12 for bug 574287

Ok, here is some help to restore the system from "TTY_only" after tasksel removed important packages:

sudo apt-get install $(for i in $(cat /var/log/dpkg.log |grep -oP "(?<=`date +%Y-%m-%d`\s\d\d\:\d\d:\d\d\sremove)\s\S*\s"); do echo -n "$i "; done;)

Which basically looks in the dpkg.log for packages removed today and reinstalls them by handing the package-names over to apt-get. It also restores other packages :)