"We apologize for any inconvenience, but an unexpected error occurred while you were browsing our site. It’s not you, it’s us. This is our fault. Detailed information about this error has automatically been recorded and we have been notified." ... or not
Good to know I'm not the only one who watches the IT Crowd. Though somehow the idea of the IT Crowd is funnier than the IT Crowd itself. Sorry, I felt like saying something Zen today.
@casey This got reported to lists.gnu.org/archive/html/bug-auctex/2014-03/msg00007.html which is not a real bug tracker. This will get lost. Any idea whether debbugs.gnu.org is a suitable place to repor this? In any case, would be interested to know if you can reproduce. there are threee people now who can reproduce besides the poster.
hey its urgent thats why asked here.! — Sud9 mins ago
If it's so urgent, give us the email address of your professor, so that we can hand in your assignment directly. With one less step in the chain, it'll be faster. What time is it due? — Gilles5 mins ago
I don't often rant against homework questions, but sometimes...
I'm thinking of posting a technically correct answer but justifying the wrong bullet point
the worst thing is that the underlying question isn't stupid, isn't answered by Wikipedia, and I can't find a dupe on U&L, so it would have been well-received if he hadn't been an idiot and just dumped his assignment
1) is incorrect because the kernel doesn't decide the availability of the shell, it's actually the hard drive that does that. If the shell doesn't exist on disk, it is deemed unavailable.
2) is also incorrect, as different users can have different login shells.
3) also is incorrect. One doesn't...
I haven't had a chance to troll someone for like a whole week.
@Ramesh /etc/passwd usually does the trick, but you should use chsh when possible because it does some safety checking like making sure the entry is valid. It's just less likely you'll break things if you use it. Also on systems that use LDAP or other auth systems, it stands a chance of doing the right thing where-as your file edit may be ignored.
Lets break it down:
Process ID numers (PID's) are numbered sequential based on the order they start up in. This it is not possible for two processes to share the same PID and each time you login you will get a new instance of a shell with a unique PID chosen by the kernel based this sequence. Y...
I can switch it up to be just 2 if you like, it's all pure FUD anyway.
Dumb question, but there are college courses where one is taught Unix? I've never come across there. Maybe I should get out more. Or is this (high) school?
@Gilles You do realise other people will be reading this, right? Do you really think it is a good idea to propagate misinformation?
@FaheemMitha It was asked as a homework question, but listing or counting files that match certain criteria is a common enough practical problem. Since the question has good answers, it should be reopened and not deleted.
Lets test it:
Test it. echo $SHELL. Now logout and login again. echo $SHELL. Rinse, wash, repeat. Same answer every time.
The login shell is fixed based on the contents of /etc/passwd for all users. The value set in that file will be the value of the login shell for each user on the system. It ...
> I'm not interested in Linux as a hobby, I'm interested in Linux for production. Therefore I'm not interested in the philosophy of excessive and overwhelmingly redundant security.
@Braiam From the about me profile of the author of the question I pulled the last quote from:
> Its not about being right, its about giving my clients what they need and want and doing it right the first time may seem to take a long time but try doing it badly the first time and then starting from scratch again.
> Disclaimer: many of my questions are edited by prissy users who care about enforcing their reputation instead of helping people with questions gain answers. People with a lot of reputation who mass-answer low quality questions have more power than people answering few high quality questions so if you see a question/answer of mine edited by someone else and it does not make sense then look at the revisions to see my original post.
@Braiam 1.2k over on SO, just barely over the assoc. bonus on U&L. And I agree, they just aren't cut out for this. And whatever servers they run are almost certainly part of some bot-net.
@Gilles isn't "(3) is not true since /etc/passwd is not the place to configure the login shell." technically wrong? I know you guys want to troll him and post technically right answers, but isn't this not even technically correct?
Some systems have that info in a directory server like LDAP or even a DB. And the option also does not speciy what configuration is being done. Maybe they want to change the AVAILABLE shells. That would be in a different file.
So my big accomplishment for the day (it's not been dud otherwise) was finally fixing something that has always bugged me in tmux, but my solution is a kludge. I'm wondering if it's worth asking on main if there is a less brain twisting way to do that.
@FaheemMitha If emacs actually was the best editor that would certainly give people a valid reason to downvote me. On the other hand they may just not appreciate ① poetry, ② humor, or ③ my harder line stances on a couple issues.
@FaheemMitha I pretty sure that's not the reason they think they have for DV'ing. I can understand why some things I said would be less attractive to a lot of users actually.
@Braiam That's kind of (a) rude, (b) uncalled for (c) irrelevant (what does his appearance have to do with anything?), and anyway, you don't know what he looks like.
@Braiam Well, it came across as a bit rude. Maybe it is meant jokingly, but it is very easy to misunderstand things in an electronic medium, so one should be careful.
@FaheemMitha This might be a cultural thing, but I didn't think it rude. At least in the places I've hung out in the world it's quite normal to pick on males (esp ones that keep beards) with jokes like that and nobody would assume it's a personal insult (and incidentally he does know what I look like because that's really me in my profile pick).
@Caleb Well, it's good you aren't offended. I've lived in different cultures, and of course cultural norms differ quite greatly. So, I personally try to be careful to avoid giving offense. I didn't use to be like that, though. I also don't think it is my business to police anyone's behavior, but like I said it did seem a bit rude to me.
@polym - I recommend not shaving. It's how most of us bearded types come by one.
But you should be careful drawing attention to it - some beards exist only to counteract congenital flaws. For instance, my beard is primarily a device to counteract my dreaded cold-chin disease - something I was unfortunately born with.
I first read the latest question as: Upvotes needed to ensure successful dual-boot
@mikeserv it all, here is where I was going with that last question. I guess "clone" is really a misgnomer, what I am doing is un-linking two clients that share a session.
This is almost a code-review question, but very *nixy and more about configuration than code. For years since I switched to tmux from screen I've had a couple of nagging issues that I could note make work the way I wanted them to. Since I setup my shell to exec into a tmux session I finally decid...
@mikeserv I've been through all of those, but I'm not sure you understand what I was trying to get at. Those are great for LAUNCHING tmux into various configs, but none of the script there help you change gears once you are in one.
You are expected to stick it out or drop back out and try again, or manually tell it the way to your intended config. I wanted a one-key binding that just DID the one thing I was doing most: unlinking two clients using the same session. As far as I can tell none of these scripts does that.
@mikeserv Well my question has a working solution for doing it the way I wan't, so "it can't be done" isn't the answer either. Did you even read what I was asking or is this just off the top of your head?
@mikeserv What? No that's entirely a different subject. I don't have a problem with processes or parenting to terminals here.
I read it and it was off the top of my head. But I also appended as far as I know to that statement - which isn't all that far in many cases. I'm very often wrong.
@mikeserv The only real problem seems to be that tmux's config file parsing is inconsistent about when it does and does not make certain expansions available, and #S is unavailable at a key moment. Forget about processes and parenting and terminals, this is an issue of how it parses a config file and how it scopes/escapes strings.
Heredocs are portable and effective means of letting the shell handle creation of and deletion of temp files.
And the shell is always there.
They're especially useful when it comes to saving information while switching sessions - file permissions can be a major problem when you're trying to save state then drop privileges - heredocs make that simple.
NOTE: @jw013 makes the following unsupported objection in the comments below:
The downvote is because self-modifying code is generally considered
bad practice. Back in the old days of tiny assembly programs it was a
clever way to reduce conditional branches and improve performance, but
...
And I put a lot of research into exactly how and why they work in that scenario.
@mikeserv I'm aware of how heredocs work (note I am already using it to solve this issue) but this question is not about heredocs. I don't even care that much thath that stays in there. The point is I'm resorting to using a shell function and spawing processes to do something that can be entered manually in tmux command mode but cannot be linked to a key binding.
From what I've read, putting a command in parentheses should run it in a subshell, similar to running a script. If this is true, how does it see the variable x if x isn't exported?
x=1
Running (echo $x) on the command line results in 1
Running echo $x in a script results in nothing, as expec...
Well, this is not something that I want to do but I ask this question to know more about Shell configuration in Unix/Linux systems. So, the situation that I want an answer to is the following -:
As we have different shells made available to us by a Unix/Linux system is it possible for us to conf...