'Cannot solve the problem running project with MonoDevelop

I've just installed MonoDevelop on my Ubuntu 20.04 and have an error running test project:

Debugger operation failed

ApplicationName='/usr/lib/gnome-terminal/gnome-terminal-server', CommandLine='--app-id mono.develop.idea2f83d0b35d44e09d67f33ce9074849', CurrentDirectory='', Native error= Cannot find the specified file

I googled it and find this solution, so I ran it on my system, but it still not works.

Here's console output after running bash script:

/Documents/C#$ sudo ./script.sh
mkdir: cannot create directory ‘gnome-terminal’: File exists
---------------------
Folder contents: 
gnome-terminal-server
---------------------
gnome-terminal-server
ln: failed to create symbolic link './gnome-terminal-server': File exists

And this is my script:

cd ../..
cd /usr/lib

sudo mkdir gnome-terminal
cd gnome-terminal
echo "---------------------"
echo "Folder contents: "
ls
echo "---------------------"
ls
sudo ln -sv /usr/libexec/gnome-terminal-server

I'm quite new to Linux so any help would be highly appreciated.



Solution 1:[1]

There are few things you can do.

first change 'cd ../..' to 'cd' on script. There is not much difference in changes, but 'cd' command bring you to root directory whatever location you at and run.

Second thing, 'ln: failed to create symbolic link './gnome-terminal-server': File exists' seem that soft link has been existed.

So, if you want to run again this script, then remove directory 'gnome-terminal' and try to run again. Before run the script, please open the new terminal to ensure the changes has been made on system. Hope this will work.

Solution 2:[2]

I had the same problem (also found the solution you googled and did not work for me either). I solved it by uninstalling the default gnome terminal and installing the termit variant instead. Now my Monodevelop IDE runs the code correctly.

Solution 3:[3]

One way I've been able to reproduce your error is by using an erroneous filename. I suspect your "Broken Glass.ttf" file either contains a typo in the name, or is not located in the root folder of your project, in which case you should use the full path to the .ttf file.

Here's an example of a glfw + imgui implementation with a different font that works for me. Your code is in start():

import glfw
import OpenGL.GL as gl
import imgui
from imgui.integrations.glfw import GlfwRenderer

window_width = 960
window_height = 540
window_name = "glfw / imgui window"

def glfw_init():

    if not glfw.init():
        print("Could not initialize OpenGL context.")
        exit(1)

    glfw.window_hint(glfw.CONTEXT_VERSION_MAJOR, 3)
    glfw.window_hint(glfw.CONTEXT_VERSION_MINOR, 3)
    glfw.window_hint(glfw.OPENGL_PROFILE, glfw.OPENGL_CORE_PROFILE)
    glfw.window_hint(glfw.OPENGL_FORWARD_COMPAT, gl.GL_TRUE)

    window = glfw.create_window(window_width, window_height, window_name, None, None);
    glfw.make_context_current(window)

    if not window:
        glfw.terminate()
        print("Could not initialize Window")
        exit(1)

    return window

def start():
    io = imgui.get_io()
    io.fonts.clear()
    io.font_global_scale = 1
    new_font = io.fonts.add_font_from_file_ttf("Roboto-Regular.ttf", 20.0, io.fonts.get_glyph_ranges_latin())
    impl.refresh_font_texture()

def onupdate():
    imgui.begin("Test window")
    imgui.text("ABCDEFGHIJKLMNOPQRTSUVWXYZ\nabcdefghijklmnopqrstuvwxyz\n1234567890!@#$%^&*()")
    imgui.image(imgui.get_io().fonts.texture_id, 512, 512)
    imgui.end()


if __name__ == "__main__":
    imgui.create_context()
    window = glfw_init()
    impl = GlfwRenderer(window)
    start()
    while not glfw.window_should_close(window):
        glfw.poll_events()
        impl.process_inputs()

        imgui.new_frame()
        gl.glClearColor(0.0, 0.0, 0.0, 1.0)
        gl.glClear(gl.GL_COLOR_BUFFER_BIT)

        onupdate()

        imgui.render()
        impl.render(imgui.get_draw_data())
        glfw.swap_buffers(window)

    impl.shutdown()
    glfw.terminate()

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Sawan Meshram
Solution 2 Corina
Solution 3 Mart