15

I recently completely transitioned to Linux but struggle to find a good way to code in C#. I discovered Monodevelop which looks similar to Visual Studio, but whenever I try to run any code I get this error ( I run pop! _os if it matters):

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

It might have something to do with the path of the terminal but I don't know how to fix it. I know it's a Linux specific thing but I didn't know better than to post it here.

double-beep
  • 5,031
  • 17
  • 33
  • 41

9 Answers9

28

i have seen this error when i'm running my console program (c#) on monodevelop on kali : "ApplicationName='/usr/lib/gnome-terminal/gnome-terminal-server', CommandLine='--app-id mono.develop.id0771a7bfd5a6445f82d97a8fe5fc4abc', CurrentDirectory='', Native error= Cannot find the specified file"

I have solved it using this script on terminal :

  1. cd /usr/lib
  2. sudo mkdir gnome-terminal
  3. cd gnome-terminal
  4. sudo ln -s /usr/libexec/gnome-terminal-server

Make this, it will be done; and now run again your program and enjoy :)

SCOVICH LeRusse
  • 281
  • 3
  • 4
18

Also had this same error. This happens because /usr/lib/gnome-terminal/gnome-terminal-server is actually /usr/libexec/gnome-terminal-server, and MonoDevelop is still using the old path.

The way I fixed it was to create the /usr/lib/gnome-terminal directory and adding a symbolic link with sudo ln -s /usr/libexec/gnome-terminal-server inside /usr/lib/gnome-terminal.

Kayky de Brito
  • 308
  • 2
  • 6
5

That error was really frustrating when I started using Monodevelop for C# in lunix , Follow this simple steps:

-Open the terminal. In the terminal type this commands:

 cd /usr/lib
 sudo mkdir gnome-terminal
 cd gnome-terminal
 sudo ln -s /usr/libexec/gnome-terminal-server

go back to your monodevelop and run your code and everything will be good.

Dominique
  • 16,450
  • 15
  • 56
  • 112
Mbote-Joseph
  • 73
  • 1
  • 4
1
  1. Open the lib folder. Click on the arrow pointing down, next to the word lib, on top, and click open on the terminal.

  2. Type sudo mkdir gnome-terminal

  3. sudo ln -s /usr/libexec/gnome-terminal-server

David Buck
  • 3,752
  • 35
  • 31
  • 35
Renan
  • 11
  • 1
1

This tip solved it for me here. I'm using PopOS

cd /usr/lib
sudo mkdir gnome-terminal
cd gnome-terminal
sudo ln -s /usr/libexec/gnome-terminal-server
Eric Aya
  • 69,473
  • 35
  • 181
  • 253
0

Recently, I have install Ubuntu 20.04 in my system and same problem is occurred to me.

And I had run the following command on terminal

:~$ cd /usr/lib
:/usr/lib$ sudo mkdir gnome-terminal
:/usr/lib$ cd gnome-terminal
:/usr/lib/gnome-terminal$ sudo ln -s /usr/libexec/gnome-terminal-server

Now, try to run monodevelop application again.

Sawan Meshram
  • 230
  • 2
  • 12
0

I received this error with no further explanation. The above solution didn't work unfortunately but I did find a setting that at least let me run my application with a debugger so I thought I would share it here.

If you go to Run Configurations under your project settings and uncheck Run on external console, you will be able to run your code.

Jakobitz
  • 71
  • 1
  • 5
0

For me this works:

  1. cd /usr/lib/
  2. sudo mkdir gnome-terminal
  3. cp -r ./gnome-terminal-server ./gnome-terminal

And if you concern about memory garbage on your laptop you can run following commands as well:

  1. cd ../
  2. sudo rm gnome-terminal-server

That commands are useful cause you copied gnome-terminal-server to gnome-terminal folder

Oleksa
  • 1
  • 2
-4

I had that same error (which made me transition to Windows :c).

Do not use mono-develop to code c# in linux, simply install vscode and .net core for linux. Create a .net core project and open it with vscode. Trust me, it will save your life