Whenever I start terminal on my Macbook Pro it is running a process. I have to use ctrl+C to kill it. If I close the window directly it warns me that following processs are running: login, bash, bash, perl5.12.
Any idea what might be going on here and how I get back to the normal state?
I personally had this issue a while ago. First check to see if it is from one of your profiles. Assuming you are using bash, we will look at your bash profile.
First, make sure the problem is actually stemming from your bash profile. Source the scrips as follows.
source ~/.bash_profile
source ~/.profile
If after running those you observe the same hanging problem where you have to cntrl+c, then you know what script has the problem.
The best way to remedy the situation is to comment out different parts of your script to figure out where the problem is. Backup your profile and then comment out half of your profile and do a
source ~/.bash_profile
and if it hangs or not will tell you what half the problem is on. Keep repeating this until you find the problem. It sounds longer than it actually is.
For some reasons I had to uninstall/reinstall homebrew on my MacBook Pro (OS X 10.9).
I wanted to reinstall swi-prolog via homebrew (like I did the first time). The installation process worked without any visible issue, but now every time in want to run swi-prolog in my terminal this message appears: "Abort trap: 6"
I have no clue of what that means. There is a lot of things about this message on the internet but I can't relate them with my issue.
Could you help me?
For some reason it seems that the symbolic link doesn't work correctly. In my version of swi-prolog I had to type the full path to get it to run correctly, for example:
/usr/local/Cellar/swi-prolog/6.4.1/bin/swipl
Remember to keep in mind that your version number could be different than what I have listed above.
This became extremely tedious however to remember when having to type it every time I wanted to use Prolog, so I was able to add it as an alias with this command:
alias prolog='/usr/local/Cellar/swi-prolog/6.4.1/bin/swipl'
From that point on in the current terminal session, I was able to open it by just typing:
prolog
This way is obviously much easier, however you need to remember to change the alias if the version also changes.
The command "prolog" can of course be exchanged with any command you wish to use.
Keep in mind, if you want this command to be more permanent (as in after you close the terminal window), you will need to also add the above alias command to the ~/.bash_profile file so it runs on startup.
Hope this helps!
if i am not mistaken, swi-prolog required x11 to run but now in mac 10.9, there were no x11 anymore instead of xQuartz.
i am not sure if this is the real problem now.
I am new to cygwin, since I usually use Linux. I had a quick question regarding it. From the xterm window of cywin, how do I create multiple terminal tabs, so that I can have multiple ssh (with X11 forwarding) sessions from the same window?
I tried googling this, but could not find any useful link for this problem.... I am sure there is some way to do this, just can't figure it out.
Thanks a lot for your help!
If you're already open to starting up X11, check out mrxvt. It does multiple tabs, and last I checked, it built smoothly under Cygwin.
There's also Terminator, which is a java terminal emulator... ISTR it doesn't require X11.
There are a few tutorials online (For example) having to do with configuring emacs to work with XCode, but they all seem to be for old versions, and I haven't found one that ties neatly to XCode 3.x + Emacs 23.1 in a way that I can unpack.
So, I'm running XCode 3.1.2 and the Mac Cocoa application build of Emacs 23.1. I have a passing familiarity with elisp, so modifying configurations doesn't scare me, particularly. I'd like to be editing my Objective-C code in Emacs, because the XCode editor is painful once you've used a real text editor (snark, snark).
What should I do to make this happen?
For Emacs.app you can adopt a cleaner approach, and it doesn't require you to change configurations (unless you don't like make-frame to be called when a file is opened from XCode, but it's very easy to change).
Well, the customization should be similar to the documentation you pointed to. With Emacs 23, the server/client code has changed just a little. Namely, you can start it with the [--daemon][1] option to have Emacs start a server in the background. Then, have XCode just call Emacs using [emacsclient][2]. There are options you can use with emacsclient to force a new frame (graphical window): -c, and you can even start it off with -a to ensure you get an emacs if you forgot to start it with --daemon.
It seems random: after some amount of time / usage of any console I use on Windows Vista, I lose the ability to use the command-line history (or command buffer, if you prefer...), and hitting the up or down arrow no longer does anything at all, meaning there are essentially 0 items available in the history.
I've seen this behavior in Cygwin, CMD, and PowerShell.
Sometimes this behavior applies to processes running inside the console - Python, MySQL client, etc.
Is this an inherent problem in Windows? A setting somewhere? Are there other consoles that don't have this problem?
ps - if you think this is non-programming related, please see other questions regarding programming tools, for instance, nearly anything tagged "eclipse" which deal with how to use the IDE rather than programming for it.
Two ways, I think.
1) Far Manager is a good choice for a shell. Even if you don't need it's all power (file/archive management, editor, huge number of plugins, macros), you can use it as a wrapper/executor for cmd, tcc, sh or any other program, shell or command processor.
For example
take 3 files from distrib (Far2 or Far3): far.exe, fareng.lng and (optionally) fareng.hlp
run "far.exe /w", press Ctrl+B Ctrl+O
type any command in command line: dir, set, notepad, putty, an so on...
History will be preserved between sessions, you may access it by Alt+F8 (press Ctrl+Alt+F to switch history into filter mode).
Far 2.0 stores history (and settings) in the registry.
Far 3.0 stores history in SQLite database, and may be portable.
Also, Far can autocomplete commands from history or files/paths from disk. And there is plugin (YAC) which can autocomplete from aliases and so on...
2) I have found recently interesting project: Clink - Bringing Bash's powerful command line editing to Microsoft Windows' cmd.exe
Powerful Bash-like line editing from GNU's Readline library. Read more on Readline's keyboard shortcuts.
Superior path completion (TAB).
Paste from clipboard (Ctrl-V).
Support for the completion of executables/commands, and environment variables.
Undo/Redo (Ctrl-_ or Ctrl-X, Ctrl-U)
Improved command line history.
Persists across sessions.
Searchable (Ctrl-R and Ctrl-S).
History expansion (e.g. !!, !, and !$).
Scriptable completion using Lua.
It seems a young but budding project, so I had created an option for use it in my Console Emulator.
There's a maximum size of history buffer in a windows "DOS box" -- Upper left icon, right click, select properties and you'll see the Command History has a buffer size of 50 by default.
Check your Scroll Lock key.
DOH! I hit mine by accident so that up and down arrow just scrolled the window.
In PowerShell you can control the maximum size of history via the MaximumHistoryCount automatic variable (default is 64)
PS > $MaximumHistoryCount
I have encountered this issue for years. Mostly with python used from the command line in a bash shell. After some experimentation today when this re-occurred for the 1000th time (more or less) I was able to fix the issue by setting the Command History for the shell to have buffer size of 999 and Number of Buffers to 999 (I picked the largest possible setting for each, it's possible any setting would have worked other than what I was prior, which was 50/50). To access the Command history, right click in in the upper left corner of the shell window, select Properties, then the Options tab. I'm not sure the ramifications of these settings to performance of the shell, but thus far nothing else seems affected and command line history is once again working for me in the same shell it previously wasn't working in. I realize this answer is similar to the answer by steve-gilham, but perhaps gives a bit more background.
Admittedly, my answer involves 1 experiment that worked.
All history in console is provided by Doskey. It also is always available for all character-based, interactive programs (such as program debuggers or file transfer programs), and maintains a command history buffer and macros for each program that it starts.
In DOS era, one can remember softwares that after execution cleared the history. I'm not sure they were bugs, expected behavior, or the mix of two. But some Doskey bugs were know as you can see in the end of this link.
I suggest anyone who get this problem to try Doskey command options and see if (s)he can correct it.
I've never experienced this, but I wonder if pressing the key combination ALT+F7, which clears command history according to DOSKEY /?, might be the cause.
If "suddenly" all history is gone, maybe a new cmd-shell starts?
Test:
C:\Users\Guest\>doskey /history
…long history…
C:\Users\Guest\>cmd
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Guest\>doskey /history
…no history…
C:\Users\Guest\>exit
C:\Users\Guest\>doskey /history
…old long history…
Of cause in this example you'l see the new cmd-Start but if you try out this:
doskey /history
…history list…
cmd echo /k
doskey /history
…no list !
You don't see
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
But a new CMD-Shell was started.
So "exit" may help in this case!
This happened to me when I'm in a Rez environment on Windows 10.
As per #user1769064 's answer above setting the buffers to 999 and restarting the shell with a new environment the issue went away. There's probably a lower number than 999 with which it works as well, but haven't tried it.
right-click on the top-left corner of the Windows Command Prompt on the C:\ icon.
Choose Properties
In the Options tab, find Command History setting
Change the Buffer size to 999
Close the terminal and relaunch it again