I would like to give out a notification on screen by a script that is running by root on Ubuntu 14.04.  I tried this:  #!/bin/bash MAINUSER=$(cat /etc/passwd|grep 1000|sed "s/:.*$//g") su $MAINUSER -c 'notify-send "starting some scan... "' #.... su $MAINUSER -c 'notify-send "scan finished "'   which works fine and creates a notification, if you run it as root in a terminal, that was started in the desktop screen, but it doesn't if you change to another screen with Ctrl+Alt+F1 to start it from there as root.   I also tried it with export DISPLAY=:0; sudo -E -u rubo77 notify-send, but that didn't change the behaviour either.  I would like to add it here in my script to   relevant discussion:   I also tried to use  instead, but the same result
Following are other questions which I think I need to know:   From a non X Session? (meaning root isn't logged into X) If multiple people were logged in on X, could I auto-detect who was on which screen, and thus programmatically detect which screen I need to launch the app on? Can I launch the app as the user? ( ok I'm 99.999% sure this is a yes ) Can I detect if users of group X are logged in to X?
I have a Laars gas boiler that has 3 heating zones. I want to replace the old mercury honeywell tstat on the 1st floor (heat only) with a newer honeywell RTH9580 wifi model. I've taken pictures of my entire system, labeled the wires in the pics to indicate the associated connections, and included the Laars wiring diagram.  There is a transformer mounted on the wall near the boiler that is wired in-line to the system (power from the panel --> into the emergency boiler switch --> into the wall transformer --> then to the boiler (low water cut off and boiler circuitry).  There is also a transformer within the boiler circuitry itself.  Can someone tell me the best method (proper preferred, not necessarily easiest) to connect the C wire? I have a page where some event listeners are attached to input boxes and select boxes. Is there a way to find out which event listeners are observing a particular DOM node and for what event?  Events are attached using:    Event.observe; DOM's addEventListener; As element attribute element.onclick. How to delete a non-empty directory in Terminal? Checking if a key exists in a JavaScript object? Question:  Let ${a_n}$ be a sequence in $\mathbb{R}$ with $\lim_{n\to\infty}a_n=a$  Prove that  $\lim_{n\to\infty}a_n^2=a^2$  Attempt: Without using any properties of limits (this is a question in a section of the book that came before any list of any limit theorems)  By definition:  $|a_n^2-a^2|&lt;\epsilon$   $|a_n^2-a^2|$ $\leq$ $|(a_n+a)(a_n-a)|$ $\leq$ $|(a_n+a)| |(a_n-a)|$ $\leq$   $(|a_n | + |a|)(|a_n -a|)$ $&lt;$ $\epsilon$  And since I know that $\lim_{n\to\infty}a_n=a$, I'll subsitute that in for $|a_n|^2$ as $a^2$   $\therefore$ $a^2-|a|^2 &lt; \epsilon$ which is true since $a^2-|a|^2$ in my case.  I wonder if this is a possible solution? I just would like to know if a question or an answer saved draft is visible to someone else, apart from the OP.  Will a copy of a saved draft remain visible even after it has been deleted? Who has access to it? @ variables in Ruby on Rails Objective-C Static Class Level variables Is $|xy|$ differentiable in $(0,0)$? Is $f(x,y) = |xy|$ differentiable in $(0,0)$? I have no idea how to approach this problem. How to calculate the $H_2$ and $H_\infty$ norms of TransferFunctionModels or StateSpaceModels? Consequences of not showing up for one leg of journey Prove $4(x + y + z)^3 > 27(x^2y + y^2z + z^2x)$ Prove that, for all positive real numbers $x$, $y$ and $z$, $$4(x + y + z)^3 &gt; 27(x^2y + y^2z + z^2x)$$  I've tried expressing it as a sum of squares, but haven't got anywhere.   Hints are also welcome. So what I'm looking for here is something like PHP's  function.  This is so I can debug my scripts by seeing what's the state of the object in question. Large braces for specifying values of variables by condition How do I produce a conditional expression with large brackets? For example: X = 0 if a=1, 1 otherwise, with a large left bracket and specifying each condition in a line? Why does turning Caps Lock off take such a long time to work? This is my biggest issue with Linux and the main reason I don't use it as my main working OS.  Whenever I use caps lock to write something in upper case and disable it in order to keep writing the next letter AFTER I've disabled it is written in upper case.  So, my text comes out weird, as SOMETHING *L*ike this  I've tried Linux Mint, Fedora ... and the issue keeps happening.  Searching Google I've found some very rare persons have the same issue, but I was unable to find any solution.  Is there any way to solve this or am I DOOMED *F*or life?  BTW, whenever I ask this question someone suggest I should learn to use shift, instead of caps lock. I know, that's the right way, but I'm used to use caps lock and, well, it should work. I have a managed C# dll that uses an unmanaged C++ dll using DLLImport. All is working great. However, I want to embed that unmanaged DLL inside my managed DLL as explain by Microsoft there:    So I added the unmanaged dll file to my managed dll project, set the property to 'Embedded Resource' and modify the DLLImport to something like:  [DllImport("Unmanaged Driver.dll, Wrapper Engine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", CallingConvention = CallingConvention.Winapi)]   where  'Wrapper Engine' is the assembly name of my managed DLL 'Unmanaged Driver.dll' is the unmanaged DLL  When I run, I get:     Access is denied. (Exception from HRESULT: 0x80070005   (E_ACCESSDENIED))   I saw from MSDN and from  that's supposed to be possible... I'm trying to use Python to place a camera. I know the camera's location, and the forward and up vectors for the camera (i.e. the direction it's pointing and its orientation). How do I do this?  I know that it's possible to calculate a raw world matrix from the above information, which I can then apply to the camera, but I was rather hoping not to have to. Is there an easier way? I'm writing a math paper in LaTeX and for math formulas I'm just using $$math formula$$. Is is possible to numerate formulas? Or do I have to you use some specific commands such as align? How to determine the class of a generic type? I understand that the architecture of Convolutional Neural Networks (CNN) and Feed forward (FNN) are quite different. And that CNNs use pooling and filters of shared weights over a patch of the image. I am not so clear on the core convolution operator (1):   If anyone could link me to an explanation, I have looked at the Colah blog and Nielsen's online book, and I understand what it is doing but don't understand the convolution operator.  Also, it looks quite similar to the the core FNN function is there and difference? (2).  (1) convolution operator is $a^1 = \sigma(b + w*a^0)$ which is equivalent to:  $a^1 = \sigma(b + \sum^4_{l=0}\sum^4_{l=0}w_{l,m}a_{j+l,k+m})$  (2) feed forward operation:  $a^1_i = \sigma(\sum^n_{j=1}w_{ij}x_j +b_i)$  Many thanks  Sources: functions taken from: