ant uses wrong CWD in screen
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
screen (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
OS: Ubuntu 9.10
Ant: Apache Ant version 1.7.1 compiled on October 19 2009
Screen: Screen version 4.00.03jw4 (FAU) 2-May-06
Gnome: Gnome 2.28.1 Build Date: 11/03/2009
Bash: GNU bash, version 4.0.33(1)-release (x86_64-
It appears that screen loses track of the current working directory when a user logs out of Gnome. I have tried to trouble shoot this problem with the assistance of the IRC channel #screen without success (after consulting with #ubuntu-bugs).
The shortest example that I can create to repeatably produce this issue is as follows (the procedure has 14 steps):
1.On Ubuntu 9.10, log into Gnome
2.Open a Bash Terminal
3.Type “mkdir testdir”
4.Type “cd testdir”
5.Create a file called “build.xml” (This is an ant build file) with the following content:
<project basedir="." default="build" name="Test">
<property environment="env"/>
<property name="target" value="1.6"/>
<property name="source" value="1.6"/>
<target name="build"/>
</project>
6.From the terminal start “screen”
7.You should still be in the "testdir" directory. From here, run "ant". Ant's output should be something like:
Buildfile: build.xml
build:
BUILD SUCCESSFUL
Total time: 0 seconds
8.Detach the screen (i.e., Crtl – a d)
9.Type “exit” to close the terminal
10.Log out of Gnome
11.Log back into Gnome
12.Open a Bash Terminal
13.Type “screen -x” to re-attach the screen
14.Run “ant”. This is the point where the error is occurring! The output of ant is as follows:
BUILD FAILED
java.io.
at java.io.
at java.io.
at org.apache.
at org.apache.
at org.apache.
at org.apache.
at org.apache.
at org.apache.
at org.apache.
Total time: 0 seconds
Notice that ant cannot find the file “/testdir/
working directory (according to pwd) is "/home/
The oddity of this problem is that if you continue with the following after step 14, ant will work fine again:
15.cd ..
16.cd testdir
17.ant
As mentioned before, I have tried to troubleshoot this problem with the help of some friendly folks in IRC channel #screen.
We have looked at the following things/possible remedies:
1. My .bashrc file is the default file that comes with Ubuntu 9.10.
2. My .screenrc file is empty.
3. A comparison (diff) of the output of printenv before and after logging out of Gnome, shows no difference.
4. This problem only occurs when actually logging out of Gnome. If screen is detached and re-attached without logging out of Gnome, then this problem does not occur.
5. Changing the line “<project basedir="." default="build" name="Test">
” in build.xml to “<project basedir=
” still causes the same error.
6. Check that nothing “strange” is executed at Gnome logout (i.e., “/etc/gdm/
7. Placing “screen -bash” in .screenrc
Please let me know if I can provide any additional information.
The original problem description can be found at http://
ProblemType: Bug
Architecture: amd64
Date: Tue May 4 16:32:41 2010
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
NonfreeKernelMo
Package: screen 4.0.3-13ubuntu4
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: screen
Uname: Linux 2.6.31-21-generic x86_64
XsessionErrors:
(gnome-
(gnome-
(nautilus:14127): Eel-CRITICAL **: eel_preferences
(polkit-
(thunderbird-
Assigning this to ant for now.