Bug 117439

Summary: "graphics card and monitor" doesnt work in czech graphical yast
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Jakub Friedl <jfriedl>
Component: YaST2Assignee: Marcus Schaefer <ms>
Status: RESOLVED FIXED QA Contact: Klaus Kämpf <kkaempf>
Severity: Normal    
Priority: P5 - None CC: bryce2, mvidner, ray
Version: RC 4   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2log form the affected machine

Description Jakub Friedl 2005-09-16 09:42:34 UTC
In graphical yast and czech locale, "graphics card and monitor" doesnt launch sax2.
In text mode, or in a different locale, it does work.
Comment 1 Jakub Friedl 2005-09-16 10:03:08 UTC
it applies for all Sax2 modules
Comment 2 Martin Lasarsch 2005-09-16 10:04:30 UTC
please attach /var/log/YaST2/y2log 
Comment 3 Jakub Friedl 2005-09-16 10:32:43 UTC
Created attachment 50150 [details]
y2log form the affected machine
Comment 4 Jakub Friedl 2005-09-16 10:33:38 UTC
the log is attached above
Comment 5 Marcus Schaefer 2005-09-16 11:22:37 UTC
I called from a console: 
 
 LANG=cs_CZ sax2 
 
and it works 
 
 
Comment 6 Jakub Friedl 2005-09-16 11:46:35 UTC
But that is not the problem. You can launch sax2 from console directly or from
yast in console. You cannot launch it from yast GUI. Try this:

LANG=cs_CZ yast2

and than try to launch the graphic card module from within the yast2 window.
it won't work.
Comment 7 Marcus Schaefer 2005-09-16 13:10:41 UTC
I think this is not my fault, I don't what yast is doing wrong here  
Comment 8 Michael Gross 2005-09-19 09:13:07 UTC
I've tried this out with RC4. Sax2 is not being started when using the cs_CZ
locale. It runs directly from the shell, though. This must be a YaST-problem!
It's not likely a problem with the x11-module itself, rather than with the
base-system of YaST. I'll reassign it to visnov@suse.de.
Comment 9 Stanislav Visnovsky 2005-09-22 13:07:42 UTC
Marcus, sax2 complains about the runlevel (see the log). 
Comment 10 Marcus Schaefer 2005-09-28 09:34:44 UTC
The problem is the terminal. I will check for the runlevel only if 
we are running from a real terminal which means tty reports something 
like 
  
  /dev/tty1 
 
If you are running from a pseudo terminal from within X; tty reports 
something like this: 
 
  /dev/pts/4 
 
If you call from ycp like the following: 
 
  integer status = (integer)SCR::Execute ( .target.bash, 
        "/usr/sbin/sax2" 
  ); 
 
the terminal there is /dev/tty even if you are calling from a pseudo 
terminal. SaX2 now thinks you are running from a terminal but runlevel 
tells me you are in runlevel 5 ...  
 
but the really weird thing here is that I tested that call hundred times 
while implementing the new X11 module. It seems something has changed in 
the SCR environment. 
 
In my opinion this terminal information is wrong 
 
Comment 11 Marcus Schaefer 2005-09-29 13:33:07 UTC
Stano do you know what has changed there. If you think this is not 
a bug in the SCR environment I have to search for a solution in sax but 
I currently think that tty reports the correct terminal in former versions 
 
Could you assist here ? 
 
Thanks 
Comment 12 Marcus Schaefer 2005-09-29 13:34:01 UTC
Stano do you know what has changed there. If you think this is not 
a bug in the SCR environment I have to search for a solution in sax but 
I currently think that tty reports the correct terminal in former versions 
 
Could you assist here ? 
 
Thanks 
Comment 13 Stanislav Visnovsky 2005-09-29 14:25:41 UTC
Martin, any idea? 
Comment 14 Martin Vidner 2005-09-29 15:08:16 UTC
Jakub, how exactly do you start it when it does not work and when it does work 
(in a different locale, I mean)? Which desktop environment, which menu 
button... 
Comment 15 Martin Vidner 2005-09-29 15:23:21 UTC
In Czech, when run from the y2 control center, `tty` returns "není tty". 
This piece of code from /usr/sbin/sax2 gets easily fooled. 
        TTY=`tty | cut -c 6` 
        if [ "$TTY" = "t" ];then 
 
Comment 16 Jakub Friedl 2005-10-03 11:04:59 UTC
Martin: in czech environment, under KDE, launch yast from KDE menu (or from
xterm using "yast2" command), then klicking on Graphics card... icon --> doesnt work

in english environment, or in czech environment by using 'LANG="en_US" yast2'
command, it does work without a problem

it also works in any other language I have tried, only the czech language is broken
Comment 17 Martin Vidner 2005-10-03 11:20:13 UTC
Thanks Jakub, that is in accord with my findings.  
"není tty" is the Czech translation of "not a tty" which is reported for 
programs run from the menu. 
Marcus, I'd suggest   
    TTY=`tty`  
    case "$TTY" in /dev/t*)  
        ...  
Comment 18 Marcus Schaefer 2005-10-05 15:30:26 UTC
Thanks a lot now it's clear, there is no tty if called from a menu *grr* :-) 
Martin I make use of your approach, thanks a lot 
 
fixed  
Comment 19 Marcus Schaefer 2005-10-10 13:43:29 UTC
*** Bug 121733 has been marked as a duplicate of this bug. ***
Comment 20 Marcus Schaefer 2005-10-24 14:15:38 UTC
*** Bug 130168 has been marked as a duplicate of this bug. ***