LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-15-2022, 09:25 AM   #1
brainchild
LQ Newbie
 
Registered: Jan 2019
Posts: 29

Rep: Reputation: Disabled
race conditions for bluetooth audio devices with multiple local desktop logins


I often have multiple desktop sessions running, for more than one logged in user.

When connecting to a Bluetooth headset, the audio device becomes available for one user only, and often not the one with a desktop on the active virtual terminal.

How may I prevent the audio device from becoming available only on an inactive desktop session?

I am running Linux Mint 20.3. The desktop environment for all users is Cinnamon 5.2.7, and the desktop manager is Light DM.
 
Old 01-16-2022, 04:49 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,033

Rep: Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344
I guess the audio device was initialized when you logged in - therefore the section was active.
Probably you need to disable audio completely for all users except the preferred one.
 
Old 01-17-2022, 10:17 AM   #3
brainchild
LQ Newbie
 
Registered: Jan 2019
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
I guess the audio device was initialized when you logged in - therefore the section was active.
Probably you need to disable audio completely for all users except the preferred one.

I need a solution less nuclear. Other users still need audio, preferably with the ability to connect to a Bluetooth device when the corresponding session is active on the terminal. Audio devices should appear for the user that created the Bluetooth connection, without any race conditions.
 
Old 01-17-2022, 10:57 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,033

Rep: Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344
and how can you check which one is the currently active session? Are they all sit in front of the same pc?
 
Old 01-17-2022, 11:46 AM   #5
brainchild
LQ Newbie
 
Registered: Jan 2019
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
and how can you check which one is the currently active session? Are they all sit in front of the same pc?
How a person or software component would check the active session depends very much on the context, but the active session refers to the one associated with the selected virtual terminal, that is, the one displayed on the monitor and receiving input from the terminal.
 
Old 01-18-2022, 12:33 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,033

Rep: Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344
in that case you need to modify the tool which switches the session to handle bluetooth too.
 
Old 01-20-2022, 07:50 PM   #7
brainchild
LQ Newbie
 
Registered: Jan 2019
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
in that case you need to modify the tool which switches the session to handle bluetooth too.
How?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Exploiting race conditions in privileged programs sreeharsha1988 Linux - Security 8 03-23-2018 07:24 AM
[SOLVED] bluetooth dongle + bluetooth speaker but no sound on the bluetooth speaker vonbiber Slackware 4 05-11-2017 09:53 AM
LXer: Using scponly To Allow SCP/SFTP Logins And Disable SSH Logins On Debian Squeeze LXer Syndicated Linux News 0 08-24-2011 04:20 AM
Prevent race conditions in SSH, PERL aarontwc Programming 9 12-04-2008 12:51 AM
Race conditions in 2.4 between tasklet and sys.call yyanovsk Linux - Kernel 4 10-05-2006 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 11:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration