Getting error while launching IDLE from cygwin? - cygwin

I cannot launch IDLE from cygwin for some reason. When I try to open one of my python files using idle, I do the following:
idle file_name.py
and I get the following error:
-sh: idle: command not found
Any ideas why this is happening? For me the same thing happens in git bash, but perhaps it is the same problem?

Related

'xfdesktop' commands returning error in terminal

When running a Python script to automatically change the background on my Xfce install of Manjaro Linux, occasionally the script will throw the following error:
** (xfdesktop:13267): CRITICAL **: 16:18:15.893: xfdesktop: already running, quitting.
I've narrowed down the cause of the error to the xfdesktop --reload command in the following line of the script:
subprocess.Popen(['xfdesktop --reload'], shell=True)
Running the same command outside of the script in a normal terminal gives the same behavior; it'll work a few times and then throw the above mentioned error. The error is also thrown for any other xfdesktop commands (except for xfdesktop -V)
Manually killing the xfdesktop process in htop allows the command to work several more times, but the error will inevitably be thrown again after a few minutes.
I am running Manjaro 18.0.2. Here's the output of xfdesktop -V:
This is xfdesktop version 4.13.2git-UNKNOWN, running on Xfce 4.13.
Built with GTK+ 3.24.2, linked with GTK+ 3.24.2.
Build options:
Desktop Menu: enabled
Desktop Icons: enabled
Desktop File Icons: enabled
Does anyone have any reason why xfdesktop is behaving this way and what I can do to stop it from throwing those errors?

ess-mode fails to start s-plus process correctly

When trying to start S-plus 6.2.1 for linux using Emacs 25.2.1 lucid and ess-17.11.2 under Elementary OS 5.0 (based on Ubuntu 18.04 LTS), I get the following error:
ess-command: Wrong number of arguments: #[(com &optional buf sleep) "Á!" [com ess-eval-linewise] 2
("/usr/share/emacs25/site-lisp/ess/ess-dde.elc" . 4843)], 7
It seems that an S+ process is running, but when I try to issue a command, I get this error:
ess-get-process: No ESS process is associated with this buffer now
How do I fix it? I tried with ess-18.10, but got another error telling that it could not find the Splus program although it is in the PATH.

Error in using 'theano-nose' command

After installing Theano from Enthought Canopy on Windows, following the steps here: http://deeplearning.net/software/theano/install.html#id9 , I tried to execute the command theano-nose from Canopy terminal. I got an error message saying "unable to find theano-nose". Can someone tell me what might be going wrong?
theano-nose is from the command line. But your shell need to be able to find it.
It is highly possible it didn't got installed correctly on Windows or that you need to reboot or log out/log in. I do not remember Windows particularities on that level.
But a simple work around is to start python and run this:
import theano
theano.test()
This is equivalent for what you want to do.

Xvfb failed start error

I have Ubuntu 11.04
I am trying to install Xvfb and CutyCapt in order to take a snapshot of webpage
I followed a instruction https://github.com/jaequery/cutycapt-installer-script-on-ubuntu/blob/master/install
and I executed last line and it gives me an error
xvfb-run: error:Xvfb failed to start
Any solution for that?
Thank you in advance
I was getting this error "xvfb-run: error: Xvfb failed to start" on Ubuntu 14.04, where previously my script had run without problems on Ubuntu 12.04.
My scripts were running calling xvfb-run multiple times, but I was seeing fails due to the error "Server is already active for display 99"
It seemed that the Xvfb wasn't ending when the xvfb-run command returned.
My solution was to use "xvfb-run -a [mycommand]" so xvfb uses another display if 99 is in use.
Had the same issue, solved it by running this instead:
xvfb-run --auto-servernum --server-num=1 [your script]
--auto-servernum : Try to get a free server number, starting at 99, or the argument to --server-num
Run xvfb-run -e /dev/stdout [mycommand] as #wumpus suggested.
I received the server lock message:
Fatal server error:
Could not create server lock file: /tmp/.X99-lock
xvfb-run:
error: Xvfb failed to start
Using sudo resolved the issue for me:
sudo xvfb-run -e /dev/stdout [mycommand]
Found the problem There is hanging process in system with name
Xvfb
I killed it and work fine. I newer found it earlier beacuse I used to try to find process with 'xvfb' name
I came across this error when running a bash script on Mac OS. Opening XQuartz before running the script solved my problem.

Cygwin error: "-bash: fork: retry: Resource temporarily unavailable"

