How do I set the default shell for codespaces in a browser? - codespaces

Setting it in local VS Code is straightforward. Setting it for linux via "Settings Sync" also isn't too hard. I want to set it for browser sessions.
Is there either an account-wide settings in codespaces, or a setting I can use in my shell profile (I am using dotfiles), to tell codespaces, "use one shell instead of another for my terminals"?

Since you want to do it without settings.sync, you can use project-local settings.json which then resides in your projects .vscode directory.
Open the Command Palette with [ctrl] [p] and type preference: open Workspace Settings (JSON)
This will create an empty local settings.json file for you.
Copy your desired settings and change them to your needs, this should override your global vscode settings.
Note: These will be project specific settings.
If you safe the contents of the .vscode directory in GitHub, they will be persistent in this repository.
Settings sync for the default shell should work out of the Box in the Github Codespace. This is persistent accross sessions and even accross different github repositories.
One funny thing here occurs to me, in some repositories VS Code still opens a bash shell as the first shell, while fish beeing the default. Seems to be something that GitHub does in its default container. But the first shell still isn't the default. Each new terminal that relies on the default selects your configured default shell. Simply open a new default shell and close the "first" one.


Changing Directory of STM32CubeIDE Projects

When I create a new STM32CubeIDE project, it default saves it to my /Documents directory. This isn't too bad except I like to have a folder for each application so that it isn't just a bunch of files. I tried creating a folder called "STM32CubeIDE" to save new projects to, put it gives me an error: "overlaps the location of another project".
I've done some googling and found that this issue also exists in Eclipse (which makes sense) but couldn't solve my problem from those solutions.
I was also wondering if there is a way to move all of my existing projects to this newly created folder? Last time I tried, the IDE flipped out on me and couldn't find my stuff.
First of all, do not call your folder "STM32CubeIDE" if this already exists. Use a different name, because this is normally used by default and it may cause issues (probably the reason why you are getting that error).
When you install or update STM32CubeIDE it gives you the option to choose where you want your default folder to be. For example, my default folder is
Now if you want to use different folders for different projects, there are two options:
You can Export your project (application) to a desired folder and then Import it using the File tab. This is a good method if you want to make backups, or just want to make sure that all relevant files are transferred correctly to avoid "missing file" issues.
The other method (my favourite) is to simply copy you project folders and paste them to a different folder, wherever you want to put them. Then you simply open STM32CubeIDE, go to File > Open Projects from File System... and chose your project. You might get a pop-up about software compatibility issues (if you made an update), etc. but this should open up your project and show it in the Project Explorer.

WPF: Image Path doesn't work after publishing

I have a trayicon in my WPF App. When I was debugging in Visual Studio, it works well:
System.Windows.Forms.NotifyIcon ni = new System.Windows.Forms.NotifyIcon();
ni.Icon = new Icon("../../logo,ico");
But after I published it, the App threw an exception saying it could find the path of the image of the trayicon. I've search a lot resources on online, I saw many solutions use pack, but it seems pack only accept Uri variable and the path for trayicon must be string. I also tried to create a folder called Resource under the project solution and put the image file into it. This was the same: worked while debugging but would not work after publishing..
So based on #WPF Germany's suggestion, I solved the path issue after publishing the App by Clickonce. However, if I copy a App shortcut to system startup folder, it would find the ico in C:\WINDOWS\system32, which is not easy to workaround since systems32 usually requires admin right to access. Any idea for that?
Did you check, that your logo.ico file is copied to output path?
In VS you have multiple options to provide your Resource files.
First option:
Select your logo.ico file in solution explorer and choose None as Build Action and Copy always at Copy to Output Directory (at file properties).
After compiling you will find the file in a subdirectory of our OutputPath.
use (if logo.ico is placed in your projects root):
ni.Icon = new Icon("logo.ico");
other option:
Use Resource as Build Action and build your Icon using a Stream created from Resources.logo...

Skinnable Windows Forms App: Handle different icon sets

When we started, we put all icons inside a folder in source control, and all Windows Forms projects reference icons inside that folder from their .resx file.
Now that we decided to have different-looking GUIs, we created two more icon sets, all with same names, each into its own folder, so that when we want to use a different one, we just copy and paste into the "main" folder.
The problem with this approach is source control: whenever we commit, we must be careful not to send our icons, if we changed them. This is very bothersome.
How can this be avoided, while keeping all icons under source control? Is there a standard way to handle this?
Have a configuration flag that indicates which set of icons to use. Then, instead of stomping on each other's icon sets, you only need to configure your workspace to point at the correct one.
To keep from having config files stomping on each other in VC, have the VC store a template of the config file with sensible default values, and then have the actual config file be ignored by the VC system.
For example, we will have web.config.template checked in to the VC system and make any system-wide config changes in there. Each developer (and any other sort of deployment) will have their own copy of the template file with their specific config needs in it.
To assist with knowing when the master config file has been changed, we have a set of hook scripts that notify the user that there have been changes and auto-diff against the local file, as well as requiring explicit flags to be set when changing the master file.

WPF app won't run in kiosk mode

I have a WPF application that is designed for a touchscreen kiosk. Users will not have access to a keyboard or mouse. The application runs fine when started normally from the program icon in windows. However, when it is set up to run automatically at startup (by replacing the Windows shell using a registry key), the application does not function properly.
The application reads an XML file that lists available videos, then displays buttons to show the videos. When run in "kiosk mode," it does not seem to have access to the files in its media directory (the XML file and presumably the videos as well). I suspect that because the application is running in place of the windows explorer, it is missing resources it needs for file access that are normally loaded by windows explorer.
I have not been able to find any info on this - there is plenty of info on how to get an app to run at startup, but not much on how to make sure it will actually function in that environment. The PC is running Windows 7 Professional.
Is my assumption about the problem correct, or is it likely something else (e.g. permissions - we checked the permissions, but maybe they operate differently when you replace the windows shell?) If it is because needed resources are not loaded, does anyone have pointers on how to make sure my app loads them?
Perhaps you have file access occurring via a file dialog? This might explain a bit further. What is the minimum functionality needed to create Shell Replacement for Windows?
because you have stopped windows default running explorer.exe , your program can not get access to default xml directory therefore you should specify the complete path for example like below:
stream = File.Open(#"C:\x86\Debug\xml.xml", FileMode.OpenOrCreate);

Eclipse: choosing a default debugger for all new C projects

Whenever I start a new project, I have to go through setting up the debugger with Eclipse time and time again before I can use it. Isn't there a default setting for all new C projects I can change?
I'm not sure exactly what you mean by "setting up the debugger" (perhaps you can clarify), but under "Preferences -> Run/Debug -> Launching -> Default Launchers" you should be able to select your preferred launcher for different kind of launch modes. This can also be selected individually for each launch configuration.
Typically it is up to the toolchain and/or project to determine which debugger/launcher is suitable to use for that specific project, but I know there is a bug in CDT which prevents toolchains from properly specifying the default launcher to use.
I only use Eclipse for Java, so I can't give you an authoritative answer. But since no one else seems to be answering:
Java projects have a (more or less) hidden file in the project directory called .project and another one called .settings . I'm not sure if this would apply to the C environment as well, but it seems likely. You may want to look at the set of such "hidden" files for a well set up project and a virginal project side by side to find out which settings make the difference.
Given that information, you may be able to simply edit (perhaps with some assistance from a script you can write yourself) the file(s) in question to do the configuration textually without a lot of mouse clicking.