« first day (1696 days earlier)      last day (3271 days later) » 
00:00 - 15:0015:00 - 23:00

3:14 PM
@blade19899 Certificates are only as valuable as the value a person or employer values them at. Same as a degree.
Are you looking for a job in web development?
I remember Luis saying getting Linux certification from the Linux Foundation really helped him, but I guess that's a different field.
 
@Serg I have no idea:
0
Q: Blocking Start of Terminal

imallettIf you type this simple test command: gnome-terminal -x bash -c "ls;sleep 3" You will find that it returns immediately (the newly created terminal, of course, lingers for three seconds). This is in contrast to, say, rxvt (same command but with e). If you want a blocking start, the historical...

 
@Seth I like Linux.
But, wait and see.
 
Moral of the story, @ThomasW., use the latest LTS :P
 
3:34 PM
@Mateo Ah. Opium ;P
 
@A.B. well, let's just wait for OP to come back (if he/she ever will ) and explain his question. I've no clue what OP's trying to do either as rxvt and gnome terminal behave the same for me
 
So you want that the command you use opens a new terminal window, executes the ls command, waits 3 seconds, then closes the terminal window and returns control to the first terminal window now, so that you can't continue in the first window, while the second one is open. Correct? — ByteCommander 9 mins ago
Maybe that? (cc @A.B.)
 
If I open a terminal and start the command, then I can continue my work in the first terminal. I understand nothing.
 
@A.B. OOoookay, I think I got it. He wants a new instance of the terminal
 
I have a new instance
 
3:44 PM
--disable-factory
             Do  not  register with the activation name server, do not re-
             use an active terminal.
 
an independent instance
 
I think what he wants is to be sure that the next process he will launch will only start after the current one has finished.
For reasons that are beyond my uderstanding, the GNOME folks decided that gnome-terminal -x "foo" should be run as though it were gnome-terminal -x "foo" &. No idea why, but that can screw you over if you are using it in a script for example.
And rxvt does work this way on my system.
 
On mine too.
 
yes, I agree
 
Man the GNOME folks like to screw things up.
 
3:48 PM
:)
 
They have this beautiful thing and keep breaking it to add new "features".
 
But why do I need a new terminal when the other terminal to be blocked?
 
But does it say anywhere the disable-factory does not work any more?
It does not block, but they don't declare that on the manpage...
 
@ByteCommander the github page I've posted, couple other sources, gnome-terminal man page does not show it, so . . .
 
@ByteCommander I have removed my comment
 
3:55 PM
@terdon So . . . .OP basically wants to have next application to lauch only when first finished, like ls && sleep 3 ?
 
@Serg Yes, I think. \
See the linked SO question
2
Q: Python: Start new terminal on Linux and wait for it to finish/exit

robevSame situation as my other question: Python: Start new command prompt on Windows and wait for it finish/exit except that I need it to work on Linux. If you don't feel like reading the other question: I want to open some new terminal windows and have each execute a command, and I want the parent ...

 
user136984
Ooh... This is nice! :)
 
user136984
I'm being flooded with rep every day!
 
user136984
It's like it's rain, and I'm a Rain God! ;)
 
@ParanoidPanda ^_^ I love those days
 
4:07 PM
@ParanoidPanda You could share that flood with me. It's pretty dry here since a few weeks or almost months... :(
 
user136984
:D
 
OK, I answered the asynchronous terminal question. Man, gnome-terminal won't even let you use $! !
 
I've posted mine as well
 
@terdon I have an approach as well, but would need a bit more research until it's complete...
 
anyhow, I gtg guys. Later o/
 
4:19 PM
@Serg No, that's the other way around
It already works that way, the OP wants to NOT be able to use the parent terminal until the child exits.
 
4:31 PM
@terdon is there an elegant way to transfer information from one terminal to another without using a file?
 
@ByteCommander I don't think so no. They run separate shell sessions. You could do something clever by parsing the running terminal's env but that will be hard to get to since gnome-terminal & does not return the right PID. You would have to check all open gnome-terminal instances and that is cumbersome.
 
