News for hackers. Stuff that matters.
Re:Ask HN: Anyone moved to PC-BSD (TrueOS) from macOS? by TurboHaskal on Wednesday March 08, 2017 @07:21AM (#13819737)
It's awful.

The only desktop BSD I can recommend is OpenBSD.

All you need after a fresh installation is:

    echo 'xcompmgr &\nexec cwm' > ~/.xinitrc && xinit
Re:Ask HN: Anyone moved to PC-BSD (TrueOS) from macOS? by dromenkoning on Wednesday March 08, 2017 @09:22AM (#13820378)
This way a malicious user with physical access to your machine can easily get around your locked desktop by switching to tty1. It would be better to fork the xinit proces to the background and exit the tty after:

  echo 'xcompmgr &\nexec cwm' > ~/.xinitrc && xinit & && exit
Re:Ask HN: Anyone moved to PC-BSD (TrueOS) from macOS? by yebyen on Wednesday March 08, 2017 @02:49PM (#13823128)

   xinit & && exit
I don't mean to ask a silly question, but what exactly is this meant to do? (What might it do that plain old `xinit & exit` doesn't do?)

&& is a binary op meant to execute the following command if the return code of the preceding command is success (0)

& is another shell builtin that sends the command preceding it to the background, and lets the shell continue with whatever comes next...

So, at first I read your edit and thought "Oh, this will exit the shell unless X can't be started" ... but exit should be running before X ever gets around to returning, no?

I just read the man page for my favorite shell, and it says the return code for `&` is always 0. So it's clear that `& &&` will work, but I don't see anything suggesting it will do anything that `&` alone won't do.

Just want to know if you know something I don't, and I figure there's no better place to learn a new shell thing than on a HN thread about BSD OS.

Re:Ask HN: Anyone moved to PC-BSD (TrueOS) from macOS? by dromenkoning on Thursday March 09, 2017 @12:39PM (#13831026)
Nothing special going on here; my syntax is based on me not knowing the particulars of `&`. I'll try to remember using yours in the future as it's more elegant. Thanks for the reply.
Re:Ask HN: Anyone moved to PC-BSD (TrueOS) from macOS? by dijit on Wednesday March 08, 2017 @08:39AM (#13820108)
Echoing this sentiment.

FreeBSD idled heavy on my Thinkpad X201s, but OpenBSD was much better, longer battery and all the hardware worked basically flawlessly (except X11 tweaks for the middle mouse button thing, which is not exclusive to BSD).

Also wifi being handled by "ifconfig" is super nice.

Re:Ask HN: Anyone moved to PC-BSD (TrueOS) from macOS? by nicky0 on Wednesday March 08, 2017 @07:37AM (#13819806)
The wonderful world of Unix.
Re:Ask HN: Anyone moved to PC-BSD (TrueOS) from macOS? by sdegutis on Wednesday March 08, 2017 @09:35AM (#13820464)
Dunno why you're downvoted, you have a totally valid point. Trying to shoe-horn a hacker-friendly OS into a layman-friendly desktop/laptop experience is going to be painful. Extremely fun and satisfying, sure. (Well, sometimes.) But there will be pain.
Re:Ask HN: Anyone moved to PC-BSD (TrueOS) from macOS? by bandrami on Wednesday March 08, 2017 @09:45AM (#13820533)
Absolutely agree. The UNIX desktop for the most part has significantly regressed over the past decade or so; OpenBSD has at least stayed where it was.
Re:Ask HN: Anyone moved to PC-BSD (TrueOS) from macOS? by tgragnato on Wednesday March 08, 2017 @09:56AM (#13820613)
I'm waiting a llvm-compiled base to express my total admiration
Re:Ask HN: Anyone moved to PC-BSD (TrueOS) from macOS? by teh_klev on Wednesday March 08, 2017 @09:40AM (#13820499)
Ok, I'll bite, what does that do?
Re:Ask HN: Anyone moved to PC-BSD (TrueOS) from macOS? by nilved on Wednesday March 08, 2017 @09:42AM (#13820516)
`.xinitrc` is loaded by xinit when you start X; they're adding `exec cwm` to use cwm as their window manager.
Re:Ask HN: Anyone moved to PC-BSD (TrueOS) from macOS? by teh_klev on Wednesday March 08, 2017 @10:00AM (#13820642)
Appreciated.