« first day (2345 days earlier)      last day (2612 days later) » 

12:02 AM
yep
 
@Serg file naming in chinese: askubuntu.com/questions/888323/…
 
@WinEunuuchs2Unix Cheese , not Chinese. Cheese is webcam software
 
12:21 AM
@Serg could you look at my script and tell me where I've made a mistake?
 
@Zacharee1 link ?
 
hang on
it's killing something in /system
 
@Zacharee1 OK, so first of all, load it into shellcheck.net , you can see quite a few suggestions for improvement there.
 
ok
 
12:26 AM
I'll try those changes
see if it lets my device boot
what does it mean by compare directly?
 
grep has -q option, so you don't need to send `grep "stuff" > /dev/null"
Check exit code directly ?
 
so grep -q /tmp
yeah
 
It means that you can write if readlink /some/file | grep -q "stuff" ; then
If statement in bash already does that for you
 
so this `readlink /proc/$$/fd/"$OUTFD" 2>/dev/null | grep /tmp >/dev/null
if [ "$?" -eq "0" ]; then`
to what you said?
 
yup . . .
 
12:29 AM
OK
 
if readlink /proc/$$/fd/"$OUTFD" 2>/dev/null | grep -q /tmp ; then
 
ok
so now the fd appears unused thing
 
Yeah, so you are iterating over each item in /proc/$$/fd/ folder, but apparently within the for loop you never call the fd variable
 
so I can ignore it?
 
Kinda like in java you're doing for(int i=0;i<=10;i++) { System.out.printf("Potato\n"); } , i is unused anywhere
 
12:32 AM
and can I safely take the -n flags off echo?
@Serg ah
 
Does your system have printf there ?
 
probably not
 
It should
 
it's Android
 
shell probably has its own printf implementation.
 
12:33 AM
hey it does!
 
That thing is more portable
 
I have printf
 
So yeah, it's not a big deal, but it's just generally suggested to use printf instead. If you don't want for whatever reason, that's fine too
 
how do I replace?
A lot of this stuff is copied from the SuperSU installer, so
 
So as far as the echo options go , echo -n is supposed to remove trailing newline and -e enable backslash escape interpretation, right ?
printf does that already
$ printf "You can use \n newline like this"
You can use
 newline like this
bash-4.3$ printf "no-newline"
no-newlinebash-4.3$
 
12:37 AM
ok
so just replace it and the flags with printf?
and it should still work?
oh I figured the fd thing out
terdon had me change it from FD to fd to the $FD call inside the loop got borked
 
yup , effectively that.
 
so how do I change this:
ps | grep " 3 $FD " | grep -v grep >/dev/null
      if [ "$?" -eq "0" ]; then
into the single if statement?
 
if pgrep -f "3 $FD" ; then
 
wow
 
Also . . . what I see is that you repeat same action like 6 times. ui_print , then cp some files, then chmod , then ui_print. Why not rewrite that as function and just give things as arguments to your function ?
 
12:39 AM
so simple o_O
@Serg well I am a nooooob
 
wait, what is @Zacharee1 doing now?
 
SH
 
@Zacharee1 I'm a n00b too, tbh. I just spend a little more time in shell
 
to flash a ZIP
@Serg well you at least know what stuff does lol
alright
it reports no errors anymore
#!/sbin/sh

OUTFD=$2
ZIP=$3
MISC=/tmp/misc
SOURCE_P=$MISC/system/priv-app
DEST_P=/system/priv-app

mkdir $MISC
mkdir $SOURCE_P