I can find out the PID of the bash instance inside the child terminal there and I can monitor a PID and wait until it terminates from the parent terminal. But I don't know how to tell the parent terminal the PID I found out inside the child terminal.
 
4:43 PM
@ByteCommander which is why I used a tmpfile, yeah.
 
Okay, I will do that then too.
@terdon What is the recommended location for temp files? I can't use mktemp as I have to create the file inside the child terminal and read and delete it immediately from the parent terminal.
 
@ByteCommander So why can't you use mktemp?
And the recommended location is /tmp
 
Because mktemp gives me a filename.
 
@ByteCommander It also creates it
 
And then I know the filename inside the child terminal.
 
4:47 PM
Yes, run mktemp before launching the child.
 
But I need the file to get accessed from outside!
And how does the child then know the filename?
 
So? tt=$(mktemp); gnome-terminal -x bash -c "foo=$tt"
 
Oh.
I did not know the variable will be accessible from the child terminal too...
Then I have to copy that from your answer too. :-/
 
The $tt is expanded in your current session so its value will be passed to the child shell.
It is not actually accessible to the child but you can pass it on.
 
Hm? I don't understand that now...
 
4:56 PM
Is it just me or is WinBlow$ 10 is looking more like a Linux Distro?
 
PIDFILE=$(mktemp);gnome-terminal -x bash -c "ls;ps -o pid= -C bash;sleep 30"; while sudo apt-get install rxvt $PIDFILE; while ps -p $("cat $PIDFILE") > /dev/null 2>&1; do sleep 1; done; echo "terminated"
Why does that command not execute?
When I try to run it, I get the > prompt as if I was going to enter a multiline command.
 
> means you got an error, probably related to an open " , ' or ` or a done ( >:))
 
@ByteCommander Missing a done
You have 2 while; do... but only one done.
 
terdon \o
 
Hey @rinz!
 
5:05 PM
Ah.
Sure.
Thanks...
 
There are other problems there though.
Why are you installing PIDFILE?
 
Oh, it has mixed up something.
That command is crap anyway...
 
Also, it's generally a good idea to avoid CAPITAL variable names in shell scripting to be sure they don't conflict with env vars.
 
I must have accidentally inserted some older commands through up-arrow or whatever.
 
5:06 PM
@Rinzwind Oh, someone answered that?
 
oh yes :D it is briljant
I saw another gem today on SO
how do you prevent rm -rf in a directory....
create a file name `-i`
how briljant is that? :D :D
rm picks the file up and thinks it is a setting _O-
 
1
Q: What is the best way to document an OUTCOME to an answered question?

RichardWhat is the preferred community way of documenting an outcome after applying or trying a particular answer? Sometimes I get some great but different approaches to solve my problem. I'd love to be able to justify why I selected one good answer over another equally qualified one. I want to do mor...

 
o_O
 
@Rinzwind It is indeed! Well done @Helio!
 
PIDFILE=$(mktemp);gnome-terminal -x bash -c "ls;ps -o pid= -C bash;sleep 30"; while !-s $PIDFILE; done; while ps -p $("cat $PIDFILE") > /dev/null 2>&1; do sleep 1; done; echo "Process finished at $(date +"%F %T")."
 
5:10 PM
@Rinzwind Tsk, that's too easy to work around: rm -- *
 
@terdon noooo....
you create a FILE named -- and they you think hard whether -- comes before -i ;)
 
This creates crap as it replaces the !-s with an old command! why?
 
@Rinzwind Huh?
@ByteCommander Because that's what ! means in bash. You need a test construct: [ ! -s $PIDFILE]
 
@terdon hey we create a -i so why not a -- ;-)
 
5:11 PM
to counter the -i D:
 
:P
Oh my...
 
@Rinzwind Heh, no, but that does create a file that's harder to delete than -.
 
6
Q: Convert a File to directory

MaythuxAs we know "Everything in Linux" is a file, and moreover directory is just a file containing other files. So, I don't know if this "crazy idea" possible, but it should be in someway according to the above principle. In simple words, how could I change an existing empty file into a directory. Is...

