I'm doing a fair bit of work in Ruby recently, and using
ruby script/console
Is absolutely critical. However, I'm really disappointed with the default Windows console in Vista, especially in that there's a really annoying bug where moving the cursor back when at the bottom of the screen irregularly causes it to jump back. Anyone have a decent console app they use in Windows?
I use Console2.
I like the tabbed interface and that copy works properly if text breaks at the end of a line.
Are you resizing the console window? I've found that the ruby scripts (irb, etc) that use the readline library don't work correctly with resized console windows (in XP or Vista).
Effectively I believe that the readline library expects the console window to be 80 characters wide, anything else and it goes bezerk. So far I haven't found a way to fix it on windows without giving up other nice features.
I have had some pleasant experiences with rxvt (comes with cygwin, does not need an x server running). Putty is also often mentioned as a good alternative.
You could also try to get xterm working :)
Powershell
Windows PowerShell is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on top of, and integrated with the .NET Framework. PowerShell provides full access to COM and WMI, enabling administrators to perform administrative tasks on both local and remote Windows systems.
Related
Recently switched to new windows terminal, and after hours of searching on internet I was not able to find anything helpful, all what I want is to set up cmd inside new windows terminal to show git branches just like it's achievable for powershell.
eg like this
I have been very comfortable with cmd especially with its ability to use additional linux commands and don't wanna switch to powershell only because of nice displays of git branches. this is a source where everything is nicely explained for powershell, all I want is to do the same for CMD.
thanks in advance
In order to use Oh My Posh for shell-prompt customization from cmd.exe, the legacy Windows shell (citing from the docs (tab cmd)):
There's no out of the box support for Windows CMD when it comes to custom prompts. There is however a way to do it using Clink, which at the same time supercharges your cmd experience. Follow the installation instructions and make sure you select autostart.
As you later discovered, this issue on GitHub has background information on why native cmd.exe support isn't possible (even though Oh My Posh is generally shell-agnostic) and why third-party software is needed to make it work.
As for your comments re preferring cmd.exe:
I have been very comfortable with cmd
Migrating from the shell one is used to a new one is undoubtedly a painful transition, but well worth considering in this case:
While not without its quirks, PowerShell is vastly superior in just about every respect to cmd.exe, and enables you to do things you simply cannot do in cmd.exe
its ability to use additional linux commands
Linux (WSL) commands called from the Windows side are all mediated via executables (notably wsl.exe and bash.exe), which you can equally call from PowerShell.
This has previously been asked (2001) but without a solution.
http://forums.techguy.org/windows-xp/58217-exclusive-shell-applications.html
In BPM Studio you have the option to run the software as an "Exclusive Shell Application". Immediately after logging into Windows, BPM Studio appears and nothing else Windows-related (taskbar, desktop icons etc) loads. On exiting BPM, the user is returned to the Windows login screen.
Does anyone know how this is achieved? I want to do something similar for some software i'm working on. I've done a lot of research and can't find any leads!
Thanks
The key in the registry is called:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -> Shell
which should be set to explorer.exe. BPM Studio probably changed this key.
This sounds very much like a custom shell.
All the MSDN documentation that I could find seems to concentrate on embedded versions of Windows where replacing the shell is clearly very common. However, I believe that the principles are much the same for desktop Windows.
I have a flash drive which has an application whose code is written VC++ 2008 , the application works fine in xp , but the problem arises when i plug in the drive to a windows 7 machine , it doesn't run properly. is there any way that i can make it compatible to windows by writing a code.
i dont want to set the compatibility tab in windows 7 to run the program..
i want to code it in the program , more like a patch.
You can use the Microsoft Application Compatibility Toolkit, which will tell you exactly which Windows XP compatibility shims are used by your code when you run your application under Windows XP mode.
You simply run your application and disable various shims until your code once again behaves incorrectly. The last shim you disabled is the cause of the incorrect behavior. You can then research the exact consequences of each shim as well as exactly what your code will have to do to fix the bugs it has that force it to run in Windows XP Compatibility Mode.
You probably need to add an Application Manifest to your application to request the appropriate security permissions to allow your application to do what it needs to do.
This may cause a UAC prompt to be shown to the user if elevated permissions are needed, but then your code will be allowed to do whatever Windows 7 is currently blocking.
If you know that the problem exists and know that UAC / etc ... / Manifest on Win7 don't solve your problem and that it's not connected with 32/64 bit issues, try a different approach.
I guess you know what goes wrong with your app on Windows 7. If you're not sure exactly, at least you should know where (in which logical block) your problem is located (e.g IO block, Disk read/write block, Gui, etc.
Now stick to the debugger. Hope your program isn't that big that you can't analyze it and find the source of your problem. You could have your problems because of some functions working not as expected or something like that.
Then, I guess, you could rethink / remanage your code and change it the way it works on both platform. If there is no universal solution, use #ifdefs to determine your current platform (the worst case actually, because you would have to have different binary files for different windows versions).
My application needs administrative access and I want it to run without any hassles in Windows 7.
I have the following options
1.Ask the user using the application to turn off UAC. This is a last resort option and would hate to do that.
2.Embed a manifest in the application that says elevate to adminstrator privelege. This will work but it seems that it will bring up a dialog requiring users consent every time a user runs the application.
3. Configure the application to run in Windows XP compatibility mode. This works, but i had to do this using explorer->application properties. if can I do this programmatically during installation time, I would really prefer this option. My question is if there is any way to achieve this.
regards
Ganesh
Try making an application compatibility shim that says your app needs the XP compatibility mode, and distributing it with your app. A shim is a means for administrators to simplify installation of a 3rd party app that needs compatibility settings - it saves them tweaking each PC individually. You can probably roll it into your install program with a little ingenuity.
I've gotten pretty used to dealing with the UAC dialog, running Vista for the last 2 years. If it bugs you, I have to wonder how much experience you have using post-XP OS'es.
As a user I think there are two ways to look at it:
The program inherently requires admin. For these, I very much appreciate the dialog, as I know it means nobody's going to sneakily run that thing in the background on me and modify my system.
The program inherently does not require admin. Most programs only need admin to auto-update themselves (and probably shouldn't need it then). My attitude is that these programs are poorly-designed. Such a program should only invoke AUC if it discovers it needs to update, not every single frigging time I start it up. This is a security issue too, as any buffer overflow someone finds in the entire program puts me at risk.
Localize the need for UAC as much as you possibly can. The best would be to put in a separate executable. (eg: an "updater")
I've found a few (unfortunately, they are bookmarked at home and I'm at work, so no links), but I was wondering if anyone had any opinions about any of them (love it, hate it, whatever) so I could make a good decision. I think I'm going to use Cygwin for my Unix commands on Windows, but I'm not sure how well that's going to work, so I would love for alternatives and I'm sure there are people out there interested in this who aren't running Cygwin.
These work very well for me: http://unxutils.sourceforge.net/.
Cygwin is not so good on Vista or 64 bit, so I stopped using it a while back.
I use Cygwin, but I have used the Berkley Utilities in the past. They worked well enough, if you are used to DOS and you just want the commands. There are some alternatives listed at TinyApps.
Maybe you could also consider running a command line version of Linux in a virtual machine? Colinux is also an option, but it's immature.
Powershell is what you are looking for, it contains aliases for a lot of UNIX commands and a lot more besides.
John
UnxUtils isn't updated as often and isn't as complete as Cygwin but runs natively just like any other Windows command line utility.
Cygwin acts more like a Linux command line emulator. It does feel pretty clunky but it is easier to port utilities to it and this is more complete than UnxUtils.
I personally don't like Cygwin. It really does seem to be wanting. Unless it has some specific tool you want that only works in Cygwin I'd find native ports.
http://www.activestate.com/Products/activeperl/index.mhtml is a nice Perl package for Windows.
http://www.locate32.net/ - I've always liked locate. Much faster than Grep for finding files by name.
Microsoft distributes a UNIX API compatibility layer for Windows NT-based OSes, as well as many common UNIX command line utilities that run on top of this compatibility layer. Unlike Cygwin, it doesn't sit on top of the Win32 subsystem, but instead interfaces with the NT native APIs directly. It supports features that may be difficult to implement on top of Win32, such as case-sensitive filenames and fork().
The Windows 2K/XP version is called Windows Services for UNIX (SFU). SFU is a free download from Microsoft, and also includes an NFS server and client.
The Windows Vista version is called Subsystem for UNIX-based Applications (SUA). SUA is included in the Enterprise and Ultimate editions of Windows Vista, but does not include any NFS support.
Neither SFU nor SUA include an X server. It is possible (but possibly ironic?) to use the free Cygwin X server with SFU/SUA applications.
The Wikipedia entries on SFU and Interix have more details and history.
Linux/BSD :)
Why vote down this question? It's obviously meant to be tongue in cheek is it worth the voter and the receiver losing rep over? Can't you people leave anything at zero and mark up the answers you want to see float rather than mark down the funny one liners?
In answer to the question I've used Cygwin in the past but always found it clunky and wanting. I don't think it's the tools problem but mine but I have book marked Eric's suggestion of unxutils for when my new windows machine arrives tomorrow.
I use Cygwin alot.
I use it for any mvn commands, find, grep, perl scp and all the other stuff i got used to use all the years I only worked on FreeBSD desktops and servers.
I have my old .vimrc, .zshrc, my .ssh/config and all the other nice stuff. I use rxvt.exe instead of cmd.exe which made all the difference for me! Resize, decent buffer, fonts and so on.
andLinux is a distribution of coLinux, which runs the entire Linux kernel inside Windows (with better performance than a VM). Then, with the help of Xming (an X windows server for Windows), you can have Linux windows mingle along side Windows windows.
With that, pretty much everything Linux-based will just work. You're not limited to just the tools that have been ported to Cygwin, you can apt-get anything you want.
andLinux also includes a few niceties, such as desktop shortcuts to launch Linux apps, a launcher that lives in your tray, and context menu items (right click a text file and you can open it in Kate)
The downsides of andLinux are:
Accessing the Linux filesystem is tricky. You have to set up Samba in both directions.
Connecting to a Linux program from a remote connection is also tricky (but possible)