vissha Posted October 24, 2015 Share Posted October 24, 2015 Hi All,I came across this old method for changing Bluetooth device name in ubuntu. It is better than creating a new file suggested in askubuntu. However, there are some issues I'm facing while trying on one of my friend's device. Could some linux users/devs help?It says permission denied while trying to edit bluetooth config file for making permanent changes to bluetooth device name:Note: I've modified bluetooth address to XX for anonymity in the code below.cat /var/lib/bluetooth/XX\:XX\:XX\:XX\:XX\:XX/configcat: /var/lib/bluetooth/XX:XX:XX:XX:XX:XX/config: Permission deniedPls help! Link to comment Share on other sites More sharing options...
HX1 Posted October 24, 2015 Share Posted October 24, 2015 This answer is based on this blog post. It worked for me. In a very Linux-y style of doing things, it's based on editing configuration files rather than using a tool. You need to edit two files: In /var/lib/bluetooth/[your MAC address]/config, edit the line that starts with name. In /etc/bluetooth/main.conf change the line with Name = %h-%d so that it reads only Name = %h, assuming you want to use your hostname as your bluetooth name (the %d adds a different index for each local bluetooth adapter, but you probably only have one). Using something else should work, but I haven't tried that myself.Once you're done, restart the bluetooth service: $ sudo service bluetooth restart Also found this... seems to be different methods for doing two very different things... I was trying to change the default bluetooth name for my new installation of Ubuntu (it comes with ubuntu-0) pretty ugly and not at all descriptive. So I needed to change it but even though it should be just easy as click on the top bluetooth icon and configuration. But at this moment you cant so I found a solution that worked for me. To do that you just need to create a file called machine-info into the /etc directory and set the property PRETTY_HOSTNAME. Open the new file or edit it if it exists sudo nano /etc/machine-info Copy this into the file PRETTY_HOSTNAME=MYBLUETOOTHNAME Save it with CTRL + X and Yes. Now just restart the bluetooth service sudo service bluetooth restart Link to comment Share on other sites More sharing options...
vissha Posted October 24, 2015 Author Share Posted October 24, 2015 This answer is based on this blog post. It worked for me. In a very Linux-y style of doing things, it's based on editing configuration files rather than using a tool.You need to edit two files:In /var/lib/bluetooth/[your MAC address]/config, edit the line that starts with name.In /etc/bluetooth/main.conf change the line with Name = %h-%d so that it reads only Name = %h, assuming you want to use your hostname as your bluetooth name (the %d adds a different index for each local bluetooth adapter, but you probably only have one). Using something else should work, but I haven't tried that myself.Once you're done, restart the bluetooth service:$ sudo service bluetooth restartHow to proceed with editing the /var/lib/bluetooth/[your MAC address]/config file?In Ubuntu 15.10, when used "cat", it says permission denied. However, I've used it in many times 14.04 and it was opening.When used "sudo nano" it was a new file and empty. Also tried "sudo gedit" and it opened as empty one.My frnd did not want to opt for second method and I too agree. That is the reason I mentioned in my first post. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.