I want an upvote not a thank you :P
time for The witcher 3 :=D laterz
 
@terdon Does not work
It tells me the temp file does not exist.
When does it get deleted?
 
 
5:19 PM
@Mitch lol
@ByteCommander What do you mean?
 
And as soon as I switch the language over to English with LANG=C, it just hangs up with no output, does not open the other window and has to be aborted with 2x ^C
So I can only give you the German output.
ipc-admin@MaxData-Desktop-Ubuntu:~$ pidfile=$(mktemp);gnome-terminal -x bash -c "ls;ps -o pid= -C bash>$pidfile;sleep 30"; while [ ! -s $pidfile ]; do sleep 1; done; while ps -p $("cat $pidfile") > /dev/null 2>&1; do sleep 1; done; echo "terminated"
bash: cat /tmp/tmp.IyceFQqp2c: Datei oder Verzeichnis nicht gefunden
terminated
ipc-admin@MaxData-Desktop-Ubuntu:~$
"Datei oder ..." means "file or directory not found."
 
Works fine here.
 
o.O
Why are all my machines messed up!!??
 
Ah, no, hang on
I get the same error message, the rest of it seems to work
let me try to understand what you're doing
 
I planned to pass the PID of the child's bash instance via the temp file over to the parent. Then I read the PID and wait until that process dies from the parent terminal.
I hope that is what I am actually doing.
The first while should wait until I saved the PID to the file (until file size is != 0)
 
5:25 PM
No, I saw the problem.
 
Yes, please?
 
$("cat $pidfile") is wrong, that tries to run cat $pidfile as a single command.
You want $(cat "$pidfile")
But why are you looking for bash instances? That will find all running bash shells.
 
No error any more.
But it does not stop after the terminal closes either!
 
hang on a sec
 
It hangs in the second loop.
 
5:30 PM
@ByteCommander Yes. Probably because you have other bash sessions running. Itself, for example. Since you're running ps -C bash, you will find all open bash sessions and your script will only exit when there are none.
 
@terdon So I replace that with ps | grep bash | cut -d' ' -f2
 
@ByteCommander How will that help? I don't see how you can identify which bash instance is running in the spawned terminal.
 
Try, it works.
 
What does? ps | grep bash will fail by definition. It will also find the PID of the grep.
That's what pgrep is for.
 
ipc-admin@MaxData-Desktop-Ubuntu:~$ ps
  PID TTY          TIME CMD
 7053 pts/2    00:00:00 bash
 7520 pts/2    00:00:00 ps
 
5:37 PM
@ByteCommander Yes, now do ps | grep bash
 
   By default, ps selects all processes with the same effective user ID
   (euid=EUID) as the current user and associated with the same terminal
   as the invoker.  It displays the process ID (pid=PID), the terminal
   associated with the process (tname=TTY), the cumulated CPU time in
   [DD-]hh:mm:ss format (time=TIME), and the executable name (ucmd=CMD).
   Output is unsorted by default.
 
Ugh, never mind, I was thinking of ps -au
 
ipc-admin@MaxData-Desktop-Ubuntu:~$ ps | grep bash
 7053 pts/2    00:00:00 bash
 
@ByteCommander So what works? What's the entire command?
 
This is my final working version I will post as answer:
 pidfile=$(mktemp);gnome-terminal -x bash -c "ls;ps|grep bash|cut -d' ' -f2>$pidfile;sleep 3"; while [ ! -s $pidfile ]; do sleep 1; done; terminalpid=$(cat "$pidfile"); rm $pidfile; while ps -p $terminalpid > /dev/null 2>&1; do sleep 1; done; echo "terminated"
Without the final echo probably.
And it polls the state every second. Can I make that faster by replacing the sleep 1 command with something to wait only 100ms or so?
 
5:40 PM
OK, but use pgrep instead, it's much simpler:
No, scratch that, pgrep will search for all open instances.
 
Ok, then not. What about a faster alternative for sleep?
 
Ah, this should work:
   -s, --session sid,...
          Only match processes whose process session ID is listed.  Session ID 0 is translated into pgrep's or pkill's own session ID.
