Ubuntu: How to Start Chia Program

Hello together,
I installed chia on a ubuntu computer, as described here:

INSTALL · Chia-Network/chia-blockchain Wiki · GitHub

chia was installed correctly and then started automatically after installation.
But after a restart of the computer I can’t find an icon anywhere to start Chia.
And I also don’t know what I have to type in the terminal to start chia.
I have been searching the internet for many hours now, but Have not found anything. What do I have to type in the terminal to start Chia (again)?

From a fresh terminal window, try:

cd chia-blockchain/chia-blockchain-gui
npm run electron &
1 Like

To automatically start o reboot, I use cron. Just end the cron file by typing crontab -e into the terminal, Then add the lines:

SHELL=/bin/bash
@reboot         cd ~/chia-blockchain && . ./activate && chia start farmer
4 Likes

I got this Message:

That message pops up if you forget to switch to the python virtual environment. In that directory, call: . ../activate before running npm.

you can also use this command to switch to python environment:

source ./chia-blockchain/activate

For pure CLI, it’ll always begin with the chia command. The github page says it all, but some of the basics to get you going will be
chia start farmer - if you have an all in one rig, full node, farmer. This should cover you
chia start harvester - if you have a full node and a separate harvester that has plots

In my case, I’m running an all in one system, full node, farmer, plotter - so I’m good with chia start farmer.

If you wish to view the server connection and state, chia show -sc. If you want to view your farm status, chia farm summary.

The help of the chia CLI is quite self explanatory. Feel free to play with it. Append it with -h and it will show you what it does even if the document in github doesn’t yet.

Running Ubuntu 20.04 as desktop with Chia v1.1.5

This worked for me in a fresh terminal window (does not automatically start on boot, but does open gui):

source ./chia-blockchain/activate
cd chia-blockchain/chia-blockchain-gui/
npm run electron &

How can I skip this and just install the GUI or create a shortcut to the GUI? PS: I want to use this for Flax, witch has the same install instructions but no experimental GUI for Raspberry Pi. I just want to start the Flax blockchain with a click. Can you help, please?

As far as I know, if you don’t use the installer which is currently broken on the Pi (arm64), you will have to activate Chia first to lunch it. Therefore no shortcut for the app.

Flax is the same as Chia.

You would have to install the program as specified by Chia Blockchain and creating your own shortcut.

Instructions for creating a shortcut (For Ubuntu Desktop)

You can do this by creating a script that will run the commands for you. The easiest way to do this would be to open the ‘Text Editor’ app and entering the commands to run:

#!/bin/bash
source ~/chia-blockchain/activate
cd ~/chia-blockchain/chia-blockchain-gui
npm run electron &

Note: This assumes you installed the Chia-Blockchain program in your home directory. If not, feel free to change the directory structure to match your installation.

Save this to your desktop as ‘Chia-Gui’.

This should create a new file on your desktop.
Right-Click on the file > Properties > Permissions and tick Execute: ‘Allow executing file as a program’.

Now go to the next tab ‘Open With’ and choose ‘Run Software’.

Update your environment to run files instead of displaying them:

  1. Open ‘Files’
  2. Open properties (top right / 3 vertical dots) > Preferences > Behaviour
  3. Go to section ‘Executable Text Files’ and select ‘Run Them’

With that you should be done. Double click the file and it should open the Gui.

Do this for whatever other program you want to run but too lazy to type in the command line.

Feel free to change the file icon to whatever you want, but the chia icon can be found in:

chia-blockchain/chia-blockchain-gui/src/assets/img/chia_circle.png

Other linux users feel free to improve upon this answer.

2 Likes

Chia has an experimental installer for ARM64 that works great, app gets installed, icon appears in start menu, no need to use terminal windows. Flax does not have an installer yet and since Flax is a copy/paste of Chia I was wondering how to install the Flax GUI, not run from terminal.

Did you actually test the experimental installer for ARM64?

I tested it and it didn’t work for me on Raspberry Pi 4 B 8GB with a freshly installed Ubuntu 21.04 :joy:

Edit: it seems you didn’t actually test the installer at all since this issue has been reported as bug #1724 on the official repo which is still open since then.

I did run the installer on Raspberry Pi 4 8 GB RAM, but on Raspberry Pi OS 64 bit. Installer worked fine, now the GUI is running and syncing on the Pi. I just downloaded from Chia webpage and installed on Raspberry Pi and got it working the first time, no terminal needed. Raspberry Pi · Chia-Network/chia-blockchain Wiki · GitHub

1 Like

It seems the installer only works on some distros, hence experimental in the name :sweat_smile:

It’s good if this is working for you. I didn’t know that it’s working at all so I thought you didn’t actually test it yet.

Sorry :pray:

Hi, can I have more details on how to execute the following part? I am running on Ubuntu 20.04.

Screenshot from 2021-08-12 15-40-53




2 Likes

Thank you @uChiaFarmer , it works!!

Another question, I am placing this script on the Desktop. It will work if I right click the script > Show in files> double click. But it will not launch if i double click directly from the Desktop.

How can I make it more user friendly by launching directly from the Desktop?

Thats weird, I have a test script on my desktop and it just works. Not sure what is different about your setup.

Hello, I am able to open chia in my raspberry, plots it gets sync, but after 1 or to 2 days, the app closes. And i have to reopen it, log in, wait to resync… few days after the same old story… closes again. Any idea what could be happening?