After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 478318 - gdmthemetester : eval: 1: Syntax error: "(" unexpected
gdmthemetester : eval: 1: Syntax error: "(" unexpected
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.20.x
Other All
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
: 478322 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-09-19 11:39 UTC by Stemp
Modified: 2007-09-21 23:41 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
patch to fix the problem. (1.12 KB, patch)
2007-09-21 23:40 UTC, Brian Cameron
none Details | Review

Description Stemp 2007-09-19 11:39:29 UTC
Please describe the problem:
stemp@caderousse:~/gdm$ gdmthemetester xdmcp Blubuntu-List

GDM Theme Tester

Be sure to test all the environments:
 console, console-timed, flexi, remote-flexi, xdmcp
Also be sure to test using caps lock

eval: 1: Syntax error: "(" unexpected

/usr/bin/gdmthemetester (line 94 to 99) :

if [ "x$XNESTSIZE" = x ] ; then
  eval `gdmXnest -b`
else
  eval `gdmXnest -b -o "-geometry $XNESTSIZE"`
fi

Steps to reproduce:
1. gdmthemetester xdmcp Blubuntu-List
2. 
3. 


Actual results:
eval: 1: Syntax error: "(" unexpected

Expected results:
launch the gdm login test

Does this happen every time?
yes

Other information:
/usr/bin/gdmthemetester (line 94 to 99) :

if [ "x$XNESTSIZE" = x ] ; then
  eval `gdmXnest -b`
else
  eval `gdmXnest -b -o "-geometry $XNESTSIZE"`
fi
Comment 1 Stemp 2007-09-19 12:09:26 UTC
*** Bug 478322 has been marked as a duplicate of this bug. ***
Comment 2 Brian Cameron 2007-09-19 18:16:26 UTC
It isn't clear to me what the problem is here.  I don't see any unexpected "(" characters or other invalid things in the eval lines you highlight.  Could you explain how the eval should be constructed so it works on your system.  This might be an OS specific problem, since eval depends on how /bin/sh works on your system.

Does it work with other themes, or does it just fail with the theme you are testing with?
Comment 3 Stemp 2007-09-19 18:44:19 UTC
System : Ubuntu Gutsy - 2.6.22-11-generic

It fail with all themes, in fact I don't even thinks it's important :
$ gdmthemetester xdmcp foo
give me the same error.

The problem seems to be the ` character. 
Maybe a LOCALE problem, and so not related to gdmthemetester.

Comment 4 Brian Cameron 2007-09-19 19:51:48 UTC
In a shell script, when you have a command surrounded by ` characters, this simply means to run the command.  The eval command causes the program the follows the eval to be run.  Whatever output it generates will get executed.

Can you tell me which command of the following two gets executed?  You could add some "echo" calls to the command to figure this out:

if [ "x$XNESTSIZE" = x ] ; then
  echo "command 1"
  eval `gdmXnest -b`
else
  echo "command 2 $XNESTSIZE"
  eval `gdmXnest -b -o "-geometry $XNESTSIZE"`
fi

Then you will know which command is being executed and what XNESTSIZE is set to if you are using "command 2".
 
Once you know this, try running the gdmXnest command

If you are using case 1, run this command:
 
   gdmXnest -b

If you are using case 2, runt his command:

  gdmXnest -b -o "-geometry (whatever value is returned for $XNESTSIZE)"

And let me know what you see echoed back to the terminal.  I'm guessing the eval is failing because the gdmXnest command isn't working as expected.


Comment 5 Stemp 2007-09-19 20:08:47 UTC
Here is the result :

stemp@caderousse:~/gdm$   gdmXnest -b -o "-geometry 1024x768"
** (gdmXnest:3134): DEBUG: Sending command: 'VERSION'
** (gdmXnest:3134): DEBUG:   Got response: 'GDM 2.20.0'
** (gdmXnest:3134): DEBUG: Sending command: 'GET_CONFIG xdmcp/Enable :0.0'
** (gdmXnest:3134): DEBUG:   Got response: 'OK true'
** (gdmXnest:3134): DEBUG: Sending command: 'GET_CONFIG xdmcp/HonorIndirect :0.0'
** (gdmXnest:3134): DEBUG:   Got response: 'OK true'
** (gdmXnest:3134): DEBUG: Sending command: 'GET_CONFIG daemon/Xnest :0.0'
** (gdmXnest:3134): DEBUG:   Got response: 'OK /usr/share/gdm/gdmXnestWrapper -br -audit 0'
** (gdmXnest:3134): DEBUG: Sending command: 'CLOSE'
DISPLAY=:20
stemp@caderousse:~/gdm$ 
Comment 6 Brian Cameron 2007-09-19 20:13:56 UTC
It looks like you have debug turned on, which is causing the debug statements (including the offending "(" character) to appear in the output.  Does it work better if you turn off debug?   Try running gdmsetup and make sure "enable debug messages" is not checked on the security tab.  You really shouldn't run GDM with debug turned on since it will cause your syslog to get a lot of unnecessary messages and waste your disk space.

If you don't have debug turned on, then the problem perhaps is that GDM has a bug and is turning on debug for the gdmXnest command even when it isn't on?
Comment 7 Stemp 2007-09-19 20:28:26 UTC
The debug option is off in gdmsetup.
And noting in dmesg or /var/log/syslog or messages.
except :
stemp@caderousse:/var/log$ cat syslog | grep gdm
Sep 19 11:18:08 localhost gdm[5372]: WARNING: bind: Adresse déjà utilisée 
Sep 19 11:18:08 localhost gdm[5372]: WARNING: bind: Adresse déjà utilisée 
Sep 19 11:18:08 localhost gdm[5372]: WARNING: Could not create socket! 

but it was this morning
Comment 8 Brian Cameron 2007-09-19 21:32:25 UTC
Yes, there seems to be a bug with gdmXnest that causes it to print debug messages even when debug is not enabled in the configuration file.  This should be fixed, then the problem reported would go away.
Comment 9 Stemp 2007-09-19 21:42:34 UTC
Great news, thanks a lot for your help.
Comment 10 Brian Cameron 2007-09-21 23:40:33 UTC
Created attachment 95996 [details] [review]
patch to fix the problem.
Comment 11 Brian Cameron 2007-09-21 23:41:17 UTC
I think this patch, which is now upstream and in the 2.20 branch, should fix your problem.  If you could test and verify, that would be great.

Basically, just needed to turn off debugging in gdmXnestchooser.  I noticed gdmsetup had the same problem, so the patch also fixes that.