So:
pidfile=$(mktemp);gnome-terminal -x bash -c "ls;pgrep -s 0 bash>$pidfile;sleep 3"; while [ ! -s $pidfile ]; do sleep 1; done; terminalpid=$(cat "$pidfile"); rm $pidfile; while ps -p $terminalpid > /dev/null 2>&1; do sleep 1; done; echo "terminated"
 
Would work too.
But is there any difference then between ps and pgrep -s?
 
@ByteCommander I don't think so, not in this context. It's just shorter :)
 
Oh. sleep supports float numbers.
 
5:45 PM
Oh! We're idiots! Just use $$, no point in mucking about with pgrep or ps!
 
It's the PID of the current shell.
 
:) oh....
Nice.
Does not work @terdon!
 
Yes. I'm seeing that. Hmm...
 
Invalid file descriptor?
Then I'll stay with your pgrep -s
 
5:49 PM
@ByteCommander Huh? No, the file remains empty for me.
 
It shows that error in the child terminal for me.
pidfile=$(mktemp);gnome-terminal -x bash -c "ls;pgrep -s 0 bash>$pidfile;sleep 3"; while [ ! -s $pidfile ]; do sleep 0.1; done; terminalpid=$(cat "$pidfile"); rm $pidfile; echo "launched"; while ps -p $terminalpid > /dev/null 2>&1; do sleep 0.1; done; echo "terminated"
This works. I'll start writing the answer.
 
6:03 PM
@ByteCommander here's a shorter version using some more tricks:
pidfile=$(mktemp);gnome-terminal -x bash -c "ls;echo \$$>$pidfile;sleep 5"; until [ -s $pidfile ]; do sleep 0.2; done; terminalpid=$(cat "$pidfile"); rm $pidfile; while kill -0 $terminalpid &> /dev/null; do sleep 0.2; done
 
Oh, thanks.
I am actually almost finished with my answer.
Let's see...
I will probably just add that.
 
@ByteCommander Yes, feel free to use it. That's your idea, I just simplified it a little. Still your work.
 
@terdon I read about kill -0 too, but it is not that good.
It will also return non-zero if one does not have permissions to kill the process.
 
@ByteCommander Ah, but that shouldn't be an issue here.
 
6:07 PM
This is probably irrelevant for this case, but might give troubles to future readers who want to use it for different things.
So I better stay with the safe alternative here.
Nd the $$ just needed an \ to escape it?
@NathanOsman Hi Nathan! :)
 
@ByteCommander Yes. Without it, the $$ was expanded inside the calling shell, not by the daughter shell.
Hey NathanOsman
 
I will probably apply that one then.
 
6:29 PM
@terdon Would you mind checking it for errors now? askubuntu.com/a/627105/367990
And maybe leaving an upvote... :)
 
@terdon @ByteCommander You both get my upvote :)
 
@Mitch Thanks. I am currently adding a paragraph to explain the advantage over terdon's approach.
@terdon I spotted a big disadvantage in your command. Please see the comment below your answer.
 
6:56 PM
Erm, if I flag a comment, do the reviewers see the other comments around too or not?
Because there are a few more comments on the same question that should be treated equally.
So do I have to flag them all or is it enough to flag one of them?
@Mitch Question about comment flags ^
 
What is the question in question?
 
I am talking about the last 4 comments of the OP of this question: askubuntu.com/questions/446579/…
It's not offensive, but superfluous and not helpful. Especially capitalization and begging for help.
If it was one comment, I would not have paid attention to that, as it is just a minor problem for the site.
But I think 4 comments of the same similar type should be reported.
 
The other comments can be seen, you can flag for shouting. I'll go ahead and take care of it.
 
So (if you would not do this now, but for the next time) I should just flag one comment in a bad sequence instead of all of them, right?
 
Right. But it will help if you mention that in the flag as well.
BBT
 
user136984
7:09 PM
Did you hear that people have been hacking billboards and putting pornographic images on them?
 
where
@ParanoidPanda where
 
user136984
Well, I haven't read very much into it, so I don't know where, but somewhere! :D
 
