Change the default value of the "Startup directory for new process" in the "Create new console" dialog - conemu

How do we change the default value for the Startup directory for new process? Out of the box the default is my user directory C:\Users\bigfo.
My current workaround is to change the {Bash::bash} task so that it overrides whatever is in the Create new console dialog. I do that like this:
set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pm:/mnt -new_console:d:C:\dev
What I would really like, though, is for the Create new console dialog to look like this:

conemu & cmder default startup locations:
there are actually two answers for this question depending on what you
really want to do. i will list both:
the global default startup path
for all tasks this is set at launch time from the cli or, more commonly, the
windows startup link from the start menu or taskbar. in either case,
you can edit this from the default, which is typically set to the install
folder.
if changing a start menu link, begin at the desktop, press oskey to bring
up the start menu. assuming cortana is active, you can simply search for
cmder by typing it out. if not, you will have to scroll down to find your
link to cmder or conemu.
right-click on the icon, select open file location from the context menu.
after windows explorer opens, the shortcut to the program will be
highlighted. right-click this shortcut and select properties from the context
menu.
note: it is possible that the application location rather than a
shortcut will be highlighted. if it is an application, right-click the
program and select pin to taskbar from the context menu. then skip down
to the part about setting the taskbar shortcut default folder.
it is also possible to select pin to start menu but this method requires
that you then navigate to
\programdata\microsoft\windows\start menu\programs\ and edit the
shortcut. otherwise, the process will be identical to the taskbar step.
the first page/general options in properties will have the path to the
program first, and the startup folder second. simply change the startup
location to your desired path (typically c:\users\<yourname>).
video of process:
The per-task method (override the global default):
NOTE: this is if you want a specific task or several specific tasks to open in
a place other than the global default.
If Cmder/ConEmu is not running, start it.
From within any terminal, press winkey+alt+p to open the settings.
In settings on the left side nested tree navigation locate to
Startup->Tasks.
Scroll down to find the task you wish to edit.
In the large edit box, place the input cursor at the end and press the
Startup dir... button to add the startup location CLI option to the
startup command for this task.
Navigate to the folder you wish to start the application in. If it's not
something you can navigate to, simply select any folder and edit it after
you're done in the launch command.
Video:

Related

How to make .i and .s file visible in a C project explorer?

What are the instructions written inside the makefile of a C project to make both the expanded source code file .i and the assembly source code .s visible in the project explorer in eclipse IDE ?
that depends on the compiler. for gcc it is -save-temps
Have you seen this site?
Instructions for Showing or hiding files in the Project Explorer view:
You can choose to hide system files or generated class files in one of
the navigation views. (System files are those that have only a file
extension but no file name, for example .classpath.)
On the toolbar for the Project Explorer, click the Menu button Menu button to open the drop-down menu of display options.
Select Customize View..,.
In the dialog box that opens, select the Filters tab and then select the checkboxes for the types of files that you want to hide.
In addition, you can restrict the displayed files to a working set.
On the toolbar for the Project Explorer, click the Menu button Menu button to open the drop-down menu of display options.
Choose Select Working Set...
Select an existing working set from the list or create a new one by selecting New...
Related concepts
And there is also Searching for Files:
Searching for files
The Go To > Resource action in the Navigate menu allows you to quickly
find a resource in the Workbench by searching resource names.
You can also do more complex searches for files in the Workbench. For
example, to find all files that end with .xml:
On the main toolbar, click the command link Search button Search icon.
Type *.xml into the File name patterns field and leave the Containing text field empty.
(You can use the pull-down list to select *.xml if it had been previously entered.)
Finish entering your search options, for example to scope the search to specified working sets, and click Search.
The Search view displays the results of your search. Right-click on any item in the Search view to open a pop-up menu that allows you
to remove items from the list, copy search results to the clipboard,
or rerun the search. To open one of the listed files, double-click it
or select Go to File from its pop-up menu.
If you close the Search view, you can return to it later by selecting
command link Window > Show View > Other... > General > Search.
(Replace *.xml with or *.i or *.s)

Codenameone new Gui Builder can't add components

