Creating Environment Variables in Python does not seem to work
Can a shell script set environment variables of the calling shell?
I am getting the following error frequently. (Example: when running zenity,firefox etc. commands / applications.)  Fontconfig warning: "/etc/fonts/conf.d/90-fonts-unfonts-core.conf", line 11: Having multiple values in &lt;test&gt; isn't supported and may not work as expected   Here is contents of file /etc/fonts/conf.d/90-fonts-unfonts-core.conf:  &lt;?xml version="1.0"?&gt; &lt;!DOCTYPE fontconfig SYSTEM "fonts.dtd"&gt; &lt;fontconfig&gt;     &lt;match target="font"&gt;         &lt;test name="family" qual="any"&gt;             &lt;string&gt;은 바탕&lt;/string&gt;&lt;string&gt;UnBatang&lt;/string&gt;                 &lt;string&gt;은 돋움&lt;/string&gt;&lt;string&gt;UnDotum&lt;/string&gt;                 &lt;string&gt;은 궁서&lt;/string&gt;&lt;string&gt;UnGungseo&lt;/string&gt;                 &lt;string&gt;은 필기&lt;/string&gt;&lt;string&gt;UnPilgi&lt;/string&gt;                 &lt;string&gt;은 그래픽&lt;/string&gt;&lt;string&gt;UnGraphic&lt;/string&gt;         &lt;/test&gt;          &lt;edit name="antialias" mode="assign" binding="strong"&gt;&lt;bool&gt;true&lt;/bool&gt;&lt;/edit&gt;         &lt;edit name="hinting"   mode="assign" binding="strong"&gt;&lt;bool&gt;false&lt;/bool&gt;&lt;/edit&gt;         &lt;edit name="autohint"  mode="assign" binding="strong"&gt;&lt;bool&gt;true&lt;/bool&gt;&lt;/edit&gt;         &lt;edit name="hintstyle" mode="assign" binding="strong"&gt;&lt;const&gt;hintslight&lt;/const&gt;&lt;/edit&gt;     &lt;/match&gt; &lt;/fontconfig&gt;   How to solve it? I'd like to have Ubuntu installed on a USB stick, that I could plug in (almost) any computer and boot from it, and that I could use (almost) normally, as if it was installed on that computer. I'd also like to have a data partition on it that could be used by (almost) any computer, mostly to store some portable apps, just in case.    I've been told that if I installed Ubuntu in BIOS mode, I wouldn't be able to boot from a computer in UEFI mode, and vice versa.  Since I'd like to be able to boot on any computer, it's a big problem.  What can I do to be able to boot on computers in BIOS or UEFI modes in my case?  I've been searching for solutions but most of them are for specific needs that are different than mine, so it's difficult to extract the minimum requirements from those solutions to apply them to my problem.  Is there a simple, "clean" and quite generic solution to this problem?  I'd appreciate some explainations about the reasons why a specific solution is good or a specific step is needed.    My current setup:   USB stick:  OS: Xubuntu 16.04 i386 installation: full install (from a Live USB built with Rufus) drivers: none proprietary file systems:    partition table:    2: , /boot/efi, 128 Mio, FAT32, [boot,esp] 3: , 128 Mio, HFS+ 4: , 2 Mio, [bios_grub] 5: swap, 512 Mio 6: , /, 24 Gio, ext4, defaults,errors=remount-ro,lazytime,commit=60 1: , /media/data, ~3.6 Gio, FAT32, defaults,lazytime,check=strict  RAM:   /tmp, tmpfs, defaults,nosuid,nodev,noexec,mode=1777   swap:    vm.swappiness=5 swap partition: 512 Mio, for emergency zRAM swap files:    /var/swap/hib.swp: same size as RAM, for hibernation, generated by a script at startup /var/swap/opt.swp: if needed, generated by a script   overprovisioning: ~5.6%   built-in: ~1.2 Gio (apparently) added: 512 Mio  scheduler: deadline Is it ethical to withdraw a paper after acceptance in order to resubmit to a better journal? Purpose of @ Symbol Before Strings? How to output MySQL query results in CSV format? Is there an easy way to run a MySQL query from the Linux command line and output the results in  format?  Here's what I'm doing now:  mysql -u uid -ppwd -D dbname &lt;&lt; EOQ | sed -e 's/        /,/g' | tee list.csv select id, concat("\"",name,"\"") as name from students EOQ   It gets messy when there are a lot of columns that need to be surrounded by quotes, or if there are quotes in the results that need to be escaped. When ever I need to kill a background process I do ps -e | grep &lt;process_name&gt;  Which prints something like this 1766 ? 00:00:13 conky , Then I use the process ID to kill it like so kill 1766 .   Is there any way I can simplify this ? Make it quicker ? reduce the amount of typing ? My PC (Lenovo Ideapad z580) is overheating while running Ubuntu GNOME 16.04 LTS.  $ uname -a Linux Mahadev 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux  $ lspci -nnk|grep -A2 VGA 00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09)   Subsystem: Lenovo 3rd Gen Core processor Graphics Controller [17aa:3977]   Kernel driver in use: i915   $ sensors acpitz-virtual-0 Adapter: Virtual device temp1:        +52.0°C  (crit = +104.0°C)  coretemp-isa-0000 Adapter: ISA adapter Physical id 0:  +54.0°C  (high = +72.0°C, crit = +90.0°C) Core 0:         +54.0°C  (high = +72.0°C, crit = +90.0°C) Core 1:         +54.0°C  (high = +72.0°C, crit = +90.0°C)  update vivek@Mahadev:~$ stress -t 300 -c $(getconf _NPROCESSORS_ONLN) &amp;&amp;  sensors stress: info: [4408] dispatching hogs: 4 cpu, 0 io, 0 vm, 0 hdd stress: info: [4408] successful run completed in 300s acpitz-virtual-0 Adapter: Virtual device temp1:        +73.0°C  (crit = +104.0°C)  coretemp-isa-0000 Adapter: ISA adapter Physical id 0:  +72.0°C  (high = +72.0°C, crit = +90.0°C) Core 0:         +69.0°C  (high = +72.0°C, crit = +90.0°C) Core 1:         +72.0°C  (high = +72.0°C, crit = +90.0°C)  update     vivek@Mahadev:~$ sudo lshw -C cpu     [sudo] password for vivek:    *-cpu                             description: CPU         product: Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz         vendor: Intel Corp.        physical id: 0        bus info: cpu@0        version: Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz        serial: To Be Filled By O.E.M.        slot: CPU Socket - U3E1        size: 1302MHz        capacity: 2400MHz        width: 64 bits        clock: 100MHz        capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr  pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx  fxsr sse sse2 ss ht tm pbe syscall nx rdtscp constant_tsc arch_perfmon  pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni    pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid    sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave avx f16c lahf_lm    epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt     dtherm arat pln pts cpufreq           configuration: cores=2 enabledcores=2 threads=4  Update This time I edited the sensors , htop command result in image. It's getting overheated, my laptop is getting hang cause of overheating, please watch and reply. Thanks. How to redirect output of an entire shell script within the script itself? Is it possible to redirect all of the output of a Bourne shell script to somewhere, but with shell commands inside the script itself? Redirecting the output of a single command is easy, but I want something more like this: #!/bin/sh if [ ! -t 0 ]; then     # redirect all of my output to a file here fi  # rest of script...  Meaning: if the script is run non-interactively (for example, cron), save off the output of everything to a file.  If run interactively from a shell, let the output go to stdout as usual. I want to do this for a script normally run by the FreeBSD periodic utility.  It's part of the daily run, which I don't normally care to see every day in email, so I don't have it sent.  However, if something inside this one particular script fails, that's important to me and I'd like to be able to capture and email the output of this one part of the daily jobs. Update: Joshua's answer is spot-on, but I also wanted to save and restore stdout and stderr around the entire script, which is done like this: # save stdout and stderr to file  # descriptors 3 and 4,  # then redirect them to &quot;foo&quot; exec 3&gt;&amp;1 4&gt;&amp;2 &gt;foo 2&gt;&amp;1  # ...  # restore stdout and stderr exec 1&gt;&amp;3 2&gt;&amp;4 How to implement "confirmation" dialog in Jquery UI dialog? Should 'drive by' downvoting be more effectively caught? I have an answer that I'm certain is technically correct. However, it continues to be downvoted. The answer has already been noted in comments on other answers to be better. It goes more in-depth than the others, yet it continues to be downvoted.  The already upvoted answers were nowhere close initially, and I had already commented on them to say why it is wrong...  Isn't there a limit for that? Shouldn't something be catching this? Maybe I'm searching for the wrong thing, but I can't see how I can do this.  I have two servers:   Server A (has SQL Server 2012 installed) Server B (has SQL Server 2014 installed)   Server A provides an API via IIS. The code both inserts and gets data from the database depending on the API call.  Server B does exactly the same for its local database.  I would like to have it so that the two databases are consistent copies of each other. I do believe this is what HA accomplishes.   So a load balancer, for example, might direct API calls to A sometimes, and B sometimes, but the data needs to be consistent either way.  I found some documentation on HA for SQL Server 2012, but not on how to do this for a mixed environment of 2012 and 2014.  Any help or pointers to documentation would be great! Thanks. Can FFMPEG extract images from a video with timestamps? If I am thinking about using one of the 'fancy' top level domains such as .me or .tv should I be worried about how Google treats such domains?  Or to put it another way, if all other things are equal (good content, links etc.), will Google regard a .tv or .me as equal to a traditional .com or co.uk site? How to find out if my system is i386 or x86_64 before installing Ubuntu? Turning off Google search results indirection I can write  VAR=$VAR1 VAR=${VAR1} VAR="$VAR1" VAR="${VAR1}"   the end result to me all seems about the same. Why should I write one or the other? are any of these not portable/POSIX? Can a countable set contain uncountably many infinite subsets such that the intersection of any two such distinct subsets is finite? I'm attempting to modify the Table of Contents in my document. Currently, chapter one in my document is listed as   1   Introduction   What I would like to see is  Chapter 1   Introduction   Seems like an easy enough thing to ask for, but can't seem to find a good way to do this. Any feedback would be most appreciative. How to create a Sierpinski triangle in LaTeX? I have been trying to recreate the following image in LaTeX    and for me personally it has to be done with pdflatex. Although answers using pst-fractals From Jake I got a good start which led to the following code  \documentclass{standalone} \usepackage{tikz} \def\level{5} \usetikzlibrary{lindenmayersystems}  \begin{document} \begin{tikzpicture}[l-system={step=5pt, order=\level, angle=120},rotate=180]     \pgfdeclarelindenmayersystem{Sierpinski triangle}{     \symbol{X}{\pgflsystemdrawforward}     \symbol{Y}{\pgflsystemdrawforward}     \rule{X -&gt; X-Y+X+Y-X}     \rule{Y -&gt; YY}     }     \draw [black] (3,2) l-system     [l-system={Sierpinski triangle, axiom=X, anchor=north east},fill=white]; \end{tikzpicture}  \end{document}   There are however two problems with the code.   I layer a black triangle behind the lindenmayersystem? How do I keep the size of the triangle consistent with different number of recursion levels. Can we get some consensus on what flag to use for link only answers? Related:  (not a dupe, that's a feature request and was closed as a dupe of another one)        (old) post does indeed say that Link-only answers can be flagged as NAA, but there are a lot of posts like  which define Not An Answer is a way that it doesn't apply to link-only answers.  Can we get some up-to-date consensus on this? That link only answers are not allowed is .