I recently reinstalled Cygwin on my computer in order to get access to several command line elements that I was missing. I have never had previous difficulty with Cygwin, but after this reinstallation, an error message continues to appear after (almost) each command entered. For instance:
-bash-4.1$ wc m1.txt
3 [main] bash 2216 child_info_fork::abort: data segment start: parent(0x26D000) != child(0x38D000)
-bash: fork: retry: Resource temporarily unavailable
2013930 4027950 74968256 m1.txt
Generally, the command still runs (as seen above), but not always. Occasionally, the 'error' message occurs several times in a row (the initial number "3" will then change to a "4" or "2", notably if I start a second Cygwin window.
Also, as soon as I start up Cygwin, I get the following message before the prompt:
3 [main] bash 6140 child_info_fork::abort: data segment start: parent(0x26D000) != child(0x36D000)
-bash: fork: retry: Resource temporarily unavailable
-bash: fork: Resource temporarily unavailable
-bash-4.1$
At the moment, I am debating whether to uninstall/reinstall Cygwin again or just live with the error messages, but I was curious if there might be an issue that I am unaware of.
(assuming Cygwin is installed at C:\Cygwin):
Open Task Manager and close any processes that look to be Cygwin related.
Open C:\Cygwin\bin in Windows Explorer
Verify that dash.exe, ash.exe, rebase.exe, and rebaseall exist in this folder
If any of them are missing, re-run Cygwin setup and select the dash, ash, and rebase packages
right-click your C:\Cygwin folder, uncheck Read-only (if its checked), and press OK.
When an error about not being able to switch some files comes up, select "Ignore All". Wait for this process to complete.
Browse to C:\Cygwin\bin in Windows Explorer
Right click dash.exe and click "Run as Administrator". A command Prompt should appear with nothing but a $
Type /usr/bin/rebaseall -v, hit enter, and wait for the process to complete.
If you get errors about Cygwin processes running, try Step 1 again. If that still doesn't work, Restart your computer into safe mode and try these steps again.
A commenter noted that, depending on your settings, you may have to type cd /usr/bin && ./rebaseall -v instead.
Try opening Cygwin again.
This process worked for me. I hope it works for you guys too.
Source: http://cygwin.wikia.com/wiki/Rebaseall
I would like to add the following to the above answers, as it is what I had to do after reinstalling Cygwin:
Navigate to the "/usr/bin" directory (usually, C:\cygwin\bin) and right click, Run as Administrator the file: dash.exe
Then, at the $ prompt type the following, hitting enter after each line:
cd /usr/bin/
/usr/bin/peflags * -d 1
/usr/bin/rebaseall -v
What it does is, it marks the dll's as "rebase-able," and then rebases them. You have to have peflags.exe in addition to the above files (in previous answers). You may have to restart windows after doing this and you will definitely need to make sure that there are no processes nor services belonging to cygwin running. (Use task manager, kill any related processes, and then under the services tab look for any service starting with CYG and stop it.)
After doing this, I was able to get cygwin to run without any errors about dll's being loaded to the wrong addresses aka fork errors, etc.
I hope that this helps others, as it was a pain to find.
SOURCE: http://www.cygwin.com/faq.html#faq.using.fixing-fork-failures
and the rebase README file.
To add on to other answers here, we ran into the same issue but could not run the rebase command from the ash or dash shell. However, when launching the command from the Windows cmd shell, the following worked.
cmd /c "C:\cygwin64\bin\ash.exe /usr/rebaseall -v"
-v is to get verbose output
I found another information here :
http://cygwin.com/ml/cygwin/2014-02/msg00531.html
You have to delete the database at
/etc/rebase.db* and do in a "ash" windows :
peflags * -d 1
rebaseall
It works for me on 2 servers.
I solved this problem by restarting my computer. Probably installed a driver update and kept using sleep instead of shutting down.
Experienced the same issue when loading Cygwin with cygiconv-2.dll forking and not loading successfully in the Cygwin terminal, but after turning off my AntiVirus (it was specifically Ad-aware), the issue resolved, and Cygwin worked properly.
In case you are using babun's Cygwin, after rebaseall, try launching Cygwin by executing .babun\cygwin\cygwin.bat in a Windows command prompt or Windows explorer.
This works for me (while launching babun's default console - mintty results in fork error).
I had the error on win10 and i was trying to rebase to c: before install.
then i saw that the installer was installing it instead to c:/Users/myuser
so i was coping all files from c:/Users/myuser to c:.badun
and then restart plus open badun.bat
not shure if this was wise its now duplicated XD... but then it worked again.
Rebaseing didn't help in my case. In addition to what other people suggested, I noticed that reducing the length of PATH environment variable fixed the issue for me (and for other people as well as can be seen from this answer).
This issue is intermittent in nature & I found this issue when there is network is too slow to connect to remote machine on AWS.... I have Shell script that runs through Gitbash shell & it connects to AWS EC2 instance with ssh..... Most of the time, it ran correctly but 2 out 100 times it get into this issue bash: fork: retry: Resource temporarily unavailable .... Killing the MSYS2 terminal from task manager helps to overcome with this issue....
Negative side is you need to run the scripts from the beginning...
I had the same issue on Windows 10 and the mobaxterm app (which uses cygwin) and I tried all of answers listed here however for me, the solution was to simply delete the "CryptoPro CSP" application.
I started facing this problem after upgrading to windows 10. As of now I do not see that any of the above method working.
What I am noticing is that if you start cygwin with admin right (right click and say "run as admin") then it works fine.
Or you open cmd as administrator and then launch cygwin from there, then also it runs fine.
Just reinstall cygwin and select TCL and activate EXPECT

Resources