user136984
The article is here, so you can read it.
 
user136984
:)
 
@ParanoidPanda ohh
 
user136984
7:11 PM
As it is the FBI, I guess America.
 
user136984
But I only read the headline! :D
 
Buckhead, Atlanta, USA
@Mudit ^
@ParanoidPanda But that's somehow cool, isn't it?
 
@ParanoidPanda who might be behind north korea
 
I mean, it was a man, so that is not really what I would like to watch...
But that this is so easy...
 
user136984
@ByteCommander: Oh, was it a man? I didn't read the article, so I have no idea! It didn't really interest me enough to have a look, so I just read the headline, and announced it here! :D
 
7:15 PM
I think it's funny, as long as those who hacked it don't switch over to serious things.
But changing images of a billboard...
 
@ParanoidPanda It says all of the servers involved in the apparent hacking and their locations.
 
user136984
 
user136984
7:54 PM
Minty is gone!
 
user136984
>:)
 
:)
 
@ParanoidPanda Looks like you did a little rain dance for me! :)
Gained 50 rep today...
 
user136984
:D
 
I need also rain. :)
 
user136984
8:00 PM
@A.B.: Then you'll need to invite the Rain God for tea! ;D :P
 
user136984
Oh dear...
 
user136984
Why is it just calling me Paranoid?! >:{
 
user136984
:D
 
user136984
Oh right, it's shortening the longer usernames down!
 
Better Paranoid than ByteComma...
Maybe I should insert a space between Byte and Commander
 
user136984
8:03 PM
@ByteComman: This is what I see! ;D
 
user136984
I see the 'n'!
 
user136984
But you don't! :D
 
Hmm... Then your screen resolution is better than mine.
1280x1024 here
 
user136984
@ByteCommander: 1366x768 over here.
 
No wonder then.
 
user136984
8:09 PM
@ByteCommander: Do you have a favourite type of question that you like to cast close votes on?
 
user136984
I always go for the off-topic ones! >:)
 
user136984
And don't often just go by a general filter.
 
I often filter out duplicates.
Too lazy to read more than one question for a single close vote. :)
 
user136984
@ByteCommander: Oh, you can filter out things? I thought you could just ask for specifically those things... So how do you filter things out, or am I just completely blind and haven't noticed something really obvious? ;D :P
 
You have a list of checkboxes.
 
user136984
8:12 PM
Where?
 
So instead of ticking one, I tick all but one.
 
user136984
I didn't notice them! :D
 
Screenshooting...
 
user136984
@ByteCommander: You are shooting your screen?
 
hi
 
user136984
8:14 PM
Greetings! We are the undead! We are here to devourer your flesh. >:)
 
stabs @ParanoidPanda in the back of the neck with an ice pick
 
user136984
@ByteCommander: How does that help?
 
user136984
@ByteCommander: Do you want me to hack your file system??! ;D :P
 
user136984
:D
 
8:15 PM
Copied to the wrong field...
 
user136984
Oh... I always wondered what that button did! :D
 
Click it and you will know.
 
user136984
And I think that I clicked on it once and saw that!
 
That's why humans are curious!
 
user136984
But just forgot afterwards! :P
 
user136984
8:18 PM
@TheX Turns into a panda...
 
It was worth a try...
 
@ParanoidPanda So what?
You will have to turn @TheX into a bamboo plant too then...
 
user136984
I then give @TheX a big hug and crush him to death with my loving kindness.
 
:D
How nice of you...
 
user136984
Yes, I saved him from the miseries of life.
 
8:24 PM
has died
 
user136984
Ooh!
 
user136984
Nearly 100 upvotes!
 
user136984
98
Q: Terminal 'incognito mode'?

Paranoid PandaI use Terminal a lot, and sometimes I am running commands, which aren't things I don't want others to see, but more commands that if I accidentally arrowed up to and accidentally executed would cause a lot of trouble. So I am wondering if there is, or I can make, some sort of Terminal 'incognito...

 
user136984
Never had that many before! :)
 
user136984
@TheX: The panda's children will feed on your rotting flesh.
 
