Why I can't open the cmd window on my Win10? - windows-10

When I press Windows+R and input cmd to open the command line, the cmd window doesn't appear, only the cmd icon appears on the taskbar.
How can I fix it?

Once you have opened it, you might type ALT+SPACE. This shortcut opens the menu for minimising and maximising but also for moving a window. It is possible that your command window is somewhere present on another second screen (which is not there anymore, but Windows seems not to realise that), so using that shortcut you can move your window till you see it again.

Related

Sublime Text 3 - split windows at launch

Running Windows and Sublime Text (3.1.1 Build 3176) for the last few days, every time I launch the editor it starts with one window split into two panes. This happens whether I
launch from a command prompt with 'subl';
launch form the window menu; or
select a file from the file manager and edit it
It never remembers that I have set it back to a single pane with Alt-Shift 1. I cannot find a setting to change this behaviour.
Help pls

Linux terminal SCREEN command

I want to open a new terminal to execute a script file again. I need to open a new terminal and execute one more script.
I give a try with SCREEN command but it does work for only the first terminal.
You shouldn't open a new screen inside a screen. If you need another terminal inside the screen press "CTRL+a" and then "c".
This should open a new terminal. You can swap between terminals by "CTRL+a" followed by "a".
If you open more than two terminals inside the screen you can open an overview with "CTRL+a and then SHIFT+2"
If your done detatch the screen by pressing "CTRL+a then d". Reopen a screen with "screen -x (+ screen-id if you have multiple screens detatched)"

Sublime - Close file without saving

This has been bothering me for ages.
In Sublime, I know cmd+W will close a file but how do I toggle to the "Don't Save" option if I just want to close a file without saving?
Press cmd-'d' (the d stands for for Don't)
For mac, try:
quit the application (CMD + q)
remove the local sublime session with:
rm ~/Library/Application\ Support/Sublime\ Text\ 3/Local/Session.sublime_session
restart Sublime
It seems to me that the accepted answer doesn't quite address the question, but provides a workaround.
Consider the following excellent answer, which allows closing a file without the dialogue being displayed: https://superuser.com/a/1188135/73736.
In addition to the accepted answer / workaround, the default MacOS shortcut cmd+delete works fine in the dialogue!
Alternatively, if you have System Prefs > Keyboard > Shortcuts: Full Keyboard Access "All controls" selected, then "Don't Save" will be have an outline around it, and can be selected by hitting space, whilst enter triggers "Save".
A hack would be to press 'close other tabs' and click continuously on 'Close without Saving' as mouse pointer will always be at same location.
Will take some seconds.
Ubuntu Users:
In short: Ctrl+W > Alt (hold for 1s) > W
Longer version: Ctrl+W will attempt to close the file and brings up this prompt when file has unsaved changes.
In order to Close Without Saving just tap and hold the Alt key for a second, underlines appear on one character of all 3 options and hit W to close without saving. Other options can be accessed with C and S as in screenshot.

GitBash duplicate taskbar icon

I've just re-installed Git on my Win10 PC and tried to pin Git Bash to my taskbar.
For some reason now, when I open Bash from my taskbar shortcut, it displays duplicate icon on the taskbar. I tried to pin that icon but once I end the terminal session, that shortcut is deleted. I've tried multiple Win10 sites but most just say to repin the new icon.
Prior to updating I could pin it fine with no issues.
I did this for Windows 7:
Make sure there was no other (older) Git Bash appearing in Start Menu
Remove any existing pinned Git Bash from Taskbar
Launch Git Bash
Pin this launched window to Taskbar (instead of the one appearing in Start Menu)
In my case, launching git-bash.exe and pinning the result produced a shortcut to cmd.exe with no arguments, which just opened a regular command window. Creating a shortcut to git-bash.exe directly (either manually, or by pinning the existing Start Menu shortcut) caused the opened window to be separate from the pinned item.
What worked in my case (more manual):
Create a shortcut to this command: %windir%\system32\cmd.exe /c "C:\Program Files\Git\bin\bash.exe" --login
(Optional) "Change Icon...", then select the git-bash.exe location (one directory up from bash.exe), and click the icon selection area for the icon to show up and to select it.
Update the "Start in" value to %HOMEDRIVE%%HOMEPATH%
Pinning the git-bash.exe fixed the problem for me. This also fixed the problem with broken icon graphic.
NOTE! This was on Windows 7 - haven't tested on Win10!
Open Windows Explorer.
Navigate to C:\Program Files\Git.
Right click git-bash.exe, select Pin to Taskbar.
Shift-right click the newly pinned icon, select Properties.
Add to the end of the field Target: --cd-to-home
Set the value of the field Start in: %HOMEDRIVE%%HOMEPATH%
Press OK.
NOTE! This was on Windows 10
I don't know how it works but open the git-bash.exe file and pin the opened file on the taskbar
Do not pin the program which is not opened or else it wont work
None of the other solutions worked for me so here's what I did on Windows 10:
Open Windows Explorer
Navigate to C:\Program Files\Git
Right click on git-bash.exe
Right click on it and select Pin to Taskbar. This creates the first taskbar item.
Run git bash by clicking on the taskbar item. This creates the second taskbar item.
Pin the second taskbar item.
Open the properties (right click on the icon -> right click on the app name -> properties) of the second taskbar item and fix them:
Set Target to "C:\Program Files\Git\git-bash.exe" --cd-to-home
Set Start in to %HOMEDRIVE%%HOMEPATH%
Change the icon... Go to C:\Program Files\Git\ and select git-bash.exe and the icon.
Close the properties window and unpin the first taskbar item.
I have faced this problem. Here is a tried and tested solution. Very easy. Out of the 2 icons that you see, right-click on the inactive icon and do Unpin from taskbar. Then click on the active icon and do Pin to taskbar.
It's easy for Windows 10.
Open Windows Explorer
Navigate to C:\Program Files\Git
Select git bash
Select the 'Manage' option which appears under the field in purple 'Application Tools'
Select the 'Pin to Taskbar' option which shows on the far left

Execute batch-file from browser

i have got a batch-File. I mostly have to execute it when i'm in my browser (Firefox).
So i dont want to go to the directory and execute it. I want to have something in my browser.
First i thought about making a firefox-add-on. Something like a button, which executes my batch-file. But I failed.
Then i made a bookmark to the file, but it only shows me the content of the batch-file.
Is there any other option to execute a batch-file from the browser?
EDIT: I have found an add-on that creates an button to execute files:
https://addons.mozilla.org/de/firefox/addon/external-application-button/
I don't know a way you can run this from a browser, but perhaps you don't need to. I'd create a global keyboard shortcut. You haven't mentioned your OS so I've assumed Windows.
Go to your desktop, right-click and select New > Shortcut.
Browse to your .bat file.
Name the shortcut whatever you like - probably best to use yourfile.bat shortcut or similar.
Right-click your newly-created shortcut and select Properties.
On the Shortcut tab, click into the Shortcut key area.
Press Ctrl+Alt+B. I've used B for bat - you can use what you like, although some shortcuts may be used already in your browser - test and adjust if necessary.
Click OK - you're good to go!

Resources