# Setting up GNU Radio

**URL:** <https://www.ruby-forum.com/t/setting-up-gnu-radio/234547>\
**Category:** GNU Radio\
**Created:** [March 12, 2015, 10:44pm UTC](https://www.ruby-forum.com/t/setting-up-gnu-radio/234547 "2015-03-12T22:44:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [March 12, 2015, 10:44pm UTC](https://www.ruby-forum.com/t/setting-up-gnu-radio/234547/1 "2015-03-12T22:44:24Z")

</div>

Hi all,

I’m setting up a new shared laptop with multiple users who want to use  
GNU  
Radio. I’m not sure how to set this up correctly.

Should I do it this way:

1. cd /usr/local/bin

2. git clone [GitHub - gnuradio/pybombs: PyBOMBS (Python Build Overlay Managed Bundle System) is the GNU Radio install management system for resolving dependencies and pulling in out-of-tree projects.](https://github.com/pybombs/pybombs.git) && cd pybombs

3. sudo ./pybombs install gnuradio (sudo needed to give permission to  
create files here)

4. ./pybombs env

5. Then instead of sourcing the setup\_env.sh file from .bashrc, I will  
source it from /etc/profile.

6. Finally, and this is the part I’m most unsure of, since I used sudo  
./pybombs install gnuradio, root owns these files. If I remember  
correctly,  
this caused issues for me in the past trying to run gnuradio from a  
non-root account. How should I handle this?

Thanks a lot,  
Rich

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [March 12, 2015, 10:51pm UTC](https://www.ruby-forum.com/t/setting-up-gnu-radio/234547/2 "2015-03-12T22:51:06Z")

</div>

Hi Richard,  
no, not completely.  
instead of 1) you should cd somewhere in your home directory, where you  
have write access  
2) - 3) are correct. Choose /usr/local/ as prefix  
5) could also be done by copying over setup\_env.sh to  
/etc/profile.d/50-setup-gnuradio-paths

1. is normal and should not result in errors.

If normal users (including) want to install their own OOT modules,  
they’d use a local clone of pybombs, setting that gnuradio is already  
installed, and install their modules into a user-prefix (e.g.  
/home/user/prefix).

Greetings,  
Marcus

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [March 12, 2015, 11:03pm UTC](https://www.ruby-forum.com/t/setting-up-gnu-radio/234547/3 "2015-03-12T23:03:40Z")

</div>

Thanks for responding MarcusM,

I can’t execute ‘sudo ./pybombs install gnuradio’ at all, because it  
fails  
with the following output:

\*rbell@polarcode1:~/Documents/gnuradio/pybombs$ sudo ./pybombs install  
gnuradioInitializing config file…Username for GIT accessgituser  
[root]:Directory of git cache repositorygitcache []:Install  
PrefixTraceback  
(most recent call last): File “./pybombs”, line 25, in from  
mod\_pybombs import verbosity as v File  
“/home/rbell/Documents/gnuradio/pybombs/mod\_pybombs/ **init**.py”, line  
22,  
in from globals import \*; File  
“/home/rbell/Documents/gnuradio/pybombs/mod\_pybombs/globals.py”, line  
48,  
in config\_init(config); File  
“/home/rbell/Documents/gnuradio/pybombs/mod\_pybombs/cfg.py”, line 70, in  
config\_init if os.path.basename(pwd)==“pybombs”: File  
“/usr/lib/python2.7/posixpath.py”, line 121, in basename i =  
p.rfind(‘/’) + 1AttributeError: ‘NoneType’ object has no attribute  
'rfind’rbell@polarcode1:~/Documents/gnuradio/pybombs$ \*

If I install it without sudo to a local account directory, how will  
other  
users be able to access the install? Is it simply a matter of setting up  
the environment variables correctly?

v/r,  
Rich

On Thu, Mar 12, 2015 at 2:49 PM, Marcus Müller  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [March 12, 2015, 11:13pm UTC](https://www.ruby-forum.com/t/setting-up-gnu-radio/234547/4 "2015-03-12T23:13:57Z")

</div>

> If I install it without sudo to a local account directory, how will  
> other users be able to access the install? Is it simply a matter of  
> setting up the environment variables correctly?  
> The idea is to install GNU Radio globally, and let users handle their  
> own modules in their own home directories. So you’d install GNU Radio  
> with sudo as root into /usr/local, and each user installs private  
> modules into /home//prefix

When does the error you paste below occur? Before you get the chance to  
enter /usr/local as prefix, or after?  
Anyway, I’d recommend deleting your pybombs folder and cloning it  
cleanly again, running pybombs without root. It should ask you for the  
prefix. after that, it should print a warning that you should re-run it  
with sudo. Do that. Does the error still occur?

Greetings,  
Marcus

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [March 13, 2015, 6:02pm UTC](https://www.ruby-forum.com/t/setting-up-gnu-radio/234547/5 "2015-03-13T18:02:22Z")

</div>

Marcus,

I deleted the pybombs folder and re-cloned pybombs from remote. When  
running ‘sudo ./pybombs install gnuradio’ I still get the same error  
output  
when it reachees the prefix portion.

Also, I want to make sure I understand your following directions. To  
install gnuradio on a computer so all user accounts have access to it, I  
should do the following:

1. Install the base gnuradio framework to /usr/local/bin
2. Have users install custom modules they want to their local home  
directories

v/r,  
Rich

On Thu, Mar 12, 2015 at 3:12 PM, Marcus Müller  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [March 13, 2015, 6:04pm UTC](https://www.ruby-forum.com/t/setting-up-gnu-radio/234547/6 "2015-03-13T18:04:03Z")

</div>

I forgot to answer one of your previous questions. Yes the error occurs  
before I have a chance to enter anything for the prefix. I have no  
control  
over it.

v/r,  
Rich

On Fri, Mar 13, 2015 at 10:00 AM, Richard B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [March 13, 2015, 10:35pm UTC](https://www.ruby-forum.com/t/setting-up-gnu-radio/234547/7 "2015-03-13T22:35:54Z")

</div>

Thanks guys. I got it working eventually. All users on our station now  
have  
access to gnuradio.

There was no way I could get pybombs to create the config.dat file  
itself  
in /usr/local/bin. With sudo I had the prefix error problem and without  
sudo it didn’t have permission to create the file. The workaround I used  
was to create the config.dat file by hand. I copy and pasted one I had  
on  
another computer. That worked.

Thanks again,  
Rich

On Fri, Mar 13, 2015 at 10:49 AM, West, Nathan  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [March 13, 2015, 6:51pm UTC](https://www.ruby-forum.com/t/setting-up-gnu-radio/234547/8 "2015-03-13T18:51:10Z")

</div>

The problem is the python posixpath’s basename() when run as sudo is  
None.  
Pybombs depends on that for the initial config.

A solution without changing the way pybombs does this is just to run  
./pybombs config without root, then do your sudo pybombs install.

On Fri, Mar 13, 2015 at 12:02 PM, Richard B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
