how can Install apps with GUI in cubic?

Asked by ranamohammadi on 2019-04-17

I want to install apps that have GUI installer , for example Qt, VMWareWorkstation and etc.
for example I want install qt software, I copy it in root and run following command:
but don't run GUI installer and get following error:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
No protocol specified
qt.qpa.screen: QXcbConnection: Could not connect to display :0
Could not connect to any X display.

I can not run any graphical application from console's cubic.
I can install apt apps via terminal's cubic just now whenever I want to install apps that have GUI installer.

Question information

English Edit question
Cubic Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Best PJSingh5000 (pjsingh5000) said : #1

Cubic is used to customize the Live ISO, not to run GUI applications like a desktop environment.

You install applications and configure your system using the command line.

For example, to install qtcreator do the following:

1) Make sure the "universe" repository is listed...

    $ cat /etc/apt/sources.list

    You should see something like...
    deb cosmic universe

2) If not, edit sources.list to include the universe repository...

    $ nano /etc/apt/sources.list

    Edit this to include the universe repository, like...
    deb cosmic universe

    Type <CTRL><X> ad then <Y> to save your changes.

4) Similarly, use nano to edit files to set environment variables, such as XDG_RUNTIME_DIR...

    For all new users (the contents of skel are copied to all new user home directories):
    Add variables inside...

    For the entire system:
   Add variables inside...

3) Update your repositories

    $ apt update

4) Install your software package...

    apt install qtcreator

5) Now qtcreator will be available when you run boot into your Live ISO, and it will be installed on your new system.

Most people write a bash script to automatically setup their system.
Every time there is a new release, just run your script in Cubic to generate a custom version of the new release.

You can add `apt install ...` and other commands to the bash script.
In your bash script, you can use
    echo "some test" | tee <some_file>
to append lines to existing files (such as /etc/environment).

As another example, in your script, use the `sed` command to edit files (such as sources.list).

Once you've added a few of your favorite applications and commands to a bash script, simply drag it onto Cubic's chroot terminal to copy it there. Then execute it.

Cubic PPA (cubic-wizard) said : #2

One more thing...

Check the documentation for your software and see if they allow you to "seed" the installer, or if they have a "headless" installer.

For example, installing libdvd-pkg asks the user to answer some questions.

However you can "seed" default answers to those questions in advance...

        echo 'libdvd-pkg libdvd-pkg/title_u note' | debconf-set-selections
        echo 'libdvd-pkg libdvd-pkg/post-invoke_hook-remove boolean false' | debconf-set-selections
        echo 'libdvd-pkg libdvd-pkg/upgrade note' | debconf-set-selections
        echo 'libdvd-pkg libdvd-pkg/first-install note' | debconf-set-selections
        echo 'libdvd-pkg libdvd-pkg/post-invoke_hook-install boolean true' | debconf-set-selections
        echo 'libdvd-pkg libdvd-pkg/title_b-i note' | debconf-set-selections
        echo 'libdvd-pkg libdvd-pkg/build boolean true' | debconf-set-selections

        debconf-show libdvd-pkg

Finally, you can tell apt to not prompt the user during installation, using the DEBIAN_FRONTEND parameter...

        DEBIAN_FRONTEND=noninteractive apt --yes install libdvd-pkg

ranamohammadi (mohammadi20200) said : #3

Thanks PJSingh5000, that solved my question.

ranamohammadi (mohammadi20200) said : #4

Thanks Cubic PPA (cubic-wizard) , that solved my question.

Jamie Langer (jamie-langer) said : #5

To install Cubic...

    $ sudo apt-add-repository ppa:cubic-wizard/release
    $ sudo apt update
    $ sudo apt install cubic

If you manually add this repository, be sure to add the corresponding key:

    $ sudo apt-key adv --keyserver --recv-keys B7579F80E494ED3406A59DF9081525E2B4F1283B

Jamie Langer (jamie-langer) said : #6

How do you install a cubic?
To install Cubic, add the PPA, and install using apt . Launch Cubic from the dock or application menu. On the Cubic Introduction Page, select a directory to keep all your project files.
sudo apt-add-repository ppa:cubic-wizard/release.
sudo apt-get update.
sudo apt-get install cubic.