I am using Ubuntu 17.10 with gnome shell, and want my monitors to stay alive when screen gets locked.  Background: It's a Notebook connected to external monitors which need ages to wake after every time they get black. Locking is necessary and needs to happen after an idle time and manually, so Caffeine is no option.  Any hints on how to achieve that behavior? Possibly an extension?
I lock my computer a lot, and was wondering if there was a way to get the lock screen when I hit Ctrl + Alt + L. Right now when I use that key combination it turns the screen black, and I have to hit a key or click to bring up the screen where it shows the option to enter your password or switch users, as well as displaying the desktop background behind it.   Is there anyway to avoid having to hit that extra key, to bring up the screen I want? And is there anyway to keep it that way? It's really a matter of personal preference, and I don't see any reason why not to have it stay that way as my monitor eventually is turned off and/or my computer suspended.
Do photons lose energy due to gravitational redshift? If so, where does the lost energy go? In the gravitational redshift, the frequency of photons radiated from some source is reduced. As the energy of a photon is given by $\hbar\omega$, if the frequency is reduced where is the lost energy? How can I turn on the Intel HD manually? For some weeks my MacBook 6.2 does not switch to the integrated graphics adapter (Intel HD). This is especially crucial when I work on battery (which happens quite often). I guess the runtime could be enhanced when it would take the HD adapter for display.  I checked that it automatically changes the graphics mode. I am running Snow Leopard 10.6.8.  I recently installed 8GiB RAM (not from Apple). Could this probably related to this issue? Actually I do not want to downgrade or use the expensive Apple RAM.  So, how can I manually turn on the internal graphics adapter? How to count number of words from String using shell Prove that the ideal $(X_1-a_1,...,X_n-a_n)$ is maximal in $K[X_1,\dots,X_n]$ Let $K$ be a field, and $a_1,\dots,a_n \in K$. Prove that the ideal $$(X_1-a_1,\dots,X_n-a_n)$$ is maximal in $K[X_1,\dots,X_n]$.   I tried proving that the only elements outside the ideal are the invertibles of $K$ (I should still prove that this implies maximality, but it shouldn't be too difficult).  Is there a better strategy, or another stategy? How to get ongoing notifications of unread texts? One of my family members texts me at night when they are having nightmares. I want to know when they text me at 4 am instead of sleeping through it.  Is there a way to make text notifications keep going off until read? I need to know the ip address of another machine in a lan network.  What is the Windows command for getting ip address from machine name and vice versa? How to disable all div content Product of Consecutive Integers is Not a Power I observe the following strange characters ^@ in syslog at the time when my machine freezes.  Then i have to hardboot my machine.  What could be wrong any ideas?  Oct 12 12:20:52 nanak-P570WM anacron[1074]: Normal exit (1 job run) ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@  Oct 12 12:24:28 nanak-P570WM kernel: imklog 5.8.11, log source = /proc/kmsg started. Oct 12 12:24:28 nanak-P570WM rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="543" x-info="http://www.rsyslog.com"] start UFW Allows 22 for IPv4 and IPv6 but SSH Disconnects When Enabling sudo ufw disable followed by sudo ufw enable kicks me out of SSH  DMESG reports  [UFW BLOCK] IN=eth0 OUT= MAC=30:........ SRC=192.168.1.me DST=192.168.1.server LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=15776 DF PROTO=TCP SPT=55640 DPT=22 WINDOW=253 RES=0x00 ACK URGP=0  I can log back in without having to change rules via the console (UFW still enabled).  This started after upgrading Xenial (16.04) from kernel 4.4 to 4.15 (HWE). Upgrading to 18.04.1 did not solve the issue.  Versions:   iptables v1.6.1 ufw 0.35 4.15.0-29-generic #31-Ubuntu Ubuntu 18.04.1 LTS   UFW status verbose is (some rules were omitted, but they are all ALLOW)  Logging: on (low) Default: deny (incoming), allow (outgoing), disabled (routed) New profiles: skip  To                         Action      From --                         ------      ---- 22                         ALLOW IN    Anywhere 22 (v6)                    ALLOW IN    Anywhere (v6)   Why is this happening, or at least, how to revert to the expected behavior?  I looked at , and I am not sure it applies, but here's /etc/ufw/before.rules  # # rules.before # # Rules that should be run before the ufw command line added rules. Custom # rules should be added to one of these chains: #   ufw-before-input #   ufw-before-output #   ufw-before-forward #  # Don't delete these required lines, otherwise there will be errors *filter :ufw-before-input - [0:0] :ufw-before-output - [0:0] :ufw-before-forward - [0:0] :ufw-not-local - [0:0] # End required lines   # allow all on loopback -A ufw-before-input -i lo -j ACCEPT -A ufw-before-output -o lo -j ACCEPT  # quickly process packets for which we already have a connection -A ufw-before-input -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A ufw-before-output -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A ufw-before-forward -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT  # drop INVALID packets (logs these in loglevel medium and higher) -A ufw-before-input -m conntrack --ctstate INVALID -j ufw-logging-deny -A ufw-before-input -m conntrack --ctstate INVALID -j DROP  # ok icmp codes for INPUT -A ufw-before-input -p icmp --icmp-type destination-unreachable -j ACCEPT -A ufw-before-input -p icmp --icmp-type source-quench -j ACCEPT -A ufw-before-input -p icmp --icmp-type time-exceeded -j ACCEPT -A ufw-before-input -p icmp --icmp-type parameter-problem -j ACCEPT -A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT  # ok icmp code for FORWARD -A ufw-before-forward -p icmp --icmp-type destination-unreachable -j ACCEPT -A ufw-before-forward -p icmp --icmp-type source-quench -j ACCEPT -A ufw-before-forward -p icmp --icmp-type time-exceeded -j ACCEPT -A ufw-before-forward -p icmp --icmp-type parameter-problem -j ACCEPT -A ufw-before-forward -p icmp --icmp-type echo-request -j ACCEPT  # allow dhcp client to work -A ufw-before-input -p udp --sport 67 --dport 68 -j ACCEPT  # # ufw-not-local # -A ufw-before-input -j ufw-not-local  # if LOCAL, RETURN -A ufw-not-local -m addrtype --dst-type LOCAL -j RETURN  # if MULTICAST, RETURN -A ufw-not-local -m addrtype --dst-type MULTICAST -j RETURN  # if BROADCAST, RETURN -A ufw-not-local -m addrtype --dst-type BROADCAST -j RETURN  # all other non-local packets are dropped -A ufw-not-local -m limit --limit 3/min --limit-burst 10 -j ufw-logging-deny -A ufw-not-local -j DROP  # allow MULTICAST mDNS for service discovery (be sure the MULTICAST line above # is uncommented) -A ufw-before-input -p udp -d 224.0.0.251 --dport 5353 -j ACCEPT  # allow MULTICAST UPnP for service discovery (be sure the MULTICAST line above # is uncommented) -A ufw-before-input -p udp -d 239.255.255.250 --dport 1900 -j ACCEPT  # don't delete the 'COMMIT' line or these rules won't be processed COMMIT   PS: I didn't expect this to "fix" the issue but just for reference I changed the port SSHD listens on (and the corresponding rule) and the problem persists. Indian passport threading coming off Show that every irrational number in $\mathbb{R}$ is the limit of a   sequence of rational numbers. Every rational number in $\mathbb{R}$ is   the limit of a sequence of irrational numbers.   How can I prove this? ssh master - execute su remotely I have a server S that I need to connect to.  I'm connecting to S as user asdf with control master and after that I perform some stuff:  ssh -N -f -M -o ControlPath=$SSHSOCKET ${USER}@${IP} -p ${PORT} -i id_rsa ssh -to ControlPath=$SSHSOCKET ${USER}@${IP} -p ${PORT} "su -c whoami &amp;&amp; hostname &amp;&amp; exit"   It works as expected, but second line asks me  for password.  I am trying such fix:  echo 'qwerty' | ssh -t -to ControlPath=$SSHSOCKET ${K3_USER}@${IP} -p ${PORT} "su -c whoami &amp;&amp; hostname &amp;&amp; exit"   but it gets even worse:  muxserver_accept_control: tcgetattr: Inappropriate ioctl for device tcgetattr: Inappropriate ioctl for device Password:   For me, it's mandatory to ssh as asdf first. I also can't make any other ssh control master connections. I also can't modify any config on the target machine.  I just need to switch to root via ssh somehow. Any ideas ? When I check for updates, I get a "Failed To Download Repository Information" error.   This is what comes up under details:   W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_natty_main_source_Sources  Hash Sum mismatch,  E: Some index files failed to download. They have been ignored, or old ones used instead. I'm doing magnification and lens in class currently, and I really don't get why virtual and real images are called what they are.  A virtual image occurs the object is less than the focal length of the lens from the lens, and a real image occurs when an object is further than focal length.  By why virtual and real? What's the difference? You can't touch an image no matter what it's called, because it's just light. Fixing geometry validity errors in QGIS 2? Short story, domed refuges Is there any way of making a snow golem survive in hot biomes? Snow golems won't survive in the Nether (neither spawned in nor built ones). Is there a way to make a snow golem survive in the Nether and other hot biomes in vanilla Minecraft (i.e., without using mods)? Show that a norm on an inner product space satisfies parallelogram law. Hence use the parallelogram law to show that the space of continuous real functions defined on the interval $[a,b]$ is not a Hilbert space. Here I did the first part. Let $X$ be an inner product space and $x,y\in X$ consider $\Vert x+y\Vert ^2$ and $\Vert x-y\Vert ^2$ Then on adding I get $\Vert x+y\Vert ^2+\Vert x-y\Vert ^2=2(\Vert x\Vert ^2 +\Vert y\Vert ^2)$ For the second part I don’t know how can a parallelogram law prove $C[a,b]$ is not a Hilbert space, help me please. Question: Can anyone shed some light on this formula? I can't find any information on it.  It has three corollaries that I also need to understand: