The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Applications (http://hintsforums.macworld.com/forumdisplay.php?f=5)
-   -   Bluetooth switching off (http://hintsforums.macworld.com/showthread.php?t=169832)

seesolve 12-02-2013 03:42 PM

Ah, so Bluetooth only shuts off when you shut down? Interesting.

When you downloaded blueutil, how did you install it? There is an 'Install' file (it's a .command file). Did you double-click that?

RobertSK 12-03-2013 03:55 AM

Bluetooth only needs to be restarted after shutting down as one particular user. I have not been able to get Blueutil working yet. I tried installing it with a double click.

seesolve 12-04-2013 07:47 PM

What happened when you did that?

RobertSK 12-05-2013 07:26 AM

I got a message : the execution error: cp: directory /usr/local/bin does not exist (1)

trevor 12-06-2013 11:56 AM

In your Terminal, try the following command:

sudo mkdir /usr/local/bin

And enter your admin password when prompted. Then try installing again.

By the way, that's a pretty poor installer that assumes /usr/local/bin already exists, but doesn't create it in the event that it doesn't. /usr/local/bin is common across Unix systems, but it does not exist by default in OS X.

Trevor

RobertSK 12-08-2013 05:12 AM

Just tried that but terminal would not accept anything typed after password!

DeltaMac 12-08-2013 07:14 AM

Quote:

Originally Posted by RobertSK (Post 724077)
Just tried that but terminal would not accept anything typed after password!

Yes, that's a security feature in the terminal:
You will not see anything repeated as you type in your password. Just type it, then press enter.

RobertSK 12-08-2013 07:45 AM

Hi, I got
mkdir: /usr/local: No such file or directory

seesolve 03-06-2014 04:26 PM

You've probably already moved on by now, but for others asking the same question, using the following will create the directory, including intermediate dircectories:

Code:

sudo mkdir -p /usr/local/bin

RobertSK 03-07-2014 03:57 AM

Hi, thanks for your info. I still have not resolved the problem and work with it but find that except for the admin account, other accounts don't seem to have the problem and remain connected to Bluetooth.
I tried what you suggest but got no response from Terminal as below.
rsk-853:~ test$ sudo mkdir -p /usr/local/bin
rsk-853:~ test$

DeltaMac 03-07-2014 08:06 AM

Quote:

Originally Posted by RobertSK (Post 726321)
Hi, thanks for your info. I still have not resolved the problem and work with it but find that except for the admin account, other accounts don't seem to have the problem and remain connected to Bluetooth.
I tried what you suggest but got no response from Terminal as below.
rsk-853:~ test$ sudo mkdir -p /usr/local/bin
rsk-853:~ test$

That is your response.
You run the mkdir command, which creates the folder that you need, and the terminal returns your text prompt. It wouldn't tell you anything else, unless there is a problem with creating the folder.
And, after that command, you should be able to run the blueutil app.

RobertSK 03-07-2014 11:38 AM

Just tried using blueutil and command not found
was reported. What next?

trevor 03-07-2014 01:28 PM

That probably means that blueutil is not in your PATH. Since you put blueutil in /usr/local/bin (which I think is the best place for you to have put it), you will need to add /usr/local/bin to the PATH.

First, let's verify that my guess is correct, since there are also other possible explanations for 'command not found'.

echo $PATH
(and hit Return at the end of the command)

Terminal should respond with a list of the directories in your PATH, looking something like:

% echo $PATH
/usr/local/bin:/usr/local/sbin:/sw/bin:/sw/sbin:/usr/local/lib:/usr/bin:/bin:/usr/sbin:/sbin:/usr/lib


Check and see if /usr/local/bin is listed, preferably near the beginning, and definitely earlier than /bin. If it's not, you'll need to add it.

I'm going to assume that you are using bash shell, which is the default in OS X. If you use something other than the default, then you probably don't need this explanation from me. Look in your home directory for any of the following files: .bash_profile, .bash_login, .profile, .bashrc

ls -al ~

If you don't see any of those files, then you have many many options for how you want to set this up. I'll give you one way, but there are a bajillion others, and everyone who uses Unix has their own opinion about the best way.

If you DO see one of those files in your home directory, let us know what it is and what it has in it. So for example, if you have a .bash_profile file, then issue the command:
cat ~/.bash_profile

...and copy/paste what you have here for us to see.

But back to the assumption that you don't have any of these files, the way I would do it is to create the files. I'll use pico, which is a very easy to use text editor. First create .bash_profile

pico ~/.bash_profile
(remember to hit Return at the end of commands)

This will put you into the pico text editor. Now copy/paste the text below into pico:

source $HOME/.bashrc

Now, hit Control-O to write the file, then hit Control-X to exit pico.

Next, create .bashrc:

pico ~/.bashrc

Now, copy/paste the following into pico:

export PATH=/usr/local/bin:$PATH


Hit Control-O to write, Control-X to exit.

Now, quit your Terminal program. Relaunch Terminal, and try the following command:
which blueutil

It should respond with /usr/local/bin/blueutil

If it responds with nothing, or with something else, then there's still a problem.

Trevor

RobertSK 03-08-2014 04:17 AM

Hi, I have 0 29 Nov 11:06 .bash_profile
but cat ~/.bash_profile produces no result.

trevor 03-10-2014 12:30 PM

That means that there is nothing in the file. So follow the directions above as if it didn't exist.

Trevor

RobertSK 03-10-2014 01:33 PM

Got as far as control-O but got a beep on Control-X with info on running processes being login,bash,nano.
Which blueutil gave me export PATH/usr/local/bin:$PATH

trevor 03-10-2014 04:41 PM

Quote:

Originally Posted by RobertSK (Post 726371)
Got as far as control-O but got a beep on Control-X

When you hit Control-O, the bottom of the pico screen gives you the filename, and you hit Return. After hitting Return, hit Control-X to exit.

Quote:

Originally Posted by RobertSK
Which blueutil gave me export PATH/usr/local/bin:$PATH

Can you copy/paste a transcript from your Terminal? You should see
export PATH=/usr/local/bin:$PATH
as a response from cat .bashrc, but getting that as a response to which blueutil makes no sense. You'll either get nothing (which means you don't have blueutil anywhere in your PATH) or /usr/local/bin/blueutil (which means that your computer is seeing the right blueutil), or some other path to blueutil (which means that your computer is seening the wrong blueutil).

Trevor

ganbustein 03-10-2014 05:04 PM

Quote:

Originally Posted by benwiggy (Post 723459)
You haven't said exactly which model of Mac you have, but it's going to be 8 years old at best, running Bluetooth 1.1. Hardware issues are also likely to come to the fore.

Hardware issues like, for example, the PRAM battery.

Loss of settings after a shutdown is the primary symptom of a dead battery. They frequently need to be replaced every five years or so.

RobertSK 03-11-2014 06:13 AM

Hi Trevor, just complete what you advised and have the following from Terminal:

Last login: Tue Mar 11 08:01:22 on console
rsk-853:~ test$ pico ~/.bash_profile
rsk-853:~ test$ which blueutil
/usr/local/bin/blueutil
rsk-853:~ test$ cat ~/.bash_profile
source $HOME/.bashrc

rsk-853:~ test$

regards, Robert

trevor 03-11-2014 07:54 AM

Quote:

Code:

rsk-853:~ test$ which blueutil
/usr/local/bin/blueutil


OK, so blueutil is now in your PATH. Does it work?

Trevor


All times are GMT -5. The time now is 12:55 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.