B. Building GrblController for Linux

Option 1: QtCreator GUI Build and Run

  1. Launch Qt Creator
  2. Make sure you have the source code for Grbl Controller: in a terminal window, go back to your home folder: cd ~
  3. mkdir github
  4. cd github
  5. git clone https://github.com/zapmaker/GrblHoming
  6. In QtCreator, open existing project, navigate to github/GrblHoming and open GcodeSenderGUIthreads.pro
  7. Choose the default Desktop mode which should be checked and click Configure Project
  8. Click the green arrow to run. This will take a while to build and Grbl Controller should eventually launch.

After running you will need to pick the correct USB serial port. In the drop down of available ports, it may have USB in the name or it may be ttyS0.

Extra! Running Ubuntu in VirtualBox with pass-through USB – Only for the Adventurous

If you are running Ubuntu in VirtualBox on Windows, you’ll need to do the following:

  1. In VirtualBox, open Settings on your OS and go to USB and click Add (this assumes you installed VirtualBox with USB support).
  2. Pick the Arduino entry and then move it to the top of the list.
  3. Restart the Linux virtual machine – if Windows 7 you should see a “Device Driver Installation” popup appear with “Unidentified Device” – wait about 5 minutes or so for it to finish. It should find “VirtualBox USB” and say Ready to Use”.
  4. In a terminal window, cd into the folder that starts with “build…” in the github folder where QtCreator created the executable (tip: don’t type the 50 character long folder in by hand, just type a couple of characters and then hit the tab key – it will autocomplete the entire filename).
  5. Type sudo ./GrblController
  6. It will ask you to type your admin password (this step is required since Linux won’t open the serial port if not admin)
  7. In the Grbl Controller dropdown, pick ttyACM0 and Open. You should see the friendly greeting of grbl.

Option 2: Command Line

1. Open terminal window to your GrblHoming folder

2. Type qmake -config release -spec linux-g++ GcodeSenderGUIthreads.pro

3. Type make

4. To launch, type ./GrblController

Since you may not have sufficient permissions to access the executable, you can launch it like so:

gksudo ./GrblController

Or create a shell script to do this for you:

1. gedit g.sh

2. Enter this text and save

#!/bin/sh

gksudo ./GrblController

3. chmod +x g.sh

4. Type this to run: ./g.sh

13 thoughts on “B. Building GrblController for Linux

  1. hi,
    thanks a lt for this tool, it is exactely what i am looking for!!
    unfortunately i get the following error on compiling:

    g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -D__linux__ -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++ -I. -IQextSerialPort -I. -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -o appenderskeleton.o log4qt/appenderskeleton.cpp
    In file included from ./log4qt/appender.h:33:0,
    from ./log4qt/appenderskeleton.h:33,
    from log4qt/appenderskeleton.cpp:32:
    ./log4qt/helpers/logobject.h: In Elementfunktion »int Log4Qt::LogObject::referenceCount() const«:
    ./log4qt/helpers/logobject.h:186:11: Fehler: »QAtomicInt« kann nicht nach »int« in Rückgabe umgewandelt werden
    In file included from log4qt/appenderskeleton.cpp:37:0:
    ./log4qt/logmanager.h: Im globalen Gültigkeitsbereich:
    ./log4qt/logmanager.h:266:6: Fehler: »QtMsgHandler« bezeichnet keinen Typ
    make: *** [appenderskeleton.o] Fehler 1

    i tried to include the QtMsgHandler aswell but didtn work neither

    thanks in advance

    • Jeff – There is a known issue with the logging library and Qt5. One of the contributors found a solution to this.

      Can you try to build the “to34″ branch and see if that works for you? That branch has all the Qt5 fixes in it and is reasonably current. I hope to put it on the master branch eventually, seeing as Qt4 is no longer the default ship version.

      To build from that branch, in the console, type:
      git checkout to34

      Then rebuild clean.

      • hi,
        i dont uderstand the magic but it worked yeahh

        so thank you so much, now i can play and get comfortable with the grbl

        • hi me again
          i tried to run it within qt creator and there it gives me:

          /home/pongo/cnc/zapmaker/build-GcodeSenderGUIthreads-Qt_5_0_1_qt5_temporär-Release/moc_qextserialport.cpp:153: Fehler:invalid use of incomplete type ‘class QextSerialPortPrivate’

          and

          /home/pongo/cnc/zapmaker/GrblHoming/QextSerialPort/qextserialport.h:170: Fehler:forward declaration of ‘class QextSerialPortPrivate’

          sorry for the trouble, i just wanna understand the way it works

          thanks

          • I will have to look at that when i run it on linux. Are you using Ubuntu? I’m tracking bugs/enhancements on github in the Issues tab of my project. Feel free to add any problems you find.

          • yes i run ubuntu 13.04 and Qt 2.7.1
            i wanted to leave a comment on the bugtraccker but i could not find the site on github.

          • Jeff- I have checked in a fix to allow you to compile with Qt5. Please give it another try after pulling latest from git.

            Please be aware that you have to run the program as sudo under Ubuntu (i.e. it won’t open the com port if you run it from the debugger). This is not the case for the raspberry pi.

            Let me know how it goes.

  2. I am very thanks for using this software.But i run it in Linux,when i execute the GRBL Settings .That always prompt ” Wait for ok failed”.And sometime i run to do something when i came back,it has lost connection but there was not finished.

    Thanks a lot!

    • Ensure you can communicate with grbl using a program like minicom. If that works, then could you (a) send me the GrblController.log file that is usually created in the home folder and the (b) version of grbl and I will investigate. You can email me at this domain with the user zapmaker.

Leave a Reply to ShiLin Niu Cancel reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>