user136984
8:28 PM
Anyway!
 
user136984
This is getting a little bit odd, enough! ;D :P
 
@ParanoidPanda I want such a question too! pouting...
 
500 with only one question. Not bad my friend.
 
user136984
@ByteCommander: Yes, well the main answerer has done the nice community thing and has turned his post into a community wiki, but I'm not giving up my harvest of upvotes! >:)
 
user136984
:D :P
 
8:30 PM
0
Q: Using Ubuntu 14 running from CD to install windows 7 on empty HDD

AmadeuI'm quite new to Linux. The reason I decided to use it has to do with a problem I had on my laptop: The display is broken and my friend was about to put it to garbage. So the disk was removed and wiped out. But I though this Samsung RV510 could still be very useful if only I could use it with ...

This isn't possible, is it? ^
 
user136984
I'll have to read the post...
 
user136984
But the title doesn't look hopeful.
 
0
Q: How do I add URLs to comments?

Pilot6I can't quite get how to add inline links to comments. There are some aliases like[edit] but I see that people add other useful links this way. Where can I find list of these aliases, or add inline links manually?

 
@ParanoidPanda Wants to run the windows installer from Ubuntu live CD. Because Windows installer does not use the external monitor, which Ubuntu does, and the internal is defect.
 
Windows installer from the Live CD?
 
8:36 PM
mhm.
Sounds impossible.
 
8:56 PM
0
Q: What is the difference between home$ and ~$?

user239887I'm learning Linux introductory and i'm kinda confused right now. In the below screenshot i did not able to understand the third shortcut of Table 2-1. It says that cd ~user_name will change the working directory to the home directory of the user_name.But when i entered this command i was in the ...

 
9:28 PM
Docker sent me a survey to name their next product and asked for the first thing I thought of for the word "radius".
I answered "authentication" :P
 
@NathanOsman What I would think of:
 
That's a radish :P
 
user136984
@ByteCommander: I don't think he'll have much luck, but who knows (the guy with the Windows post)!
 
Yeah.
Same word origin.
 
user136984
Anyway, I'll leave you to your tasty discussions!
 
user136984
9:32 PM
I'm off to bed now, goodnight! :)
 
night Panda!
 
@ByteCommander The only way I could see doing that is not touching disk at all and making dev/sda a raw partition in vbox or something. Then mounting the iso from the thumb drive and installing that way, but you'ld need to install drivers for the real hardware not the virtual hardware too - so... more complicated a question than fits a simple QA
 
@hbdgaf Don't tell me, write a comment (or answer)...
 
I'm so not touching that one. It's begging for dragging on comments and a non-answer.
 
true...
 
9:50 PM
0
Q: How to obtain Docker image ID from API after building?

Nathan OsmanAccording to the Docker v1.18 API documentation, the /build method accepts a TAR stream (with a Dockerfile) and attempts to build the image. However, unless I'm missing something, there seems to be no way to obtain the image ID after the build process completes. For example, I'm using the go-do...

There's gotta be a simple explanation.
 
give it a name while you build, then you can docker inspect name-or-container-id or similar via the api
my sprint through using docker a little resources.infosecinstitute.com/…
 
Hmm... I forgot about inspect.
Yeah, that could certainly work.
 
divided attention. chat, new episode of wayward pines, and trying to find a local in network doc to refill my crazy-pills. hopefully it was helpful.
 
@ByteCommander there was a custom grub disk I rember that could then launch drives, maybe look into that
 
I'm not sure you can chainload an iso that is uefi aware... in fact, I seem to recall that you cannot.
 
10:01 PM
Ah uefi... that always throws a wrench in things
All my computers are still bios's ;p
 
If it's not uefi aware, there is this discussion askubuntu.com/questions/367011/boot-windows-7-iso-from-grub2
 
Having written a bootloader once a while back, yes - a BIOS is much simpler.
 
10:50 PM
<-- is installing DD-WRT on a router he just got
 
00:00 - 15:0015:00 - 23:00

« first day (1696 days earlier)      last day (3271 days later) »