# Editing GCode on the fly

**URL:** <https://forum.onefinitycnc.com/t/editing-gcode-on-the-fly/21820>\
**Category:** Original/PRO Series (Buildbotics) (Gen 1)\
**Created:** [August 8, 2023, 11:55pm UTC](https://forum.onefinitycnc.com/t/editing-gcode-on-the-fly/21820 "2023-08-08T23:55:35Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![349iq2345](https://avatars.discourse-cdn.com/v4/letter/3/bb73d2/32.png) [@349iq2345](https://forum.onefinitycnc.com/u/349iq2345)\
**Post date:** [August 9, 2023, 12:39pm UTC](https://forum.onefinitycnc.com/t/editing-gcode-on-the-fly/21820/8 "2023-08-09T12:39:33Z")

</div>

Hey Chris,

> [@cluksha](#):
>
> Now if I could at least edit the file on the controller then I wouldn’t have to go back to my house to edit all the info.

besides remote control of UI and ssh login via Ethernet or WiFi, the Onefinity/Buildbotics Controller also allows to open a terminal window by typing Ctrl-T Ctrl-C on the UI (you need to attach a USB keyboard to type this). You can exit this shell with “exit”. In this terminal window, you can become root with the command `"sudo -i"` and then you can use the “[nano](https://en.wikipedia.org/wiki/GNU_nano)” text editor which is installed. With this text editor, you can edit your g-code file in the machine and re-run it from the UI again then.

The g-code files reside in `/var/lib/bbctrl/upload`

Alternatively, you could have a laptop with your CAD/CAM software with you in the workshop, and a short ethernet cable, and run the Onefinity UI on this laptop too (by visiting [http://onefinity.local](http://onefinity.local) in the laptop’s web browser). You could then adjust the g-code file on your CAD/CAM software (if you don’t like editing raw g-code with a text editor). When using the UI in a web browser on the laptop, you don’t need a USB drive for uploading of a file into the Onefinity Controller, you simply choose the upload button on the UI and a file dialog which shows your laptop’s filesystem opens, where you can select your g-code file.

Running the Onefinity UI on a computer connected via WiFi or Ethernet also has the advantage that you can see the **3D toolpath simulation** , which you don’t see on the touch display on the machine:

> [@I need a shopping list for ordering my first CNC](https://forum.onefinitycnc.com/t/i-need-a-shopping-list-for-ordering-my-first-cnc/19705/6):
>
> But you can **get by completely without connecting a monitor directly to the Onefinity controller** and **skip buying** the touch monitor, since the User Interface can be controlled completely from any **remote computer**. This even has the advantage that you can see the [CAMotics.org](http://CAMotics.org) 3D toolpath simulation that is not available on a monitor directly connected to the Onefinity controller, as the internal Raspberry Pi 3 has no 3D graphics acceleration package installed. In the case you use a remote computer, you need no USB drive since you can simply click the open file button and you will be able to select a file from your computer.
> 
> ![Flattening_File](https://us1.discourse-cdn.com/flex022/uploads/onefinitycnc/original/3X/5/4/54649f2849eb7c62768c93b8061174d46e432213.png)
> 
> Image: The 3D toolpath simulation when viewed on a remote computer.

Welcome to the forum!

---

_[View the full topic](https://forum.onefinitycnc.com/t/editing-gcode-on-the-fly/21820)._