I started using the CN1 new Guibuilder for the first time today and can't fathom out how to add components. I have watched and read the tutorials but my system isn't behaving the same.
I create a new CN1 project and the 'Form' guibuilder class, right mouse click > Guibuilder > the builder IDE opens fine and looks visually correct. On the right hand side panel i select any component, eg. Label, and as i am dragging onto the canvas it looks as per the tutorial - the handles and height/widths properties visible - see .
I release the mouse button and it leave a grey box
If i click on the grey box (or try to add any component) it disappears
Wierdly if i click and drag and at the same time click the PrintScreen button, the label sometime stays on the canvas with the handles and i can see its properties panel, but when i try and change a property, the Label vanishes.
Basically if i try and change anything in the builder, including clicking one the Layouts (bottom left panel) for the GuiForm then the builder seemingly rebuilds itself and collapses and hides anything i have open - resetting itself back to when it was first opened. It's like its in a read-only mode.
Is there a log i can look at? I am not getting any error in my console. Eclipse is running normally in all other areas.
I'm on the latest JRE and Eclipse Neon.3 and latest CN1 updates.
EDIT 12/11/17
The name value in the guibuilder.input is empty:
`<?xml version="1.0" encoding="UTF-8"?>
<con name="" formName="GuiForm" file="file:/C:/VersionControl/sandpit/GuiBuilderTest1/res/guibuilder/com/thinksmart/guibuilder2/GuiForm.gui" javaFile="file:/C:/WINDOWS/system32/GuiBuilderTest1/src/com/thinksmart/guibuilder2/GuiForm.java" resFile="file:/C:/VersionControl/sandpit/GuiBuilderTest1/src/theme.res" outputFile="file:/C:/Users/William/CN1_Home/.guiBuilder/3979cc5c-798a-41b4-9bda-d7824141986a.ouput" running="file:/C:/Users/William/CN1_Home/.guiBuilder/3979cc5c-798a-41b4-9bda-d7824141986a" />`
The GuiBuilderTest1/codenameone_settings.properties file for this brand new project is:
`codename1.vendor=CodenameOne
codename1.displayName=GuiBuilderTest1
codename1.icon=icon.png
codename1.arg.java.version=8
codename1.languageLevel=5
codename1.secondaryTitle=GuiBuilderTest1
codename1.version=1.0
codename1.mainName=MyApplication
codename1.ios.certificatePassword=
codename1.arg.ios.newStorageLocation=true
codename1.rim.signtoolDb=
codename1.ios.certificate=
codename1.j2me.nativeTheme=nativej2me.res
codename1.android.keystorePassword=
codename1.rim.signtoolCsk=
codename1.android.keystore=
codename1.android.keystoreAlias=
codename1.rim.certificatePassword=
codename1.ios.provision=
codename1.packageName=com.thinksmart.guibuilder2`
The CN1Log file also has the name attribute as ''.
I think I've been looking at this in the wrong direction. I think the problem isn't a permission problem but a naming problem. It seems that the project name is blank for some reason which I didn't think would be an option but I guess it is.
The project name should come from codename1.displayName in codenameone_settings.properties. I'll add a fix for this to work with "UnnamedProject" for version 3.81.

mvwaddstr() causes false positive with McAfee

I've been writing a C Curses application with PDCurses. It was compiling and running fine, but when I added some code to draw a string in a window, McAfee quarantines my compiled .exe as a trojan. Here is the line that causes the false positive:
mvwaddstr(window, 1, 1, "a string");
With this line commented, McAfee doesn't detect it as a trojan. With this line active, it does. It detects it as the trojan GenericRXAM-FG!752E40763FE4. Googling this gave me no results. Why is this happening? Is there a way I can have McAfee not quarantine this file?
this is not universal, it depends on the mcafee version you are using, there are many, entreprise, security etc, menus are different...
bu to generalise, hope is the good version: 1.
Type “VirusScan Console” at the Start screen and press “Enter.”
2.
Right-click “On-Access Scanner” listed in the left window pane and select “Properties.”
3.
Click “All Processes, Detection, Exclusions” and select the “Exclusions” tab.
4.
Click the “Add” button, click “Browse” and select the folder or file you want to add as an exception.
5.
Click “OK” in the “Add Exclusions Item” dialog box and click “OK” in the “Set Exclusions” prompt.
6.
Click “Apply” in the “On-Demand Scan Properties” window and click “OK” to save your settings.
yes, you can create an exception to not scan that file into mcafee
just add the path to it, depends on which version of mcafee but to generalise something like :
1. Type “VirusScan Console” at the Start screen and press “Enter.” 2. Right-click “On-Access Scanner” listed in the left window pane and select “Properties.” 3. Click “All Processes, Detection, Exclusions” and select the “Exclusions” tab. 4. Click the “Add” button, click “Browse” and select the folder or file you want to add as an exception. 5. Click “OK” in the “Add Exclusions Item” dialog box and click “OK” in the “Set Exclusions” prompt. 6. Click “Apply” in the “On-Demand Scan Properties” window and click “OK” to save your settings.

How to modify Centos 5.5 default open command

In Centos 5.5, each time I double click a file named "*.pl" in File Browser, it open a new emacs editor instance.
I want Emacs to run in a single instance way, so I need to modify the open command to "emacsclient %f", but I don't know where and how to modify the configuration.
Easiest way to do this is:
1. Find a .pl file on your desktop or in the File Browser (nautilus)
2. Right click it, select Properties
3. Pick "Open With" tab
4. If you don't see emacsclient, press the add button
a. Can check the list in Add Application dialog for emacsclient
I) If absent, click Use a custom command and browse or enter the path
to the emacsclient executable (mine is at /usr/local/bin/emacsclient).
b. Select emacsclient in the list
c. Press the Add button
5. Make sure the radiobutton is selected for emacsclient in the "Open With"
dialog
6. Press the close button.

Powershell: How to open a file from a separate window

I'm using PowerShell for about a week now. I am able to open a specific URL and fill in my username and password automatically. I can also navigate to a certain page where multiple files can be found to download.
I use the following command to select a certain file to download:
$ie.navigate2('http://www.example.com/resource.aspx?ResourceID=GetDocStoreFile&EntryID=1234')
What happens next is that a second window will open, named "file download". There are three buttons: open, save and close.
I don't want to press the "open" button manually, but would like the script to do that for me and then goes back to the original window to select another file. Any suggestions?
If you use a download URL, I don't think you can interact directly with IE using the COM object, because there's no document. Once the dialog box opens, all of the object's properties become null. You can use the method I posted here: How to perform keystroke inside powershell? AppActivate will work to activate a dialog box by title.
The % represents the the ALT key, so if the underlined letter of the button you want to click is O, you'd invoke SendKeys like this:
$wshell.SendKeys('%O')

Resources