Linux General Questions

Yeah, in the video I linked to, Bryan is CONSTANTLY trying to make Stallman be pragmatic with "What ifs". Even if you don't agree with him, he is absolutely unambiguous about his beliefs, and some people don't know when to stop poking the bear.

And he very, very noticeably made the world a better place by being so uncompromising. He's right when he says that stuff matters. The more pragmatic we are about these things, the more subservient we make ourselves to corporations. And, I would submit that putting any important part of your life under the direct control of any corporation, if you have any other option at all, is a Bad Idea.

Even people, not corporations, can suddenly go evil. Stallman warned the kernel devs that using the non-free Bitkeeper system was not a good idea -- and I'm sure that Stallman pushing the idea was much of the reason why they rejected those arguments and got married to Larry McVoy. Well, someone vaguely affiliated with the kernel team decided to partially reverse-engineer some of BitKeeper, and McVoy went off sideways, took all the licenses away, and messed up kernel development real bad, for a long time.

Now, we did get "git" out of the mess, so it wasn't a wholesale loss by any means, but they really had their tails under the rocking chair there, for awhile. Linus Torvalds is one of the few people on the planet who could be deprived of a sophisticated tool like that and, in anger, singlehandedly write something much better. Most of us have no such option.

Oh, by the way, I'm pretty impressed with zsh. It looks like it will make complex shell scripts much, MUCH easier to write. The alias syntax is outstanding, and there's a ton of really, really clever stuff scattered everywhere.

I've been using bash for probably ten years now, and I think I'll be converting soon. I just need to work out how to bring over my shiny bash prompt. (zsh prompts can be even cooler, but I like mine, which I stole from someone on Ars. )

Legion, you were right: the cool kids ARE all using zsh! Thanks for cluing in this fogey.

Malor wrote:

Oh, by the way, I'm pretty impressed with zsh. It looks like it will make complex shell scripts much, MUCH easier to write. The alias syntax is outstanding, and there's a ton of really, really clever stuff scattered everywhere.

I've been using bash for probably ten years now, and I think I'll be converting soon. I just need to work out how to bring over my shiny bash prompt. (zsh prompts can be even cooler, but I like mine, which I stole from someone on Ars. )

Legion, you were right: the cool kids ARE all using zsh! Thanks for cluing in this fogey. :)

