« first day (2344 days earlier)      last day (2635 days later) » 

3:20 PM
Hello, I have a question, and I am not sure how ask this.
It seems that somehow I have changed something.
 
happens :D
 
@gracious1 Hi ! :) Simply start to ask ... :)
 
I rebooted this morning, and the GRUB screen looked different. It tooke me into Trisquel
 
happy days...
but you weren't expecting it?
 
Nope. I don't recall installing this!!!!
 
3:23 PM
hahaha!
someone been at your machine?
 
Trisquel GNU/Linux desktop
 
who here knows SH?
 
@gracious1 a wonder happened ? :D
 
Everything looks the same, though.
So far.
Also, at one point earlier this week, Software Updater told me I had to update from untrusted sources.
And apt-get had said that "ubuntu-bases" needed updating from untrusted sources, too.
So, what is Trisquel GNU/Linux Desktop. Come to think of it, what was I using before (it was whatever came by default, but what do you call it)
 
Trisquel is an operating system unrelated to Ubuntu
 
3:26 PM
Nobody has been at my machine that I know about.
Holy shit. I changed operating systems?
 
@gracious1 Are you trying to "fool" us ?
 
What?
No. I barely even know what I am talking about.
 
@gracious1 Either you installed the system or not !
 
someone has been at your machine, it can't have happened by itself
 
All I know is that it's different.
 
3:27 PM
someone is pranking you
 
@Zanna or he himself
 
So now I am not actually running Ubuntu????
 
correct...
 
Oh fuck, now what
It looks the same
 
it looks like Ubuntu?
 
3:28 PM
Yes.
 
actually, ism't trisquel a ideologically correct ubuntu fork?
yup
 
So wait, I cannot now upgrade to 16.04?
 
@JourneymanGeek haha ideologically correct yeah zackly
 
tbh, no matter what happened, its likely a mess
 
free as in freedom all the way
 
3:29 PM
I was using 14.04 up to now
ACK!!!!
It really is different. lsb_release says Trisquel!!!!
 
now the question is how and why?
 
How do I get Ubuntu back?????
 
someone might have edited /etc/lsb-release
 
you backup and reinstall
preferably after you find out who did this
I donno, you're the one whose system suddenly changed distros
 
No this can't be happening
 
3:31 PM
well, I agree.
 
Would the GRUB menu maybe give me a choice?
Holy shit I can't believe this.
 
all we have is what you said
 
I don't know what happened. No one could have gotten to this laptop.
 
something happened
but yeah, sounds like a prank
 
Okay, look, if I reboot, and look at the GRUB menu, is there something I could look for?
 
3:33 PM
@Zanna It's an Ubuntu derivative.
 
unless you can tell us otherwise
I donno. if its there, its there.
 
Shit, I just want plain old Ubunut.
 
@terdon yeah JMG said. I didn't realise it was one of our daughters
 
@gracious1 first of all chill out and stop swearing.
 
Look, I'm gonna reboot. Is there something I can look for in the GRUB menu (or whatever you call it -- I am barely literate with this)
 
3:34 PM
Now, is your data still there?
 
5 mins ago, by Journeyman Geek
actually, ism't trisquel a ideologically correct ubuntu fork?
 
DO NOT REBOOT!
First check if your data is OK
 
ok
 
@gracious1 without knowing what happened we can't tell you what's safe and what's not
 
