Monodevelop - Runs Only Using Sudo

Monodevelop - runs only using sudo

Look for permission errors with strace. Usually when a program can only be run as root it means that some files are unreachable, except when root.

strace monodevelop

I had the same issue myself. I did

strace monodevelop > user.txt
sudo strace monodevelop > root.txt
diff user.txt root.txt > diff.txt

And then I searched for the problematic files.

In the end this actually didn't help me. I eventually uninstalled, and reinstalled mono, and everything related to it. Hopefully either solution will help.

Where would I find the equivalent of the monodevelop executable for Visual Studio for Mac in?

I found the VisualStudio app in /Applications/Visual Stuido.app/Contents/MacOS, and executing VisualStudio under sudo did resolve the issue of access to the packages folder. I will see what I can do to debug using dtruss though I've not used it before. Any tips would be appreciated


It looks like I can't really mimic the strace solution with dtruss because I have to use sudo with dtruss regardless. If anyone can point at a way of comparing the sudo and non-sudo execution on MacOS like they do here Monodevelop - runs only using sudo it would be greatly appreciated.

I tried the following but it's not allowed:

sudo dtruss sudo ./VisualStudio

I found the reason why I needed to use sudo to open Visual Studio for Mac. I incorrectly used sudo when I cloned the repository. I had used sudo because I was confused by the failed authentication message with TFS previously. After I removed the solution folder and re-cloned the repository without sudo Visual Studio for Mac worked correctly.

As a side note, the only way I was able to authenticate from Git to TFS was by enabling credential caching: https://confluence.atlassian.com/bitbucketserver/permanently-authenticating-with-git-repositories-776639846.html#PermanentlyauthenticatingwithGitrepositories-OSX

Not able to open MonoDevelop v 2.4.2

For those interested in:

  1. Uninstall Mono with this script uninstall script. You have to save the script in a file with extension .sh
  2. Save the file in the desktop as uninstallMonoFr.sh (for example)
  3. Open a terminal window: cd Desktop, sudo ./uninstallMonoFr.sh, insert your pwd
  4. Download mono framework 2.10.4 (this version works for me)
  5. Install again

I don't know if the problem is due to 2.10.5 version of mono framework. 2.10.4 works well.

UPDATE Seems that Mono 2.10.5 still presenting a package bug. MonoDevelop can't open with this version. Mono 2.10.4 works.

UPDATE 2 I've just installed 2.10.6 and it works. MonoDevelop now opens correctly.

How to run a program from Files, coded using MonoDevelop, Gtk#, Ubuntu

Files is detecting the .exe extension as an archive, and therefore it opens it with File Roller or similar.

Just right-click the file HelloWorld.exe and select "Open With Other Application", click on "Find New Applications", and then type "mono" and press ENTER. The app will open.

Another possibility is to create a .desktopfile, and place it under ~/.local/share/applications, with this contents:

[Desktop Entry]
Exec=mono %F
MimeType=application/x-ms-dos-executable;
Name=mono
NoDisplay=true
Type=Application

MKBundle creates a native app from a mono application. The downside is that you have to compile both the app and all its dependencies, which can be tricky. In any case, the package you are looking for is gtk-sharp2.

An alternative to MKBundle is to include a text file, say HelloWorld.sh with the contents:

mono HelloWorld.exe

And then make it executable with:

chmod +x HelloWorld.sh

You can then pack both files together (use a .tar.gz target, which preserves attributes such as the executable one), and probably with a README file explaining to double-click HelloWorld.sh.

Or maybe you can pack the .exe with the .desktop file, and explain in the README file where it must be placed.

There are tons of possibilities.

Starting application in monodevelop vs xsp4

xsp4 is supposed to be run from the web application directory, not from bin directory.

The reason is in the ASP.NET architecture: a web application consist of a main directory ( say webapp) and several standard directories.

Let's just focus on bin, which only contains compiled assemblies referenced by your web application.

Simply said, if you run xsp4 under the scope of the bin directory, it'll never be able to reference Index.aspx. On the other hand, running Index.aspx from webapp allows the server to load any required assembly from the bin directory



Related Topics



Leave a reply



Submit