INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Linux machine got log off, if used raise command for Bwidget TAB

Linux machine got log off, if used raise command for Bwidget TAB

Linux machine got log off, if used raise command for Bwidget TAB

(OP)
Hi,
I am using Bwidget code for Tab in my application.
These tab also has close tab button also.
When user close tab, then current tab is destroyed and net tab is raised.

When i am raising tab, the machine is getting logged off!

If i use the same in the machine having graphics card, then it works perfectly fine.

Xorg.conf settings are that i am using in my machine (without graphics card):

###############################################################
# Xorg configuration created by system-config-display

Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "Monitor"

### Comment all HorizSync and VertSync values to use DDC:
### Comment all HorizSync and VertSync values to use DDC:
### Comment all HorizSync and VertSync values to use DDC:
### Comment all HorizSync and VertSync values to use DDC:
### Comment all HorizSync and VertSync values to use DDC:
Identifier "Monitor0"
ModelName "LCD Panel 1024x768"
### Comment all HorizSync and VertSync values to use DDC:
HorizSync 31.5 - 48.0
VertRefresh 56.0 - 65.0
Option "dpms"
EndSection

Section "Device"
Identifier "Videocard0"
Driver "intel"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
###############################################################3


Thanks in advance. Please Help!

RE: Linux machine got log off, if used raise command for Bwidget TAB

I'd guess there is a problem with the Tk installation. Bwidgets is all written in Tcl (as far as I can tell). Have you had any other issues with widgets?

One thing you could try is to overwrite the binding for the tab

CODE --> tcl

# --------------------------------------------------------------------------- # Command NoteBook::bindtabs # --------------------------------------------------------------------------- proc NoteBook::bindtabs { path event script } { if { $script != "" } { append script " \[NoteBook::_get_page_name [list $path] current 2\]" $path.c bind "page" $event $script } else { $path.c bind "page" $event {} } }
and/or the raise function

CODE --> tcl

# --------------------------------------------------------------------------- # Command NoteBook::raise # --------------------------------------------------------------------------- proc NoteBook::raise { path {page ""} } { variable $path upvar 0 $path data if { $page != "" } { _test_page $path $page _select $path $page } return $data(select) }

_________________
Bob Rashkin

RE: Linux machine got log off, if used raise command for Bwidget TAB

(OP)
Hi,
i am very sorry for replying you late.
Very thanks for you reply. I tried changing the code, but could not help.

Apart from Close Tab, i am NOT facing any issues regarding BWidget

I traced back the whole issue. And finally got stuck to the one line.

STEP 1. I was tracing back for closing and raising tab procedure
STEP 2. where i found "_select $path $page" procedure calling.
STEP 3. In the end of _select procedure, I found "_draw_area $path" procedure calling.
STEP 4. In _draw_area procedure... we are doing coords of whole canvas at the end of the procedure... ...
if { $sel != "" } {
# Sven
if { [llength [$path.c find withtag "window"]] == 0 } {
$path.c create window 2 [expr {$y0+1}] \
-width [expr {$w-3}] \
-height [expr {$yo-3}] \
-anchor nw \
-tags "window" \
-window $path.f$sel
}
$path.c coords "window" 2 [expr {$y0+1}]
$path.c itemconfigure "window" \
-width [expr {$w-3}] \
-height [expr {$yo-3}] \
-window $path.f$sel
# Sven end
} else {
$path.c delete "window"
}

coords of whole window is causing log off of machine, i guess.

If i hash these lines. EVERY THING WILL WORK PERFECTLY (But tab window will be here and there as we did not do the coords)

Till here i guess, issue i traced back is right.
Please guide me more and provide me some alternative.

Thanks in advance

RE: Linux machine got log off, if used raise command for Bwidget TAB

(OP)
NO.. i traced back more in same procedure of "_draw_area" ....

$path.c itemconfigure "window" \
-width [expr {$w-3}] \
-height [expr {$yo-3}] \
-window $path.f$sel

Here BWidget code is configuring the canvas width and height....

These are the main culprit lines which are causing the Log-Off of the machine.

Can you please suggest me any alternative to these lines??

Thanks in advance

RE: Linux machine got log off, if used raise command for Bwidget TAB

The only thing I can think of is that one or more of the variables, $w, $yo, or $sel (probably not $sel) if you're sure you're getting to the "itemconfigure" isn't set or isn't available in the scope of the "if" block.

You can test this by using actual values at least temporarily.

_________________
Bob Rashkin

RE: Linux machine got log off, if used raise command for Bwidget TAB

(OP)
Nope. It did not helped me. I tried giving hard coded values,
like

$path.c coords "window" 2 22
$path.c itemconfigure window -width 1318 -height 585 -window $path.f$sel

but results are same. :(

RE: Linux machine got log off, if used raise command for Bwidget TAB

(OP)
I dont know its very weird friend.
I could not trace back the real sequence.


From NoteBook::_select proc --> _draw_page proc till _draw_area proc, machine is getting log off randomly.

Last time when i was working, it got log off on _draw_area proc thrice, but now i figured out it can be on any line, depending on the load of computer.

NoteBook::_select is called from NoteBook::raise, after that, machine may log off at any line in NoteBook::_select sad

I am feeling helpless to explain the situation,

Can we look it in other way like graphics and all??

Xorg.conf settings for machine are :

(In this we added "Load glx", but this is also not helping)

# Xorg configuration created by pyxf86config

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "Device"
Identifier "Videocard0"
Driver "intel"
EndSection

Section "Module"
# Double Buffer extension
Load "dbe"
# Loading the fonts
Load "extmod"
Load "type1"
Load "freetype"
# glx implementing OpenGL
Load "glx"
EndSection

Section "DRI"
Mode 0666
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

RE: Linux machine got log off, if used raise command for Bwidget TAB

I'm stumped and I don't have a platform to test anything on (I use Python on my Linux PCs at home so I only test Tcl stuff at work).

_________________
Bob Rashkin

RE: Linux machine got log off, if used raise command for Bwidget TAB

(OP)
Thanks for your help! smile

I will try some more hit and trial. Thanks for your patience and Concern.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close