Glad you like it. I changed my default shell to zsh a few months ago, basically just cargo-culting along with the Ruby community, figuring I would actually spend time learning the cool zsh-specific stuff later (it works pretty much as a drop-in bash replacement, so you can start using it without actually using the cool zsh stuff - it took almost nothing to make my admittedly limited bash scripts work as-is with #!/bin/zsh).

Recently I started actually digging into zsh, and it is indeed very cool.

*Legion* wrote:

Glad you like it. I changed my default shell to zsh a few months ago, basically just cargo-culting along with the Ruby community, figuring I would actually spend time learning the cool zsh-specific stuff later (it works pretty much as a drop-in bash replacement, so you can start using it without actually using the cool zsh stuff - it took almost nothing to make my admittedly limited bash scripts work as-is with #!/bin/zsh).

Recently I started actually digging into zsh, and it is indeed very cool.

I am trying out zsh as well now. Struggling with tweaking the login prompt, but no more or no less than when I was trying to get my bash prompt to work correctly <-- is not a smart man.

Malor wrote:

Oh, by the way, I'm pretty impressed with zsh. It looks like it will make complex shell scripts much, MUCH easier to write. The alias syntax is outstanding, and there's a ton of really, really clever stuff scattered everywhere.

I've been using bash for probably ten years now, and I think I'll be converting soon. I just need to work out how to bring over my shiny bash prompt. (zsh prompts can be even cooler, but I like mine, which I stole from someone on Ars. )

Legion, you were right: the cool kids ARE all using zsh! Thanks for cluing in this fogey.

Share so we can steal. Mine is a simple cobbled-together thing carrying not too much information. I tend not to work in large-windowed or full-screen xterm windows so I don't want my geek code, birthdate, current caloric intake, and eye color taking up the bottom three lines of the terminal window.

Well, this is the bash prompt I'm using:

PS1="\[\e]0;\u@\h (\w)\a\]┌─[\[\e[34m\]\h\[\e[0m\]][\[\e[32m\]\w\[\e[0m\]]\n└─&gt;

It prints the machine name in brackets, the current directory in another set of brackets, and then uses some Unicode drawing characters to connect that line to the > prompt on the next line. I got that from some Ars comment, and just used it verbatim.

Here's a rather clumsily snipped snapshot of what it looks like:

IMAGE(http://www.malor.com/gamerswithjobs/bashprompt.png)

It looks like zsh should have no problem doing way, way cooler stuff, and duplicating this should be easy, but I haven't figured it out yet.

The main feature that made me try zsh, I couldn't get to work. I'd read that I could type:

[~]: cd pr/ru/ra/bl<TAB>

and it would expand or figure out I meant "cd projects/ruby/rails/blah". Could never get it to work, so I went back to bash for the time being. Need to give it another shot.

Malor wrote:

It looks like zsh should have no problem doing way, way cooler stuff, and duplicating this should be easy, but I haven't figured it out yet.

Yeah, I have had that problem as well. Your prompt looks fairly similar to the one I'm using so I believe the following should work (without the fancy unicode stuff EDIT: or colours):

"["%m"]""["%~"]"$'\n'"&gt;"

For the unicode stuff, take a look at this article. I'm not smart enough to figure it out just yet, but maybe it will be sufficient for your requirement.

[size=10]PS: Something in your post specifically is breaking the quote button. You might want to recheck the image embedding.[/size]

Bonus_Eruptus wrote:

The main feature that made me try zsh, I couldn't get to work. I'd read that I could type:

[~]: cd pr/ru/ra/bl<TAB>

and it would expand or figure out I meant "cd projects/ruby/rails/blah". Could never get it to work, so I went back to bash for the time being. Need to give it another shot.

That works for me right out-of-the-box, and it is handy indeed.

Another one of my favorites is cd path substitution. Say I am in:
/home/legion/projects/super-app/config/
.. and I think, "wait, I needed to be in mega-app, not super-app". I just go...
cd super-app mega-app
.. and it replaces super-app with mega-app and cd's me there:
/home/legion/projects/mega-app/config/

tmux is the greatest thing ever.

"Oops, I accidentally closed my terminal emulator, all my sessions are gone!"

"Oh wait..."

*reopen terminal emulator*

$ tmux list-sessions
$ tmux switch -t

"Ah, there we go."

*Legion* wrote:

tmux is the greatest thing ever.

"Oops, I accidentally closed my terminal emulator, all my sessions are gone!"

"Oh wait..."

*reopen terminal emulator*

$ tmux list-sessions
$ tmux switch -t

"Ah, there we go."

I tried it for a while, but ended up switching back to screen due to some stability issues that I encountered. How are you finding it stability-wise?

I swapped over to zsh a couple of years ago. I wanted to update my bash prompt, decided to do a bit of research, and really liked what I saw with oh-my-zsh. I was especially fond of all of the nifty source control shortcuts I'd get out of the box. These days I don't really need any of that, or much else in zsh that isn't already in bash, but I guess I'm a cool kid now too anyway. I use the xiong-chiamiov theme from oh-my-zsh.

pneuman wrote:

I tried it for a while, but ended up switching back to screen due to some stability issues that I encountered. How are you finding it stability-wise?

I haven't had any stability issues in a long time. Granted, my use of tmux isn't exactly the most strenuous, so there may be cases I don't hit.

Screen is, for all intents and purposes, a dead project. The last major release was in 2003, and the last minor patch release was 2006. It still works, but I think it's pretty clear that it's destined for bitrot, and anyone interested in working on a project like this is working on tmux instead.

Hi smart linux guys: I am looking for an easy, low-overhead, stable distribution. I will be using my laptop for Python development and not much else, so I really just want something fast and stable. I'm looking for minimal fussing. It's a dual-core AMD machine with 3 GB of memory, so it's not a netbook but it's also not a powerhouse. Really I'll just be running SublimeText, hg, and crawl when I'm bored. Any suggestions? Does it really matter? I'm looking for Linux the Operating System, not Linux the Hobby to Get Things Exactly How I Want It.

For what it's worth I've used Linux plenty in the past, but I'm out of the loop for what's currently out there.

Michael wrote:

Hi smart linux guys: I am looking for an easy, low-overhead, stable distribution. I will be using my laptop for Python development and not much else, so I really just want something fast and stable. I'm looking for minimal fussing. It's a dual-core AMD machine with 3 GB of memory, so it's not a netbook but it's also not a powerhouse. Really I'll just be running SublimeText, hg, and crawl when I'm bored. Any suggestions? Does it really matter? I'm looking for Linux the Operating System, not Linux the Hobby to Get Things Exactly How I Want It.

For what it's worth I've used Linux plenty in the past, but I'm out of the loop for what's currently out there.

Take all pronouncements with a dash of NaCl. I use Slackware with sbopkg and am very happy. I still maintain my own dependencies, but sbopkg makes use of the Slackbuilds site and mirrors for building everything you likely need from an ncurses menu. It comes with Python outta the box, as well as all he basic tools you're used to.

Slackware defaults to KDE, has no official Gnome support, but I think it comes with XFCE in the standard install.

Hope that helps.

*Legion* wrote:

tmux is the greatest thing ever.

"Oops, I accidentally closed my terminal emulator, all my sessions are gone!"

"Oh wait..."

*reopen terminal emulator*

$ tmux list-sessions
$ tmux switch -t

"Ah, there we go."

screen -ls
screen -rd

I start new screen sessions with an alias "sS=screen -S" and always name the session.

muraii wrote:
*Legion* wrote:

tmux is the greatest thing ever.

"Oops, I accidentally closed my terminal emulator, all my sessions are gone!"

"Oh wait..."

*reopen terminal emulator*

$ tmux list-sessions
$ tmux switch -t

"Ah, there we go."

screen -ls
screen -rd

I start new screen sessions with an alias "sS=screen -S" and always name the session.

And that's why I used screen before I started using tmux. tmux is just nicer.

Michael wrote:

Does it really matter?

Not really. Your choice of desktop environment will matter far more than distro.

I'm running Arch and LXDE on my netbook, but it just as easily could be Ubuntu with LXDE. There's probably a few services on by default in Ubuntu that I'd want to turn off, but that likely would take far less effort than it did setting up Arch.

Hi smart linux guys: I am looking for an easy, low-overhead, stable distribution.

My recommendation used to be Ubuntu, until all the desktops went insane simultaneously. All the Linux desktop environments I've tried, suck. Xubuntu (Ubuntu with XFCE) is just barely tolerable, but it's a huge step backwards from the usability and polish in Ubuntu 10.04, the last good version. (which is now unsupported, so you don't want that.)

I don't even know what to tell you. There aren't any easy, low-overhead, stable distributions anymore. Now that the desktop teams are all chasing goddamn tablets, they all suck.

Crunchbang? What about Arch with a lightweight DE and only the essentials installed

Malor wrote:
Hi smart linux guys: I am looking for an easy, low-overhead, stable distribution.

My recommendation used to be Ubuntu, until all the desktops went insane simultaneously. All the Linux desktop environments I've tried, suck. Xubuntu (Ubuntu with XFCE) is just barely tolerable, but it's a huge step backwards from the usability and polish in Ubuntu 10.04, the last good version. (which is now unsupported, so you don't want that.)

I don't even know what to tell you. There aren't any easy, low-overhead, stable distributions anymore. Now that the desktop teams are all chasing goddamn tablets, they all suck.

I feel that the apt-based distros (primarily Debian/Ubuntu) are still the best choice for low-overhead/stable. Whether you find working in those distros easy though is really upto how much you like/loathe the current Ubuntu default desktop. I run XFCE but then again I don't actually use the UI all that much day to day. Try a Ubuntu VM (on the EC2 free tier if you don't have spare hardware) for a few days and you'll definitely know one way or the other.

I just did a bare bones install of Debian Squeeze on an old laptop (500MHz P3, 192MB RAM) and it actually runs pretty well. I just wanted it to play around with some Ruby and C++ without the distractions of WiFi and the internet.

About 40MB free RAM with Fluxbox, emacs and some terminals running. Crazy that it's significantly less powerful than my phone at this point.

For a dual core machine like yours something like Xubuntu 12.04 probably makes sense - the interface is simple and stays out of your way.

Thanks, everyone. I just put Xubuntu on a thumb drive and will be trying it out over the holiday weekend while I'm traveling. I'm sure this is one of those questions that could be debated for eternity, but unless something really irks me it looks like Xubuntu will serve me well.

edit, followup: Xubuntu is exactly what I was looking for. I'm already getting along quite nicely.

As a very silly sidenote: I'm not sure what kind of antialiasing they have going on, but my text editor looks prettier here than it does on Windows. (I like my bigger fonts.)

I now have an "alternate OS" laptop that I'm playing with. I currently have OS X and Ubuntu 12.10 on it, although I don't know if I'll keep OS X. Now that I finally got the nVidia Optimus stuff working under Ubuntu I might have to take a peak at Xubuntu and Mint.

How's the Optimus setup doing, power/battery -wise?

I honestly couldn't give a real comparison. This is a new laptop and I've had it on AC power most of the time I've spent on it so far. That said, once I finally got Bumblebee/Optimus working properly I had it on battery for quite a while yesterday and it was going strong. I don't really have any metrics but it certainly seemed like I had plenty of run time. Since it now stops idling the discrete GPU the cooling fan turns off too. The base Intel HD 4000 seems pretty impressive by itself.

As a very silly sidenote: I'm not sure what kind of antialiasing they have going on, but my text editor looks prettier here than it does on Windows. (I like my bigger fonts.)

Yeah, I notice the same thing when web browsing on Xubuntu running on directly on real hardware; the fonts just look better than they do in Windows. Considering the long history of Linux fonts sucking, I found that to be a very pleasant surprise.

Haven't tried it in a VM, so I dunno if the "on real hardware" part is actually important or not. I don't think it would be, but VMWare's doing a lot of tricky stuff underneath.

Malor wrote:
As a very silly sidenote: I'm not sure what kind of antialiasing they have going on, but my text editor looks prettier here than it does on Windows. (I like my bigger fonts.)

Yeah, I notice the same thing when web browsing on Xubuntu running on directly on real hardware; the fonts just look better than they do in Windows. Considering the long history of Linux fonts sucking, I found that to be a very pleasant surprise.

Haven't tried it in a VM, so I dunno if the "on real hardware" part is actually important or not. I don't think it would be, but VMWare's doing a lot of tricky stuff underneath.

I've noticed the same thing on my wife's Mac, so it must just be that Windows doesn't have as slick of a setup as everyone else. ClearType was always pretty neat IMO, but it doesn't look as good as this.

Malor wrote:
As a very silly sidenote: I'm not sure what kind of antialiasing they have going on, but my text editor looks prettier here than it does on Windows. (I like my bigger fonts.)

Yeah, I notice the same thing when web browsing on Xubuntu running on directly on real hardware; the fonts just look better than they do in Windows. Considering the long history of Linux fonts sucking, I found that to be a very pleasant surprise.

Haven't tried it in a VM, so I dunno if the "on real hardware" part is actually important or not. I don't think it would be, but VMWare's doing a lot of tricky stuff underneath.

No, the important part is that Ubuntu maintains a set of patches xft/cairo/freetype that improve font rendering, particularly antialiasing behavior, and they keep improving.

I consider these patches must-have software on Linux. Ubuntu has them by default, of course, as do derived distros like Mint. Arch has an AUR package for installing them.

Windows font rendering is garbage in comparison.

Also, speaking of Linux fonts historically being bad, up until sometime in 2010, freetype's bytecode interpreter was patent encumbered. An Apple patent meant freetype could not ship with BCI enabled. Some distros like Ubuntu would ship with BCI compiled in but disabled in a config file, requiring users to go enable it themselves. After the patent expired, this situation disappeared, and everyone started getting BCI-enabled freetype.