@JourneymanGeek Yeah, yeah. I jumped in before reading the whole transcript again. I know :(
 
3:34 PM
Yes.... all data is there.
 
OK, great.
 
Desktop background ... smae
 
So nothing really bad has happened.
 
Pictures, documents, all there.
All applications there.
 
Chances are, you just installed something from a trisquel repo and that brought in a new /etc/os-release file and that's why you see a different distribution name.
 
3:35 PM
who flags 'fucking' and 'WTF'? are we really this thin-skinned here?
 
@terdon and trisquel spash screens and...
I donno if the DE is the same.
guess not
 
@orlp Yes, unfortunately. This particular room has a very low threshold for profanity. Don't look at me. I didn't make this rule, I just have to enforce it.
 
@orlp keeping calm is always good advice tho
 
@JourneymanGeek Yeah, OK, but that's all decorative. Nothing essential. Still running the same OS just with a different paint job.
 
you're going to break things more frustrated than not
 
3:36 PM
@terdon flags are not to enforce room rules, only for site-wide rules
@JourneymanGeek I can't disagree with that
 
@terdon randomly changing distros....
 
@orlp Oh really?
:P
 
So I need to get the result of a command to be appended to a file
but this command doesn't seem to work:
cp /data/media/0/Documents/LGAppBak/LGQuickTools.apk /system/priv-app/LGQuickTools/LGQuickTools.apk >> /proc/self/fd/$OUTFD
(this is Android)
 
@orlp there's no real concept of site/room culture as far as the powers that be can be concerned
@Zacharee1 OT OT OT
also, should that have an output?
 
@Zacharee1 WHat output? cp doesn't have any
 
3:37 PM
cp commands? maybe not...
it does give errors though, right?
so in theory, if I have an error, will that work?
 
but if it worked, no errors, no?
 
Only if it fails or if you use -v but both go to stderr, not stdout, so you need 2>> /proc/self/fd/$OUTFD
 
@JourneymanGeek I mean there's a very simple test: if I make a room with a rule that the word 'abortion' is off-limits I am free to kick people for that as a room owner, but it'd be abuse to use flags for that
 
@terdon ah thanks
 
I didn't realise that the -v output was on stderr...
 
3:38 PM
@orlp language like that is unloved in most places
 
so I can use -v and it'll give me status?
 
a lot of people use the site at work
 
as well as errors?
 
@orlp Yes and no. Actually, the rules about profanity have gotten considerably more stringent network-wide.
 
@JourneymanGeek I just used 'abortion' as an example, what about 'train'?
 
3:39 PM
@Zacharee1 not status, it will print which files are going where
 
@Zanna that's what I meant :p
 
@orlp depends on the context, but there's acceptable contexts for both, but not the F word
or the C word
 
@orlp It's up to the handling mod's discretion. But yes, in general, if a local room has its own rules that are different from the site's, using flags to enforce those would be considered abuse. By me, anyway.
 
@Zacharee1 yeah, but apparently it will be on stderr not stdout, TIL
 
or my favourite hokkien profanities, once anyone groks it...
 
3:40 PM
And I have called it so in the past in the 9th byte as I recall.
 
@Zanna TIL too lol
 
@Zacharee1 do you want output or status?
 
apparently cp is an unknown command....
 
@terdon I want it to tell me the errors
which it did
so I've got what I need
 
3:40 PM
OK
 
the SH noob goes back to SHing
 
shiiiiiing
 
er...
zanna@monster:~/playground$ cp -v foo copying >/dev/null
zanna@monster:~/playground$ cp -v foo copying 2>/dev/null
'foo' -> 'copying/foo'
 
Android?
uh
well it's a valid command....
 
not Android
 
3:42 PM
because it works in the shell
 
no I'm just saying, the -v output isn't in stderr here, but I'll shut up
you're fine, carry on
 
hue
 
@Zanna Yes, you're right. My bad, it seems to be going to stdout after all.
 
can I get both?
like a >> 2>>?
 
@Zacharee1 Yes. >file 2>&1
 
3:44 PM
ok
 
@terdon I think you don't want that first 2?
 
do I actually need to specify a file?
 
32
A: How to redirect stderr to a file

terdonThere are two main output streams in Linux (and other OSs), standard output (stdout)and standard error (stderr). Error messages, like the ones you show, are printed to standard error. The classic redirection operator (command > file) only redirects standard output, so standard error is still show...

 
oh wait
derp
 
the other one
 
3:44 PM
Whoops
 
woke up at 4:45 today so I'm derping
 
command > file 2>&1
 
the OUTFD is my file...
thanks
the question is, why is cp an unknown command??
 
hahaha oh dear
 
so this?
command >> /proc/self/fd/$OUTFD 2>>$1
(I need to append)
 
3:46 PM
No, this:
command >> /proc/self/fd/$OUTFD 2>>&1
 
oops
 
But why are you writing to /proc in the first place?
 
because that's where TWRP gets its output to display
well that command broke TWRP...
 
:(
 
hmm
So SH doesn't like the double pipe thing
uhh
well it "works" if I use $1 instead of &1
 
3:51 PM
@Zacharee1 this would really go much better if you started from the beginning and explained what you're actually trying to do.
 
but then I don't get the stderr status at all
 
And what tools you're using.
 
@terdon lemme just post my script
#! /sbin/sh

OUTFD=$2

readlink /proc/$$/fd/$OUTFD 2>/dev/null | grep /tmp >/dev/null
if [ "$?" -eq "0" ]; 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 `ls /proc/$$/fd`; do
    readlink /proc/$$/fd/$FD 2>/dev/null | grep pipe >/dev/null
    if [ "$?" -eq "0" ]; then
I'm trying to copy files using a TWRP update ZIP
 
What's TWRP?
 
custom Android recovery
 
3:52 PM
And why are you using $2 there? Where's $1?
@Zacharee1 Ah, right. Yes.
 
@terdon no idea. I'm stealing some of this from SuperSU's code
can I just do this:
 
@Zacharee1 Well, $2 is the second positional parameter. For example, if you run script.sh foo bar, then $2 will be 'bar'.
 
command >> file 2>> file?
@terdon yeah I get that
but it does work
supersu set VARNAME to $1, but I'm not using that piece
 
Ummm
You keep printing stuff to $1. What is that?
 
nothing
got rid of it
it's this now"
/sbin/cp -v /data/media/0/Documents/LGAppBak/LGSystemUI.apk /system/priv-app/LGSystemUI/LGSystemUI.apk >> /proc/self/fd/$OUTFD 2>> /proc/self/fd/$OUTFD
which works
to tell me that cp is an unknown command....
 
3:54 PM
How do you tun the script?
@Zacharee1 Well, you're telling it to use /sbin/cp for some reason. Does that exist?
 
yes
so does cp
neither works
@terdon TWRP looks for an update-bunary file in the ZIP
gtg for a bit
 
Eeek! OK, never do for i in $(ls)...
In your case, all you need is for fd in /proc/$$/fd/*
 

« first day (2344 days earlier)      last day (2635 days later) »