Reputation
791
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
7 22
Newest
 Necromancer
Impact
~334k people reached

21h
comment How to Install the Latest Versions of NodeJS and NPM for Ubuntu 14.04 LTS
@Dan, It appears you are running Ubuntu 15.04 (utopic) which is not supported by Node Source, so you get 0.10 from utopic's repositories. Node Source only support LTS releases and the latest non-LTS. Because you are not on an LTS release you're expected to upgrade to the latest version when it came out last October. So either do that, or hack it by changing the $(lsb_release -c) release autodetection bit to one of the supported releases and deal with the consequences.
Feb
4
revised How do I change a variable of a background function?
changed zenity implementation to use `pulsate` which is more like what the OP wanted to do ("process" dialog and not "progress")
Feb
4
revised How do I change a variable of a background function?
add an alternative IPC to signal the loop
Feb
4
comment How do I change a variable of a background function?
@Desert_foxhole: No, it has to do with the parenthesis in inside your loop - these start yet another subshell. Let me review your code again and add an writeup to my answer.
Feb
4
revised How do I change a variable of a background function?
removed superflous dots produced by copy from mcedit (which I love dearly despite its flaws)
Feb
4
comment How do I change a variable of a background function?
BTW "pid" is an accepted shorthand for "process ID", if it wasn't clear.
Feb
4
comment How do I change a variable of a background function?
not "restart" - it sends a notification (a "signal") to the other process that there is something that it needs to know. The kernel delivers the signal by stopping the process, hitting its "signal handler" and then letting it resume what it was doing from the exact spot it left. Some signals have meanings and predefined behaviors (that you can override as we did here), some are completely up to the programmer to decide what they mean, e.g. USR1 and USR2.
Feb
4
comment How do I change a variable of a background function?
muru - sorry, I meant to ping @Desert_foxhole. I misread who the OP was :-/.
Feb
4
comment How do I change a variable of a background function?
@heemayl, I think its important to note that the while loop is not "loaded into memory" - it is still running line by line from the script file, as can be seen if you edit the script file while the process is running. What happens is that putting a shell function "in the background" actually forks the shell and the second process is also reading from the same file but running on a copy of all the shell variables.
Feb
4
comment How do I change a variable of a background function?
@muru, please see my complete answer for an example how this can be done correctly.
Feb
4
revised How do I change a variable of a background function?
added 563 characters in body
Feb
4
revised How do I change a variable of a background function?
explained the example
Feb
4
answered How do I change a variable of a background function?
Jan
28
awarded  Necromancer
Jan
27
comment Why is “LANG=C;sudo apt-get clean” etc recommended?
@Braiam I'm familiar with the syntax, but it's important to note that unless the variable is exported, the command will not see it. LANG is a standard environment variable and so exported by default - but other variables may not be and the OP should be aware of that.
Jan
26
comment Why is “LANG=C;sudo apt-get clean” etc recommended?
Please note that that document is using the command incorrectly - it should be LANG=C command and not LANG=C;command. The first form forces the value of LANG environment variable for the duration of command while the second form is actually two commands where the first part just sets a local (not exported) variable and the second part runs the command without setting the required environment variable.
Jan
10
comment module ndiswrapper not found
Sure, and I do recommend you update to a non-LTS release. Alternatively, you can hold on to 14.04 until the next LTS release comes out in April.
Jan
8
comment module ndiswrapper not found
Did you try rndis_wlan?
Jan
8
revised module ndiswrapper not found
some formatting
Jan
8
comment module ndiswrapper not found
I'm wondering why you installed such an OLD operating system? the Long Term Support versions are meant for upgradophobic large enterprises - as a home user you should run on the latest stable operating system which - as of this writing - is 15.10. In it you will find updated user interface, many more features and support for more hardware.