SHARE
TWEET

Auto RTLSDR installed for Ubuntu 12 with SDR#

a guest Oct 28th, 2012 13,278 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. #
  3. # Auto RTLSDR installed for Ubuntu 12 with SDR#
  4. #
  5. # By KJ4EHD ryan_turner
  6. # Find help @ #sdrsharp and ##rtlsdr on freenode IRC.
  7. # Current as of 28 OCT 2012
  8. # Tested using
  9. # * Ubuntu 12.10 64-bit
  10. #
  11. # This script works, as of today, grabbing the current versions automatically via apt-get, git, and svn:
  12. # * rev 991 of SDRSharp
  13. # * commit aad68f3a21f8507d5ad7b01dc9e980d2f0d7e327 of rtl-sdr
  14. # * Debian 2.10.8.1-5ubuntu1 of mono
  15. # * MonoDevelop 3.0.3.2
  16. # * 19+svn20111121-1build1 of libportaudio2
  17. # * icotool 0.30.0
  18.  
  19. sudo apt-get install subversion git mono-complete libportaudio2 monodevelop icoutils
  20. cd /home/$(whoami)
  21.  
  22. # getting rtl-sdr working
  23. mkdir rtl-sdr
  24. cd rtl-sdr
  25. git clone git://git.osmocom.org/rtl-sdr.git
  26. cd rtl-sdr/
  27. mkdir build
  28. cd build
  29. cmake ../
  30. make
  31. sudo make install
  32. sudo ldconfig
  33. cd /home/$(whoami)
  34. rm -rf rtl-sdr
  35.  
  36. # getting sdrsharp to work
  37. svn checkout https://subversion.assembla.com/svn/sdrsharp/
  38. cd sdrsharp/trunk
  39. mdtool build -c:Release SDRSharp.sln
  40. cd Release
  41. ln -s /usr/lib/x86_64-linux-gnu/libportaudio.so.2 libportaudio.so
  42.  
  43. # modify config
  44. sed -i '/SDRSharp.SoftRock.SoftRockIO,SDRSharp.SoftRock/d' SDRSharp.exe.config
  45. sed -i '/SDRSharp.FUNcube.FunCubeIO,SDRSharp.FUNcube/d' SDRSharp.exe.config
  46. sed -i '/SDRSharp.FUNcubeProPlus.FunCubeProPlusIO,SDRSharp.FUNcubeProPlus/d' SDRSharp.exe.config
  47. sed -i '/SDRSharp.RTLTCP.RtlTcpIO,SDRSharp.RTLTCP/d' SDRSharp.exe.config
  48. sed -i '/SDRSharp.SDRIQ.SdrIqIO,SDRSharp.SDRIQ/d' SDRSharp.exe.config
  49. sed -i 's/<!-- <add key="RTL-SDR \/ USB" value="SDRSharp.RTLSDR.RtlSdrIO,SDRSharp.RTLSDR" \/> -->/<add key="RTL-SDR \/ USB" value="SDRSharp.RTLSDR.RtlSdrIO,SDRSharp.RTLSDR" \/>/' SDRSharp.exe.config
  50.  
  51. # "Install" it
  52. mkdir /home/$(whoami)/.sdrsharp/
  53. mv /home/$(whoami)/sdrsharp/trunk/Release/* /home/$(whoami)/.sdrsharp/
  54.  
  55. # Create PNG of icon
  56. cd /home/$(whoami)/.sdrsharp/
  57. icotool -x /home/$(whoami)/sdrsharp/trunk/SDRSharp/mixer.ico
  58. chmod 0777 /home/$(whoami)/.sdrsharp/mixer_1_48x48x32.png
  59.  
  60. # Clean up
  61. rm -rf /home/$(whoami)/sdrsharp/
  62.  
  63. # Make .desktop file
  64. cd /home/$(whoami)/Desktop
  65. touch prog-sdrsharp.desktop
  66. echo "[Desktop Entry]" >> prog-sdrsharp.desktop
  67. echo "Type=Application" >> prog-sdrsharp.desktop
  68. echo "Encoding=UTF-8" >> prog-sdrsharp.desktop
  69. echo "Name=SDR#" >> prog-sdrsharp.desktop
  70. echo "Comment=SDRSharp" >> prog-sdrsharp.desktop
  71. echo "Exec= mono /home/$(whoami)/.sdrsharp/SDRSharp.exe" >> prog-sdrsharp.desktop
  72. echo "Icon= /home/$(whoami)/.sdrsharp/mixer_1_48x48x32.png" >> prog-sdrsharp.desktop
  73. echo "Categories=Utility;Application;" >> prog-sdrsharp.desktop
  74. echo "Terminal=false" >> prog-sdrsharp.desktop
  75.  
  76. sudo chmod +x /home/$(whoami)/Desktop/prog-sdrsharp.desktop
  77.  
  78. # Make the menu item
  79.  
  80. touch prog-sdrsharp.directory
  81. echo [Desktop Entry] >> prog-sdrsharp.directory
  82. echo Value=1.0 >> prog-sdrsharp.directory
  83. echo Type=Directory >> prog-sdrsharp.directory
  84. echo Encoding=UTF-8 >> prog-sdrsharp.directory
  85. xdg-desktop-menu install prog-sdrsharp.directory prog-sdrsharp.desktop
  86. xdg-desktop-menu forceupdate
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top