You are not logged in.
Today I've tried setting up Godot Engine with C# on my computer & I'm so confused on how to do it.
Firstly, I'm able to install all necessary packages for both to work correctly:
These are standard packages needed based on the .NET and Godot Engine Arch wiki articles.
Now onto my pressing issue: Setting up with external code editor. Since C# coding isn't natively supported on Godot's built-in code editor, 3rd-party code editors are the way to go. So I opted in for VSCodium (vscodium-bin).
But problems come as I'm unsure how to the following:
1. The .NET#Installation section mentions to do the following:
Tip
Add ~/.dotnet/tools to PATH, otherwise dotnet tools will not work from shell.
Where? Inside /etc/environment? ~/.bash_profile? ~/.bashrc? or /etc/bash.bashrc?
As much as I'm tempted to use the "export PATH=*", I don't know where the changes are written/saved, as I must know the file modified in case I need to change it (say removing that line to my PATH variable if I don't need dotnet & C#)
2. Following the C# Setup - Visual Studio Code guide from Godot's official documentation to make Godot code editing work with VSCodium, it instructs to do the following:
To configure a project for debugging, you need a tasks.json and launch.json file in the .vscode [presumably ".vscode-oss" for VSCodium] folder with the necessary configuration.
Here is an example launch.json:
{ "version": "0.2.0", "configurations": [ { "name": "Play", "type": "coreclr", "request": "launch", "preLaunchTask": "build", "program": "${env:GODOT4}", "args": [], "cwd": "${workspaceFolder}", "stopAtEntry": false, } ] }For this launch configuration to work, you need to either setup a GODOT4 environment variable that points to the Godot executable, or replace program parameter with the path to the Godot executable.
Same problem as the previous one, where do I set it up? My assumption is in the /etc/environment file and add GODOT={/path/to/Godot/executable}
Next problem is, where is Godot even located within my system? I don't know its path. It's not specified anywhere where it's found in either Arch's wiki or at Godot's.
Just some stuffs that's been bugging me for the past hour over things I don't know. Hoping anyone here can help me with completing these 2-3 steps left for me to continue my game dev journey.
Cheers.
Last edited by ryanbarillos (2025-11-04 20:33:37)
Offline
All questions about environment variables and where to put them can be answered with "it depends" but https://wiki.archlinux.org/title/Environment_variables should give you a good general overview. For the case in point, your probably want a user specific override so ~/.bash_profile would fit, to properly expand $PATH you need to "add" to whatever is already in PATH, as explained in the code block at https://wiki.archlinux.org/title/Enviro … s#Per_user for example. However explicitly for $PATH overrides /etc/environment is not a good fit, since you can't expand the existing env.
As for figuring where an applications executables are doing a
pacman -Ql $package | grep usr/binwill give you a list of things in the "standard" path, which will show you that godot is indeed in /usr/bin/godot, for the godot4 environment variable and since that is a single "static" location /etc/environment would be fineish again.
Last edited by V1del (2025-11-05 01:08:55)
Offline
The timing is so funny, I also got to play with C# and godot-mono yesterday. First of all, there are some issues with .NET and Godot in Arch Linux, which I made sure to report yesterday to the godot-mono package and dotnet-core package.
Godot recommends to use the latest dotnet, as described in their blog post and their comments.
But the current godot-mono package, forces you to install .NET 8. Which is made worse by the current state of the dotnet-core packages, that are not versioned, so you are forced to use the oldest one. Personally, until Arch improves this packaging issues, I would prefer to just download the .NET binaries from the microsoft website, extract them to a directory (e.g /home/user/dev-tools/dotnet-10), setup the PATH variable, and enjoy any dotnet software.
But anyway, let's suppose you only want to work with pacman and .NET 8 at the moment, you can create a file in the /etc/profile.d directory to add .NET to PATH. Then, you go inside godot and set your favorite editor as described here.
It worked for me first try with Rider (which is free for personal projects as well). You can then run your project inside Rider normally (wayland supported too).
Last edited by Luciddream (2025-11-05 10:47:57)
Offline
All questions about environment variables and where to put them can be answered with "it depends" but https://wiki.archlinux.org/title/Environment_variables should give you a good general overview. For the case in point, your probably want a user specific override so ~/.bash_profile would fit, to properly expand $PATH you need to "add" to whatever is already in PATH, as explained in the code block at https://wiki.archlinux.org/title/Enviro … s#Per_user for example. However explicitly for $PATH overrides /etc/environment is not a good fit, since you can't expand the existing env.
As for figuring where an applications executables are doing a
pacman -Ql $package | grep usr/binwill give you a list of things in the "standard" path, which will show you that godot is indeed in /usr/bin/godot, for the godot4 environment variable and since that is a single "static" location /etc/environment would be fineish again.
Thanks for this! With this info, I've set up the following:
~/.bash_profile
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
# Includes the following:
# - Microsoft .NET Tools ( https://wiki.archlinux.org/title/.NET#Installation )
export PATH="${PATH}:${HOME}/.dotnet/tools"And in /etc/environment
#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#
GODOT4=/usr/lib/godot-mono/godot.linuxbsd.editor.x86_64.monoThanks!
Godot recommends to use the latest dotnet, as described in their blog post and their comments.
But the current godot-mono package, forces you to install .NET 8. Which is made worse by the current state of the dotnet-core packages, that are not versioned, so you are forced to use the oldest one. Personally, until Arch improves this packaging issues, I would prefer to just download the .NET binaries from the microsoft website, extract them to a directory (e.g /home/user/dev-tools/dotnet-10), setup the PATH variable, and enjoy any dotnet software.
But anyway, let's suppose you only want to work with pacman and .NET 8 at the moment, you can create a file in the /etc/profile.d directory to add .NET to PATH. Then, you go inside godot and set your favorite editor as described here.
Good info right there! Curious to know how you set up the PATH export in /etc/profile.d.
Is the file structure similar to the example shown in the Arch Wiki's Environment_variables#Using_shell_initialization_files?
~/my-environment.sh
export EDITOR=vim export XDG_CACHE_HOME="$HOME/.cache" export XDG_CONFIG_HOME="$HOME/.config" export XDG_DATA_HOME="$HOME/.local/share" export XDG_STATE_HOME="$HOME/.local/state"
Offline
I have a file called dotnet.sh inside /etc/profile.d directory which points to the dotnet directory.
export DOTNET_ROOT=$HOME/dev-tools/dotnet-10
export PATH=$PATH:$HOME/dev-tools/dotnet-10After you create it you have to reboot the PC so it can be properly used.
Last edited by Luciddream (2025-11-06 15:52:15)
Offline
basically, /etc/profile.d/ can contain shell scripts which the "default" /etc/profile will run where you could do your exports as well, yes. (you might want to look at /etc/profile, it also defines a add_to_path function that properly expands paths without generating dupes)
Offline