Questions Tagged With xorghttp://linuxexchange.org/tags/xorg/?type=rssquestions tagged <span class="tag">xorg</span>enMon, 22 Oct 2012 19:05:15 -0400how to check in a bash script where the shell is run fromhttp://linuxexchange.org/questions/2953/how-to-check-in-a-bash-script-where-the-shell-is-run-from<p>hello everyone, I am fuzzy about how to set a command in a script to be run only when the shell is running within an X session.</p> <p>basically, in ~/.bashrc I set my keyboard maps as </p> <blockquote> <p>setxkbmap -layout 'us,gr' -variant 'altgr-intl,extended' -option grp:alt_shift_toggle</p> </blockquote> <p>If I am connecting through putty , or otherwise, and i just open a command prompt window, I DONT want this command to run. If on the other hand, i have an X session running (locally or remotely) I want this command to run.</p> <p>how can I do this checking in a bash script? Is there a bash environment variable I can be looking at? some other way?</p> <p>Thank you for your help</p>synthnassizerMon, 22 Oct 2012 19:05:15 -0400http://linuxexchange.org/questions/2953/how-to-check-in-a-bash-script-where-the-shell-is-run-fromxorgbashemacs can't open displayhttp://linuxexchange.org/questions/2618/emacs-cant-open-display<p>Just recently this has started happening.</p> <p>I run: <code>/usr/bin/emacsclient --alternate-editor="" --no-wait -c</code> and get `<em>ERROR</em>: Display :0.0 can't be opened'</p> <p>No other application do this.</p> <p>output from xdpyinfo:</p> <pre><code>name of display: :0.0 version number: 11.0 vendor string: The <a href="http://X.Org">X.Org</a> Foundation vendor release number: 10707000 <a href="http://X.Org">X.Org</a> version: 1.7.7 ..... </code></pre> <h1>Additional</h1> <p>Discovered that old emacs servers/daemons are still running.</p> <p>$ps ux | grep [e]macs richard 2642 0.0 0.8 38788 24984 ? Ss Jun22 0:25 emacs --daemon richard 7512 0.0 0.6 33896 19720 ? Ss Jun23 0:05 emacs --daemon richard 15458 0.0 0.6 32836 19076 ? Ss 09:40 0:01 emacs --daemon</p> <p>Any one any ideas how these can be shut-down when I log-off?</p>daves dadThu, 23 Jun 2011 08:06:12 -0400http://linuxexchange.org/questions/2618/emacs-cant-open-displayemacsdebianxorgscreen corruption after hibernate -- Is there another way to refresh the X11 display?http://linuxexchange.org/questions/2580/screen-corruption-after-hibernate-is-there-another-way-to-refresh-the-x11-display<p>When I restore from hibernate the screen is often corrupted. I suspect the graphics memory is not being saved. Suspend-to-ram works fine.</p> <p>It also looks like the font-cache is corrupted, as all letters are corrupted consistently. </p> <p><strong>Logging out and back in again fixes it</strong>, but I don't want to have to do that. I have been logging-out then hibernating, but this is more effort and eliminates most of the benefit of hibernate. </p> <p><strong>Is there another way to refresh the X11 display?</strong> The Ctrl+Alt+F1 ... does not work. It switches back to X11 instantly, but still corrupted</p> <p>I am using Debian 6</p>daves dadMon, 06 Jun 2011 08:23:26 -0400http://linuxexchange.org/questions/2580/screen-corruption-after-hibernate-is-there-another-way-to-refresh-the-x11-displaylinuxbootdebianxorgdesktopmotif application crashes while calling XtDestroyWidgethttp://linuxexchange.org/questions/1323/motif-application-crashes-while-calling-xtdestroywidget<p>Hi All, We have a 32bit Motif Gui application. Now we ported the application from Solaris to Linux and the system is crashing very frequently. On our analysis we could find that this issue happened when we are closing the forms in our application. When the forms are closed we will delete the forms and will call the function XtDestroyWidget() to remove the widgets. We ran a purify for the application and we could found that the Stack Array Bounds Read (SBR) is happening when we close the form. </p> <p>I had downloaded a sample motif program from the internet which is using XtDestroyWidget() to destroy the object. When i ran purify for this sample program also, i could found the same SBR.</p> <p>SBR: Stack array bounds read (54 times): * This is occurring while in: XtDispatchEvent [libXt.so.4] RemoveAllPMgr [libXm.so.3] XtCallCallbackList [libXt.so.4] XtPhase2Destroy [libXt.so.4] _XtDoPhase2Destroy [libXt.so.4] XtDispatchEvent [libXt.so.4] XtAppMainLoop [libXt.so.4] main [popup.cc:49] _start [crt1.o] * Reading 4 bytes from 0xffbfe4f0. * Frame pointer 0xffbfe4d0 * Address 0xffbfe4f0 is 32 bytes above stack pointer in function XtCallCallbackList.</p> <p>This SBR is happening in the XtAppMainLoop(). From these facts i assume that this SBR is a common one and related to motif rather than to our application.</p> <p>Can you please add some thoughts to the following questions. 1) Why SBR is happening when we use XtDestroyWidget(). Is this SBR a severe one.</p> <p>2) I had removed the XtDestroyWidget and used XtUnrealizeWidget(). This will help me to remove the SBR and hence crash is not happening. Also all normal forms will be removed normally. But the problem i am facing in this approach is the POP_UP forms are NOT removed in this method. Can any one please suggest a work around for removing POP_UP forms also other than the HIDE option.</p> <p>It will be very helpful for me if anyone can answer or add some thoughts for this issue.</p> <p>Thanks in advance, Sanush Chacko</p> <p>-----Adding Sample Program.. Hi Please find the sample program from where i got the SBR.</p> <p>include X11/StringDefs.h include Xm/Xm.h include Xm/PushB.h</p> <p>Widget toplevel;</p> <p>void close_window(Widget w, XtPointer client_data, XtPointer event_data) { Widget popup = (Widget)client_data; XtDestroyWidget(popup); }</p> <p>void pop(Widget w, XtPointer client_data, XtPointer event_data) { Widget a, button, popup;</p> <pre><code>popup = XtVaCreatePopupShell("Popup", transientShellWidgetClass, toplevel, NULL); button = XtVaCreateManagedWidget("Close", xmPushButtonWidgetClass, popup, NULL); XtAddCallback(button, XmNactivateCallback, close_window, (XtPointer)popup); XtPopup(popup, XtGrabNone); </code></pre> <p>}</p> <p>main(int argc, char *argv[]) { Widget button; XtAppContext app; XmString label;</p> <pre><code>toplevel = XtVaAppInitialize(&amp;app, "Popup", NULL, 0, &amp;argc, argv, NULL, NULL); label = XmStringCreateSimple("Make popup"); button = XtVaCreateManagedWidget("pushme", xmPushButtonWidgetClass, toplevel, XmNlabelString, label, NULL); XmStringFree(label); XtAddCallback(button, XmNactivateCallback, pop, NULL); XtRealizeWidget(toplevel); XtAppMainLoop(app); </code></pre> <h2>}</h2> <p>We wre using motif Version <strong>2.3.1</strong></p> <h1>define XmVERSION 2</h1> <h1>define XmREVISION 3</h1> <h1>define XmUPDATE_LEVEL 1</h1> <p>X11 and Xt version - 6</p>sanushchackoMon, 30 Aug 2010 15:34:54 -0400http://linuxexchange.org/questions/1323/motif-application-crashes-while-calling-xtdestroywidgetxorgHow do I specify PATH for X applications?http://linuxexchange.org/questions/628/how-do-i-specify-path-for-x-applications<p>I have some custom compilers installed on some custom path(/opt/uClinux/...) and added</p> <pre><code>export PATH=$PATH:/opt/uClinux/bfin-elf/bin:/opt/uClinux/bfin-uclinux/bin:/opt/uClinux/bfin-linux-uclibc/bin/ </code></pre> <p>to my .bashrc . While I can easily work from my command line, X applications like Eclipse or Kate do not recognize my custom path if I don't start them from a terminal. Where should I add the custom path so my X apps do not have trouble finding them?</p>atillaMon, 17 May 2010 08:11:39 -0400http://linuxexchange.org/questions/628/how-do-i-specify-path-for-x-applicationsxxorgpathrun level 5 failshttp://linuxexchange.org/questions/247/run-level-5-fails<p>Hello friends, I am using RHEL5.1, Problem:After successful installation of Linux(graphic &amp; text) my system gets hang-up stage. but works well in run-level 3,and fails to load in run level 5. The real thing that happens is, after selecting from grub, system starts-up and loads all the services successfully then normally it should go for root log-in screen, instead of that mouse cursor displays at the center of the screen &amp; when i try to move the cursor it's moving with a delay of 15-20 seconds and system gets very slowly. I tried almost all that i know(init 5, startx).I also user different Cd's to install.</p> <p>Please help me out of these problem.</p>HutchTue, 04 May 2010 04:43:24 -0400http://linuxexchange.org/questions/247/run-level-5-failsxorgdesktop-managerrhelarchlinux update whole system, now fluxbox + xcompmgr = slowhttp://linuxexchange.org/questions/201/archlinux-update-whole-system-now-fluxbox-xcompmgr-slow<p>I use archlinux on my packard bell easynote s4 series, I use fluxbox as WM and xcompmgr for transparency. Everything went smooth untill i updated everything with pacman, now when i use xcompmgr in fluxbox, windows move slow as hell and i have no idea why?</p>myganMon, 03 May 2010 21:19:13 -0400http://linuxexchange.org/questions/201/archlinux-update-whole-system-now-fluxbox-xcompmgr-slowarchwindow-managerfluxboxxorg