Posts

Showing posts with the label group

No sound issue in Ubuntu 14.04

It is an issue with Ubuntu 14.04 beta. I cannot listen any music or videos because the system showed no output device in the audio settings or just some dummy output. There is one way to fix that is to make sure my user is in the pulse and pulse-access group which provide access to audio driver. To see which groups I am in: $ sudo grep trinh /etc/group adm:x:4:trinh,syslog cdrom:x:24:trinh sudo:x:27:trinh dip:x:30:trinh www-data:x:33:trinh plugdev:x:46:trinh lpadmin:x:112:trinh trinh:x:1000: sambashare:x:124:trinh Add myself to pulse and pulse-access group: $ sudo usermod -a -G pulse,pulse-access trinh And now I can hear the sound again!

Django - Get a list of users of a certain group

To get a list of users of a certain group (let's call it 'MyGroup'): from django.contrib.auth import User, Group users = User.objects.filter(groups=Group.objects.get(name='MyGroup')) or: users = User.objects.filter(groups__name__in=['MyGroup'])