if readlink /proc/$$/fd/"$OUTFD" 2>/dev/null | grep -q "/tmp" ; then
  # rerouted to log file, we don't want our ui_print commands going there
  OUTFD=0

  # we are probably running in embedded mode, see if we can find the right fd
  # we know the fd is a pipe and that the parent updater may have been started as
  # 'update-binary 3 fd zipfile'
  for FD in /proc/$$/fd/*; do
lot shorter too
oh question
those 2>> ui_print statements obviously don't work
 
I know what stuff does, but then again, I do stupid things with stuff, like moving /etc/passwd into /opt . . . . /facepalm&laugh
 
12:41 AM
how do I pass the stderr of those commands into the ui_print function?
@Serg lol
how do?
am big scrub
 
Hmmm, lets see . . . your ui_print function takes command-line argument, right ? So it won't work passing stuff to it . . . What you need to do probably , is have if statement that checks if $1 argument is non empty. If it is, it will mean its a pipe . . .
Give me a sec here . . .
 
oog
hang on though
is this function correct?
backup() {
  ui_print "Backing up $1"
  cp /system/priv-app/"$1"/"$1".apk /data/media/0/Documents/LGAppBak/"$1".apk
}
assuming I used backup "LGSystemUI"?
 
Looks correct
 
cool
and this one too?
install_app() {
  ui_print "Installing $1"
  cp $SOURCE_P/"$1"/"$1".apk $DEST_P/"$1"/"$1".apk
  chmod 0644 $DEST_P/"$1"/"$1".apk
}
and this is how I call stuff?
backup "LGSystemUI"

backup "LGQuickTools"

backup "LGSettings"

backup "LGSignBoard"
 
    #!/bin/bash
    ui_print(){
        if [ -n "$1"  ];
        then
            printf "ui_print $1\nui_print\n"     >> /proc/self/fd/$OUTFD
        else
            # classical way of reading stuff in shell
            # this defaults to stdin
            while IFS=  read -r line
            do
                printf "ui_print $line\nui_print\n" >> /proc/self/fd/$OUTFD
            done
            # this stuff is to ensure
            [ -n "$line" ] && echo "$line"
        fi
    }
So . . . something like this
If $1 argument is non-zero, write it as usual
If we don't have $1, we're reading from pipe (stdin)
now, you want to send stderr of the process in front of pipe
 
12:50 AM
here's the problem
$OUTFD is actually where TWRP receives commands
 
So you'd need proc1 2>&1 | ui_print
 
oh wait
looks like you got that
so replace my ui_print with that?
and then use proc1 2>&1 | ui_print at the end of the cp commands?
 
Yeah, basically
and then you basically can do
 
this is SH btw
does that matter?
 
cp $SOURCE_P/LGSystemUI/LGSystemUI.apk $DEST_P/LGSystemUI/LGSystemUI.apk 2>&1 | ui_print
 
12:53 AM
OK thanks
tsk tsk tsk @Serg:
 printf "ui_print $1\nui_print\n"     >> /proc/self/fd/$OUTFD
           ^-- SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo".
 
@Zacharee1 that one doesn't exactly matter, because I'm writing stuff as cross-shell as possible. So far I've not seen any bashism in the code . . .
 
OK
 
@Zacharee1 yup , that one is better actually. printf "My %s world\n" "Hello"
Also, that sounded like perl for a second
 
eek
not another language
 
my $hello_world;
 
12:55 AM
I guess it's time to try it...
hope it doesn't bork /system again
 
fingers crossed, butthole clenched
 
flagged
 
@_@
 
hue
hmm
0644 is -rw-r--r-- right?
 
6 is 110, 4 i s 100 . . .yep
 
12:58 AM
hmmmmmm
 
octal numbers
 
so why does my device refuse to boot?
 
That . . . is a good question . . . which I can't answer . . . .
Gosh, can LibreOffice stop sucking so baaaaad
 
OK
got rid of all the variables
maybe that'll help
 
1:15 AM
Shiz i forgot the lab prompt at home, now I have to write report like “whatever”
Should I just turn in lab report late ? or should I just write "whatever"
 
0
Q: Ubuntu 16.04 Scripts in /etc/profile.d

feverDreamI am currently trying to setup some bash definitions (functions, variables) that need to be available for all the users that access a workstation. I have created shell scripts with .sh extension in /etc/profile.d/ directory that have all the necessary. In theory, these should be run once a user l...

 
Pi Zero packs back in stock at Adafruit.
 
1:35 AM
They haven't been out of stock since its release, have they?
<-- hasn't been paying attention
 
they have been
a lot
 
grr
why does it not work
 
A lot of places actually limit how many Pi Zero items you can buy, some only limit you to one per person
By the way, there is new Pi Zero, now with wifi integrated, at 10$
 
o_O
hmm
I think it was terdon's modification
instead of for FD in ls /proc/$$/fd; do
he said it should be for fd in /proc/$$/fd/*; do
now I'm actually getting status prints when I flash it
 
1:57 AM
 if readlink /proc/$$/fd/"$FD" 2>/dev/null | grep -q "pipe" ; then
        if pgrep -f "3 $FD" ; then
        OUTFD=$FD
        break
      fi
    fi
  done
Well, technically speaking using lowercase variables is common , and recommended
 
yeah but it broke the code :p
so now I know it should be working
but it isn't
 
@Zacharee1 I can't see how. It is supposed to match within the loop
 
so I've commented everything except SystemUI out
 
for FD in /proc/$$/fd/*; do
 
@Serg well he never told me to change the $FD in there to $fd :p
 
1:59 AM
@Zacharee1 . . . <.< . . . that's kinda . . . obvious . . . for(int i=0; i<=10;i++){ . . . so if I change i in for loop definition to j, i gotta change it within the body
 
@Serg am big skrub
ramambar?
idk how these variables work
they're so weird
 
yes, i have RAM bar
 
lel
 
@Zacharee1 if you think these are weird , try perl
 
sorg iz var funi
 
2:00 AM
everything is my $var , my $something, and arrays are my @array
 
so was Perl originally just an example language?
SystemUI killed it
wait
how do you comment in SH?
 
# this is a comment
 
oops lol
I commented the wrong thing...
I commented the backup instead of the install
DERP
I think this actually deserves a DORP
 
BURP
 
OH MY GOD
BIGGEST FACEPALM IN THE WORLD
I FORGOT TO COPY THE 3MINIT FILES IN!!!!!
AAAAAAAAAAAAA
 
2:04 AM
No mistaking the Chinese for the Cheese was biggest Facepalm :p
 
at least it got me some coding lessons from a fellow derp though
 
I see your caps lock is broken XD
 
@WinEunuuchs2Unix say hwat now
 
@Zacharee1 he pinged me earlier saying there's a question about Chinese . . . it was actually Cheese
 
I mistook Cheese for Chinese, @Serg pointed that out :p
 
2:04 AM
the webcam software
 
xD
 
I was so excited I finally found a Chinese question for Serg I didn't read close enough.
 
Doge approves
 
A picture is worth a thousand words and... one dog :D
 
only one doge?
forshame serg
 
2:08 AM
don't tempt me breh
 
tempeh
temphue
 
why are we saying "doge" and not "doggie"?
is that the name of the extension?
 
you are obviously not one with the meme
"I am one with the meme and the meme is with me"
chant that ^ it might help
 
The dogeness is real
 
that's more like it
imagine if it could use OCR and replace actual text
the hidden doge extension
replace bits and pieces, see if anyone notices
 
2:10 AM
Crouching moon-moon, hidden doge
 
Imagine if you could print-screen that and take it to school tomorrow and say "the doge ate my homework"
 
Also, gtg, class in 20 mins
 
hue
 
"Sorry professor, I got a doge virus"
 
class at 7:30pm... that's dedication.
 
2:11 AM
well that wasn't it either...........
@Seth do you know bash?
 
Why don't you ask your bash question @Zacharee1 and maybe someone else will answer if Seth is tied up?
 
@Zacharee1 whats actually wrong ?
 
How do I get both normal and error output?
2>&1 | ui_print does errors
@Serg no idea...
 
any error messages ?
can you see script output ?
if you can, you can set a couple debug variables
 
2:22 AM
nothing is going wrong
 
and it will show where errors occur
 
I have it directing the errors to ui_print like you showed me
and there are none
hmm
Hang on
 
ok, so when script runs, can you see output on screen somewhere ?
 
I'm gonna exclude SystemUI real quick
@Serg except for CP because that's running fine
but lemme do this experiment first
so say I had an extra folder that should also be copied
instead of cp /tmp/misc/system/priv-app/"$1"/"$1".apk /system/priv-app/"$1"/"$1".apk
could I use cp -a /tmp/misc/system/priv-app/"$1"/. /system/priv-app/"$1"/?
 
New chair is nice...
Oh and I survived the first round of tornadic weather...
 
2:32 AM
@Zacharee1 yes. but no, I'm not inclined to work in ash on your phone.
 
drat
 
buuuut what's your problem...
 
>
How do I get both normal and error output?
2>&1 | ui_print does errors
but I also want >&1
would >&1 2>>&1 | ui_print work?
alrighty
it boots without any of the apps except 3Minit installed
 
@TheXed Tornado in Illinois this time of year?
 
now for everything except SystemUI
 
2:37 AM
@WinEunuuchs2Unix, we had a outbreak tonight...
 
@TheXed I saw a headline today you guys broke a 148 year winter record but I thought it was for lack of snow or something.... I should have read the story.
 
@WinEunuuchs2Unix oh I didn't see that, but the other day I did see we broke a 93 year old record for the high temperature...
like 73 degree F...
 
@TheXed We broke a record in February too but it was more like 50F or 60F.
 
2:46 AM
well it isn't SystemUI
 
Oh, we kicked Chicago out of the state a long time ago...we are still trying to develop a way to blast them off the state and float them out into Lake Michigan...
 
or QuickTools
 
2:59 AM
@Zacharee1 2>&1 redirects stderr to stdout.
 
oh
OK
so it's including everything anyway
 
I have a question. What if when you do "About This Computer" in the GUI and what it says there does not match what lsb_release -a tells you? Which one is reliable?
 
@gracious1 seen this?
0
Q: "System Settings/Details" and "lsb_release -a" report different Ubuntu release after upgrade

Cristhian EcheverryAfter updating to 16.10, my System Settings / Details window tells me I'm still running Ubuntu 14.04 LTS, but the lsb_release -a command in terminal correctly reports 16.10. What is wrong here and how can I fix this discrepancy?

 
I see. So the GUI one is unreliable (although I'm not using Dell).
@Seth thanks
 
thank god
@Serg good news, it wasn't the script. LGSettings was semi-broken, so it worked when I flashed it on top of my mods, but when I flashed it on top of just the ROM, it broke stuff. Removed it from the script and voila
 
3:27 AM
yay another tornado....
 
3:38 AM
@TheXed you're welcome
@Zacharee1 \ o/
 
3:49 AM
@TheXed yikes.
@Zanna this message of yours was tweeted right after the Amazon S3 outage that caused half the Internet to go down. Good timing :D
5
 
This one launched right above my head, but moved out of the area quickly...
by the way if anyone needs a really cheap and really good router:
$66.00
 
I'mma -1 you on that, because I recently heard evil things about all consumer-grade routers
and because i've tested against that router and won in a 'red vs. blue' situation
 
@ThomasWard I could say the same about consumer grade cars...and houses...and...and...
I didn't say it was the best router, I said at that price point it is a really good router...
 
shrugs
 
What router do you suggest then? for 66 dollars?
 
4:00 AM
none of them. up the price point by a couple hundred and maybe I have an answer :P
 
Okay fine, what do you suggest?
 
but i'm biased by enterprise-grade equipment :P
@TheXed pfSense firewall + UniFi AC Lite AP + a controller running for all of an hour to set up the wifi on the access point
but as i said i'm biased towards higher grade stuff :)
 
Well I like enterprise grade equipment too, but I am not willing to spend 5-10K for network equipment and servers for my house
and the Ubiquiti stuff can stay at the store...
by the way after Friday you probably won't see me for several weeks...
The Legend of Zelda: Breath of the Wild is an upcoming action-adventure video game developed and published by Nintendo for the Nintendo Switch and Wii U video game consoles. It is the 19th main installment in the The Legend of Zelda series. The story is set in Hyrule and follows amnesiac protagonist Link, who awakens from a 100-year slumber to a mysterious voice that guides him to defeat Calamity Ganon. The title's gameplay and mechanics constitute a departure from the series' conventions, featuring an open-world environment, a detailed physics engine, high-definition visuals, voice acting, and...
 
4:16 AM
yay, got bronze for
my perlyanswer brought me that
editing on mobile is a giant PITA
 
@Seth Three letters: IME
 
4:31 AM
@KazWolfe hm?
 
@Seth Intel Management Engine
the thing that allows you to take over even offline servers in a proper environment/setup
 
Oh, sure.
The very thing I remember you saying "isn't a big deal" :P
 
yep, that one.
your memory is way better than mine.
 
5:32 AM
@muru Another satisfied customer :D
@terdon or @seth, can you guys convert this askubuntu.com/a/888342/158442 into a comment plz ?
 
I wonder why chat didn't onebox that link :(
 
because of the ping ?
 
Sigh..
 
That's not comment material.
 
lololol
aw, would have been nice to just have comments like that, because im a show-off like that :p
 
5:46 AM
:p
 
and in other news, rice with canned veggies is almost done, so is chinese sausage
 
6:14 AM
@NathanOsman lol maybe that's what happened
 
6:52 AM
IRC is basically dead :|
The #launchpad channel used to be quite active.
 
:(
 
Now it's nearly a ghost town.
Ah well, I just need to find where everyone moved to :P
 
7:31 AM
Somebody called my mom today, named himself as our bank's fraud prevention department representative
I checked the phone number he said in the voice mail and the one from which he was calling
public records show totally different name and person
 
0
Q: Setting initcwnd and initrwnd for persistent start on network-manager restart

cryptoboyI need to have the following routes initiate persistently whenever network-manager service is restarted (both manually, and upon resume from suspend/hibernate). ip route change default via 10.0.0.1 dev wlo1 proto static metric 600 initcwnd 10 initrwnd 10 ip route change 10.0.0.0/24 dev wlo1 pr...

 
regular landline phone also, but no mention of affiliation with bank, although the first 3 digits differ by one with bank, so his digits were 690, but our bank's is 680
I smell scam
 
Yeah, that sounds fishy.
 
0
Q: Systemd to upstart

SaeSiFirst of all I am no expert by any means. I am more or less a beginner who wants to learn. My problem is that I got a systemd service and I am still using Ubuntu 14.04 for various reasons. As you probably know ubuntu uses upstart and not systemd. Can you guys help me convert this systemd service ...

 
 
1 hour later…
9:07 AM
0
Q: Xrandr doesn't see display, but it works

SergiusI used to restart my workstation (Ubuntu 16.04 on board) very rarely, maybe once per few months. Yesterday, my two displays were replaced with a new ones via hot plug method. Thus, they were connected to the same ports (one - VGA, second - HDMI) and everything looked good. Today I noticed few str...

 
9:35 AM
Great.
 
Super
 
Somebody decided to use git push -f on a repository on GitHub.
...and removed a fix for a bug.
ಠ_ಠ
 
Ouch!
 
can't find the best dupe... askubuntu.com/questions/888419/…
 
@Zanna maybe this one? askubuntu.com/questions/839293/… Couldn't find anything closer.
Nah, don't think it is...
 
9:51 AM
oh... I think it is
hmm
maybe not :S
well, it is the problem they have with the Software Center anyway... having an Ubuntu One account would probably not help them
 
10:20 AM
Good morning ! :)
 
10:41 AM
[ SmokeDetector | MS ] Bad keyword in link text in body: Stuck on splash screen error loading shared library by P.B. on askubuntu.com
 
Morning cl
 
@WinEunuuchs2Unix Good morning to you as well ! :)
 
What's on the agenda for today?
 
@WinEunuuchs2Unix nothing special ... I already upgraded my fedora and ubuntu systems (will check redhat later) ... then I re-checked my answers from yesterday ... now I checked for new questions, but found nothing to answer. :) And what's up with you ? How are you doing ? Everything fine ?
@gracious1 Could you get it managed to install your new ubuntu 16.04 successfully in the meantime ? :) Is everything working flawlessly as expected now ? :)
 

« first day (2345 days earlier)      last day (2612 days later) »