Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu Wang 2019-07-30 10:39:07 +08:00
commit 46d336f079
13 changed files with 1365 additions and 283 deletions

View File

@ -0,0 +1,82 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Do you prefer a live demo to be perfect or broken?)
[#]: via: (https://opensource.com/article/19/7/live-demo-perfect-or-broken)
[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeohttps://opensource.com/users/don-watkinshttps://opensource.com/users/jamesf)
Do you prefer a live demo to be perfect or broken?
======
Do you learn more from flawless demos or ones the presenter de-bugs in
real-time? Let us know by answering our poll.
![video editing dashboard][1]
At [DevFest DC][2] in June, [Sara Robinson][3], developer advocate at Google Cloud, gave the most seamless live demo I've ever witnessed.
Sara live-coded a machine model from scratch using TensorFlow and Keras. Then she trained the model live, deployed it to Google's Cloud AI platform, and used the deployed model to make predictions.
With the exception of perhaps one small hiccup, the whole thing went smoothly, and I learned a lot as an audience member.
At that evening's reception, I congratulated Sara on the live demo's success and told her I've never seen a live demo go so well. It turns out that this subject was already on her mind; Sara asked this question on Twitter less than two hours before her live demo:
> Do you prefer watching a live demo where everything works perfectly or one that breaks and the presenter has to de-bug?
>
> — Sara Robinson (@SRobTweets) [June 14, 2019][4]
Contrary to my preference for flawless demos, two-thirds of Sara's followers prefer to watch de-bugging. The replies to her poll were equally enlightening:
> I prefer ones that break once or twice, just so you know it's real. "Break" can be something small like a typo or skipping a step.
>
> — Seth Vargo (@sethvargo) [June 14, 2019][5]
> Broken demos which are fixed in real time seem to get a better reaction from the audience. This was our experience with the All-Demo Super Session at NEXT SF. Audible gasps followed by applause from the audience when the broken demo was fixed in real-time 🤓
>
> — Jamie Kinney (@jamiekinney) [June 14, 2019][6]
This made me reconsider my preference for perfection. When I attend live demos at events, I'm looking for tools that I'm unfamiliar with. I want to learn the basics of those tools, then see real-world applications. I don't expect magic, but I do want to see how the tools intend to work so I can gain and retain some knowledge.
I've gone to several live demos that break. In my experience, this has caught most presenters off-guard; they seemed unfamiliar with the bugs at hand and, in one case, the error derailed the rest of the presentation. In short, it was like this:
> Hmm, at least when the live demo fails you know it's not a video 😁
> But I don't like when the presenter start to struggle, when everything becomes silent, it becomes so awkward (especially when I'm the one presenting)
>
> — Sylvain Nouts Ⓥ (@SylvainNouts) [June 14, 2019][7]
Reading the replies to Sara's thread made me wonder what I'm really after when attending live demos. Is "perfection" what I seek? Or is it presenters who are more skilled at de-bugging in real-time? Upon reflection, I suspect that it's the latter.
After all, "perfect" code is a lofty (if impossible) concept. Mistakes will happen, and I don't expect them not to. But I _do_ expect conference presenters to know their tools well enough that when things go sideways during live demos, they won't get so flustered that they can't keep going.
Overall, this reply to Sara resonates with me the most. I attend live demos as a new coder with the goal to learn, and those that veer too far off-course aren't as effective for me:
> I dont necessarily prefer a broken demo, but I do think they show a more realistic view.
> That said, when you are newer to coding if the error takes things too far off the rails it can make it challenging to understand the original concept.
>
> — April Bowler (@A_Bowler2) [June 14, 2019][8]
I don't expect everyone to attend live demos with the same goals and perspective as me. That's why we want to learn what the open source community thinks.
_Do you prefer for live demos to be perfect? Or do you gain more from watching presenters de-bug in real-time? Do you attend live demos primarily to learn or for other reasons? Let us know by taking our poll or leaving a comment below._
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/7/live-demo-perfect-or-broken
作者:[Lauren Maffeo][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/lmaffeohttps://opensource.com/users/don-watkinshttps://opensource.com/users/jamesf
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/video_editing_folder_music_wave_play.png?itok=-J9rs-My (video editing dashboard)
[2]: https://www.devfestdc.org/
[3]: https://twitter.com/SRobTweets
[4]: https://twitter.com/SRobTweets/status/1139619990687162368?ref_src=twsrc%5Etfw
[5]: https://twitter.com/sethvargo/status/1139620990546145281?ref_src=twsrc%5Etfw
[6]: https://twitter.com/jamiekinney/status/1139636109585989632?ref_src=twsrc%5Etfw
[7]: https://twitter.com/SylvainNouts/status/1139637154731237376?ref_src=twsrc%5Etfw
[8]: https://twitter.com/A_Bowler2/status/1139648492953976832?ref_src=twsrc%5Etfw

View File

@ -0,0 +1,76 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Is This the End of Floppy Disk in Linux? Linus Torvalds Marks Floppy Disks Orphaned)
[#]: via: (https://itsfoss.com/end-of-floppy-disk-in-linux/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
Is This the End of Floppy Disk in Linux? Linus Torvalds Marks Floppy Disks Orphaned
======
_**In a recent commit to the Linux Kernel, Linus Torvalds marked the floppy disk drivers as orphaned. Could this be the beginning of the end of floppy disks in Linux?**_
Chances are that you havent seen a real floppy disk in years. And if you are looking for a computer with floppy drive, you may have to visit a museum.
More than two decades ago, floppy disks were the popular medium for storing data and running operating systems on it. The [early Linux distributions][1] were distributed using floppy disks. Floppy disks were also used extensively for saving and transferring data.
Have you ever wondered why the save icons in many applications look like a floppy? Because it IS floppy disk. Floppy disks were popular for saving data and hence many applications used it as save icons and the tradition continues till date.
![][2]
Why am I talking about floppy disks today? Because Linus Torvalds has marked floppy drivers orphaned in a commit to the Linux kernel code.
### Floppy disk drivers marked orphaned in Linux kernel
As you can read in the [commit on the GitHub mirror][3], the developer Jiri doesnt have a working computer with floppy drive anymore. Without the correct hardware, continuing the development wont be possible for Jiri. And thats why Torvalds marked it orphan
> Actual working physical floppy hardware is getting hard to find, and while Willy was able to test this, I think the driver can be considered pretty much dead from an actual hardware standpoint. The hardware that is still sold seems to be mainly USB-based, which doesnt use this legacy driver at all.
![][4]
### What does orphan mean in Linux kernel?
Orphan means that there are no developers able to or willing to support that part of code.
An orphaned module will probably get deprecated and removed eventually if no one else comes forward to continue maintaining and developing it.
[][5]
Suggested read  Valve Annouces Linux Based Gaming Operating System: SteamOS
### Its not being removed immediately
Torvalds notes that floppy drives are still used by various virtual environment emulators. So the floppy drivers wont be discarded straightway.
> The old floppy disk controller is still emulated in various VM environments, so the driver isnt going away, but lets see if anybody is interested to step up to maintain it.
Why not just keep the floppy drive support in the kernel forever? Its because this will pose a security threat. Even if there is no real computer using floppy drivers, the VMs still have it and this will leave the VMs vulnerable.
### End of an era?
Will this be the end of an era or will someone else come up and take the responsibility of keeping floppy support alive in Linux? Only time will tell.
I dont think there is any love lost here with floppy drives being orphaned in Linux kernel.
I havent used a floppy disks in last fifteen years and I doubt many people either. What about you? Have you ever used a floppy disk? If yes, when was the last time you used it?
--------------------------------------------------------------------------------
via: https://itsfoss.com/end-of-floppy-disk-in-linux/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://itsfoss.com/earliest-linux-distros/
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/floppy-disk-icon-of-saving.png?resize=800%2C300&ssl=1
[3]: https://github.com/torvalds/linux/commit/47d6a7607443ea43dbc4d0f371bf773540a8f8f4
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/End-of-Floppy-in-Linux.png?resize=800%2C450&ssl=1
[5]: https://itsfoss.com/valve-annouces-linux-based-gaming-operating-system-steamos/

View File

@ -1,169 +0,0 @@
5 ways to play old-school games on a Raspberry Pi
======
Relive the golden age of gaming with these open source platforms for Raspberry Pi.
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/arcade_game_gaming.jpg?itok=84Rjk_32)
They don't make 'em like they used to, do they? Video games, I mean.
Sure, there's a bit more grunt in the gear now. Princess Zelda used to be 16 pixels in each direction; there's now enough graphics power for every hair on her head. Today's processors could beat up 1988's processors in a cage-fight deathmatch without breaking a sweat.
But you know what's missing? The fun.
You've got a squillion and one buttons to learn just to get past the tutorial mission. There's probably a storyline, too. You shouldn't need a backstory to kill bad guys. All you need is jump and shoot. So, it's little wonder that one of the most enduring popular uses for a Raspberry Pi is to relive the 8- and 16-bit golden age of gaming in the '80s and early '90s. But where to start?
There are a few ways to play old-school games on the Pi. Each has its strengths and weaknesses, which I'll discuss here.
### Retropie
[Retropie][1] is probably the most popular retro-gaming platform for the Raspberry Pi. It's a solid all-rounder and a great default option for emulating classic desktop and console gaming systems.
#### What is it?
Retropie is built to run on [Raspbian][2]. It can also be installed over an existing Raspbian image if you'd prefer. It uses [EmulationStation][3] as a graphical front-end for a library of open source emulators, including the [Libretro][4] emulators.
You don't need to understand a word of that to play your games, though.
#### What's great about it
It's very easy to get started. All you need to do is burn the image to an SD card, configure your controllers, copy your games over, and start killing bad guys.
The huge user base means that there is a wealth of support and information out there, and active online communities to turn to for questions.
In addition to the emulators that come installed with the Retropie image, there's a huge library of emulators you can install from the package manager, and it's growing all the time. Retropie also offers a user-friendly menu system to manage this, saving you time.
From the Retropie menu, it's easy to add Kodi and the Raspbian desktop, which comes with the Chromium web browser. This means your retro-gaming rig is also good for home theatre, [YouTube][5], [SoundCloud][6], and all those other “lounge room computer” goodies.
Retropie also has a number of other customization options: You can change the graphics in the menus, set up different control pad configurations for different emulators, make your Raspberry Pi file system visible to your local Windows network—all sorts of stuff.
Retropie is built on Raspbian, which means you have the Raspberry Pi's most popular operating system to explore. Most Raspberry Pi projects and tutorials you find floating around are written for Raspbian, making it easy to customize and install new things on it. I've used my Retropie rig as a wireless bridge, installed MIDI synthesizers on it, taught myself a bit of Python, and more—all without compromising its use as a gaming machine.
#### What's not so great about it
Retropie's simple installation and ease of use is, in a way, a double-edged sword. You can go for a long time with Retropie without ever learning simple stuff like `sudo apt-get`, which means you're missing out on a lot of the Raspberry Pi experience.
It doesn't have to be this way; the command line is still there under the hood when you want it, but perhaps users are a bit too insulated from a Bash shell that's ultimately a lot less scary than it looks. Retropie's main menu is operable only with a control pad, which can be annoying when you don't have one plugged in because you've been using the system for things other than gaming.
#### Who's it for?
Anyone who wants to get straight into some gaming, anyone who wants the biggest and best library of emulators, and anyone who wants a great way to start exploring Linux when they're not playing games.
### Recalbox
[Recalbox][7] is a newer open source suite of emulators for the Raspberry Pi. It also supports other ARM-based small-board computers.
#### What is it?
Like Retropie, Recalbox is built on EmulationStation and Libretro. Where it differs is that it's not built on Raspbian, but on its own flavor of Linux: RecalboxOS.
#### What's great about it
The setup for Recalbox is even easier than for Retropie. You don't even need to image an SD card; simply copy some files over and go. It also has out-of-the-box support for some game controllers, getting you to Level 1 that little bit faster. Kodi comes preinstalled. This is a ready-to-go gaming and media rig.
#### What's not so great about it
Recalbox has fewer emulators than Retropie, fewer customization options, and a smaller user community.
Your Recalbox rig is probably always just going to be for emulators and Kodi, the same as when you installed it. If you feel like getting deeper into Linux, you'll probably want a new SD card for Raspbian.
#### Who's it for?
Recalbox is great if you want the absolute easiest retro gaming experience and can happily go without some of the more obscure gaming platforms, or if you are intimidated by the idea of doing anything a bit technical (and have no interest in growing out of that).
For most opensource.com readers, Recalbox will probably come in most handy to recommend to your not-so-technical friend or relative. Its super-simple setup and overall lack of options might even help you avoid having to help them with it.
### Roll your own
Ok, if you've been paying attention, you might have noticed that both Retropie and Recalbox are built from many of the same open source components. So what's to stop you from putting them together yourself?
#### What is it?
Whatever you want it to be, baby. The nature of open source software means you could use an existing emulator suite as a starting point, or pilfer from them at will.
#### What's great about it
If you have your own custom interface in mind, I guess there's nothing to do but roll your sleeves up and get to it. This is also a way to install emulators that haven't quite found their way into Retropie yet, such as [BeebEm][8] or [ArcEm][9].
#### What's not so great about it
Well, it's a bit of work, isn't it?
#### Who's it for?
Hackers, tinkerers, builders, seasoned hobbyists, and such.
### Native RISC OS gaming
Now here's a dark horse: [RISC OS][10], the original operating system for ARM devices.
#### What is it?
Before ARM went on to become the world's most popular CPU architecture, it was originally built to be the heart of the Acorn Archimedes. That's kind of a forgotten beast nowadays, but for a few years it was light years ahead as the most powerful desktop computer in the world, and it attracted a lot of games development.
Because the ARM processor in the Pi is the great-grandchild of the one in the Archimedes, we can still install RISC OS on it, and with a little bit of work, get these games running. This is different to the emulator options we've covered so far because we're playing our games on the operating system and CPU architecture for which they were written.
#### What's great about it
It's the perfect introduction to RISC OS. This is an absolute gem of an operating system and well worth checking out in its own right.
The fact that you're using much the same operating system as back in the day to load and play your games makes your retro gaming rig just that little bit more of a time machine. This definitely adds some charm and retro value to the project.
There are a few superb games that were released only on the Archimedes. The massive hardware advantage of the Archimedes also means that it often had the best graphics and smoothest gameplay of a lot of multi-platform titles. The rights holders to many of these games have been generous enough to make them legally available for free download.
#### What's not so great about it
Once you have installed RISC OS, it still takes a bit of elbow grease to get the games working. Here's a [guide to getting started][11].
This is definitely not a great all-rounder for the lounge room. There's nothing like [Kodi][12]. There's a web browser, [NetSurf][13], but it's struggling to catch up to the modern web. You won't get the range of titles to play as you would with an emulator suite. RISC OS Open is free for hobbyists to download and use and much of the source code has been made open. But despite the name, it's not a 100% open source operating system.
#### Who's it for?
This one's for novelty seekers, absolute retro heads, people who want to explore an interesting operating system from the '80s, people who are nostalgic for Acorn machines from back in the day, and people who want a totally different retro gaming project.
### Command line gaming
Do you really need to install an emulator or an exotic operating system just to relive the glory days? Why not just install some native linux games from the command line?
#### What is it?
There's a whole range of native Linux games tested to work on the [Raspberry Pi][14].
#### What's great about it
You can install most of these from packages using the command line and start playing. Easy. If you've already got Raspbian up and running, it's probably your fastest path to getting a game running.
#### What's not so great about it
This isn't, strictly speaking, actual retro gaming. Linux was born in 1991 and took a while longer to come together as a gaming platform. This isn't quite gaming from the classic 8- and 16-bit era; these are ports and retro-influenced games that were built later.
#### Who's it for?
If you're just after a bucket of fun, no problem. But if you're trying to relive the actual era, this isn't quite it.
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/9/retro-gaming-raspberry-pi
作者:[James Mawson][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/dxmjames
[1]: https://retropie.org.uk/
[2]: https://www.raspbian.org/
[3]: https://emulationstation.org/
[4]: https://www.libretro.com/
[5]: https://www.youtube.com/
[6]: https://soundcloud.com/
[7]: https://www.recalbox.com/
[8]: http://www.mkw.me.uk/beebem/
[9]: http://arcem.sourceforge.net/
[10]: https://opensource.com/article/18/7/gentle-intro-risc-os
[11]: https://blog.dxmtechsupport.com.au/playing-badass-acorn-archimedes-games-on-a-raspberry-pi/
[12]: https://kodi.tv/
[13]: https://www.netsurf-browser.org/
[14]: https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=51794

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (MjSeven)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,112 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (WPS Office on Linux is a Free Alternative to Microsoft Office)
[#]: via: (https://itsfoss.com/wps-office-linux/)
[#]: author: (Sergiu https://itsfoss.com/author/sergiu/)
WPS Office on Linux is a Free Alternative to Microsoft Office
======
_**If you are looking for a free alternative of Microsoft Office on Linux, WPS Office is one of the best choice. Its free to use and offers compatibility with MS Office document formats.**_
[WPS Office][1] is a cross-platform office productivity suite. It is light and fully compatible with Microsoft Office, Google Docs/Sheets/Slide and Adobe PDF.
For many users, WPS Office feels intuitive and capable enough to meet their needs. It has gained popularity because of its closeness to Microsoft Office, both in terms of looks and compatibility.
![WPS Office 2019 All In One Mode][2]
WPS office is created by Kingsoft Corporation based in China. For Windows users, WPS Office has both free and premium versions. For Linux users, WPS Office is available for free through its [community project][3].
Non-FOSS Alert!
WPS Office is not an open source software. We have covered it here because its available for free for Linux users and at times, we cover software created for Linux even if they are not open source.
### WPS Office on Linux
![WPS Office in Linux | Image Credit: Ubuntu Handbook][4]
WPS Office has four main components:
* WPS Writer
* WPS Presentation
* WPS Spreadsheet
* WPS PDF
WPS Office is fully compatible with MS Office and more, supporting .doc, .docx, .dotx, .ppt, .pptx, .xls, .xlsx, .docm, .dotm, .xml, .txt, .html, .rtf (and others), as well as its own format (.wps, .wpt). It also includes Microsoft fonts by default (to ensure compatibility), can export PDFs and provides spell checking capabilities in more than 10 languages.
However, it didnt do very well with ODT, ODP and other open document formats.
All three main WPS Office applications feature a very similar interface to Microsoft Office, with the same Ribbon UI. Although there are minor differences, the usage remains relatively the same. You can easily clone any Microsoft Office/LibreOffice document using WPS Office.
![WPS Office Writer][5]
The only thing you might dislike are some of the default styling settings (some headers having a lot of space beneath them etc.), but these can be easily tweaked.
[][6]
Suggested read  WPS Office: Microsoft Office Clone For Ubuntu!
By default, WPS saves files in .docx, .pptx and .xlsx file types. You can also save documents to the **[WPS Cloud][7]** and collaborate on them with others. Another nice addition is the possibility to download a great number of templates from [here][8].
### Install WPS Office on Linux
WPS provides DEB and RPM installer files for Linux distributions. This makes installing WPS Office an easy process if you use Debian/Ubuntu or Fedora based distributions.
You can download WPS for Linux from its download section:
[Download WPS Office for Linux][9]
Scroll down and youll find a link to the package for the latest version:
![WPS Office Download][10]
Download the appropriate file for your distribution. [Installing applications from DEB][11] or RPM file is as easy as double clicking on them. Doing so will open up a Software Center instance providing you the option to install the package:
![WPS Office Install Package][12]
After a few seconds, the application should successfully install on your system!
You can now search for **WPS** in the Applications Menu and find all applications found in the WPS Office Suite:
![WPS Applications Menu][13]
**Do you use WPS Office or something else?**
There are other [open source alternatives to Microsoft Office][14] but they have poor compatibility with the MS Office.
Personally, I prefer LibreOffice but you have to work considerably with Microsoft Office, you may try WPS Office on Linux. It looks similar to MS Office and has good compatibility with MS document formats. Its free on Linux so you dont have to worry about Office 365 subscription as well.
What office suite do you use on your system? Have you ever used WPS Office on Linux? How was/is your experience with it?
--------------------------------------------------------------------------------
via: https://itsfoss.com/wps-office-linux/
作者:[Sergiu][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/sergiu/
[b]: https://github.com/lujun9972
[1]: https://www.wps.com/
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps2019-all-in-one-mode.png?resize=800%2C526&ssl=1
[3]: http://wps-community.org/
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps-2019-Linux.jpg?resize=800%2C450&ssl=1
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps-office-writer.png?resize=800%2C454&ssl=1
[6]: https://itsfoss.com/wps-office-microsoft-office-clone-for-ubuntu/
[7]: https://account.wps.com/?cb=https%3A%2F%2Fdrive.wps.com%2F
[8]: https://template.wps.com/
[9]: http://wps-community.org/downloads
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps_office_download.jpg?fit=800%2C413&ssl=1
[11]: https://itsfoss.com/install-deb-files-ubuntu/
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps_office_install_package.png?fit=800%2C719&ssl=1
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps_applications_menu.jpg?fit=800%2C355&ssl=1
[14]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/

View File

@ -0,0 +1,262 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (3 commands to reboot Linux (plus 4 more ways to do it safely))
[#]: via: (https://opensource.com/article/19/7/reboot-linux)
[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/alanfdosshttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/sethhttps://opensource.com/users/greg-phttps://opensource.com/users/greg-phttps://opensource.com/users/sethhttps://opensource.com/users/cldxsolutions)
3 commands to reboot Linux (plus 4 more ways to do it safely)
======
Learn how to reboot Linux through many different methods, from the GUI
to deep within the command line.
![Tux with binary code background][1]
Linux is fully capable of running not weeks, but years, without a reboot. In some industries, thats exactly what Linux does, thanks to advances like **kpatch** and **kgraph**.
For laptop and desktop users, though, that metric is a little extreme. While it may not be a day-to-day reality, its at least a weekly reality that sometimes you have a good reason to reboot your machine. And for a system that doesnt need rebooting often, Linux offers plenty of choices for when its time to start over.
### Understand your options
Before continuing though, a note on rebooting. Rebooting is a unique process on each operating system. Even within [POSIX][2] systems, the commands to power down and reboot may behave differently due to different initialization systems or command designs.
Despite this factor, two concepts are vital. First, rebooting is rarely requisite on a POSIX system. Your Linux machine can operate for weeks or months at a time without a reboot if thats what you need. Theres no need to "freshen up" your computer with a reboot unless specifically advised to do so by a software installer or updater. Then again, it doesnt hurt to reboot, either, so its up to you.
Second, rebooting is meant to be a friendly process, allowing time for programs to exit, files to be saved, temporary files to be removed, filesystem journals updated, and so on. Whenever possible, reboot using the intended interfaces, whether in a GUI or a terminal. If you force your computer to shut down or reboot, you risk losing unsaved and even recently-saved data, and even corrupting important system information; you should only ever force your computer off when theres no other option**.**
### Click the button
The first way to reboot or shut down Linux is the most common one, and the most intuitive for most desktop users regardless of their OS: Its the power button in the GUI. Since powering down and rebooting are common tasks on a workstation, you can usually find the power button (typically with reboot and shut down options) in a few different places. On the GNOME desktop, it's in the system tray: 
![The GNOME power button.][3]
Its also in the GNOME **Activities** menu:
![The GNOME Activities menu power button.][4]
On the KDE desktop, the power buttons can be found in the **Applications** menu:
![The KDE power buttons via the Applications menu.][5]
You can also access the KDE power controls by right-clicking on the desktop and selecting the **Leave** option, which opens the window you see here:
![The KDE power buttons via the Leave option.][6]
Other desktops provide variations on these themes, but the general idea is the same: use your mouse to locate the power button, and then click it. You may have to select between rebooting and powering down, but in the end, the result is nearly identical: Processes are stopped, nicely, so that data is saved and temporary files are removed, then data is synchronized to drives, and then the system is powered down.
### Push the physical button
Most computers have a physical power button. If you press that button, your Linux desktop may display a power menu with options to shut down or reboot. This feature is provided by the [Advanced Configuration and Power Interface (ACPI)][7] subsystem, which communicates with your motherboards firmware to control your computers state.
ACPI is important but its limited in scope, so theres not much to configure from the users perspective. Usually, ACPI options are generically called **Power** and are set to a sane default. If you want to change this setup, you can do so in your system settings.
On GNOME, open the system tray menu and select **Activities**, and then **Settings.** Next, select the **Power** category in the left column, which opens the following menu:
![GNOMEs power button settings.][8]
In the **Suspend & Power Button** section, select what you want the physical power button to do.
The process is similar across desktops. For instance, on KDE, the **Power Management** panel in **System Settings** contains an option for **Button Event Handling.**
* * *
* * *
* * *
**![KDE Power Management][9]**
* * *
* * *
* * *
**opensource.com**
After you configure how the button event is handled, pressing your computers physical power button follows whatever option you chose. Depending on your computer vendor (or parts vendors, if you build your own), a button press might be a light tap, or it may require a slightly longer push, so you might have to do some tests before you get the hang of it.
Beware of an over-long press, though, since it may shut your computer down without warning.
### Run the systemctl command
If you operate more in a terminal than in a GUI desktop, you might prefer to reboot with a command. Broadly speaking, rebooting and powering down are processes of the _init_ system—the sequence of programs that bring a computer up or down after a power signal (either on or off, respectively) is received.
On most modern Linux distributions, **systemd** is the init system, so both rebooting and powering down can be performed through the **systemd** user interface, **systemctl**. The **systemctl** command accepts, among many other options, **halt** (halts disk activity but does not cut power) **reboot** (halts disk activity and sends a reset signal to the motherboard) and **poweroff** (halts disk acitivity, and then cut power). These commands are mostly equivalent to starting the target file of the same name.
For instance, to trigger a reboot:
```
`$ sudo systemctl start reboot.target`
```
### Run the shutdown command
Traditional UNIX, before the days of **systemd** (and for some Linux distributions, like [Slackware][10], thats _now_), there were commands specific to stopping a system. The **shutdown** command, for instance, can power down your machine, but it has several options to control exactly what that means.
This command requires a time argument, in minutes, so that **shutdown** knows when to execute. To reboot immediately, append the **-r** flag:
```
`$ sudo shutdown -r now`
```
To power down immediately:
```
`$ sudo shutdown -P now`
```
Or you can use the **poweroff** command:
```
`$ poweroff`
```
To reboot after 10 minutes:
```
`$ sudo shutdown -r 10`
```
The **shutdown** command is a safe way to power off or reboot your computer, allowing disks to sync and processes to end. This command prevents new logins within the final 5 minutes of shutdown commencing, which is particularly useful on multi-user systems.
On many systems today, the **shutdown** command is actually just a call to **systemctl** with the appropriate reboot or power off option.
### Run the reboot command
The **reboot** command, on its own, is basically a shortcut to **shutdown -r now**. From a terminal, this is the easiest and quickest reboot command:
```
`$ sudo reboot`
```
If your system is being blocked from shutting down (perhaps due to a runaway process), you can use the **\--force** flag to make the system shut down anyway. However, this option skips the actual shutting down process, which can be abrupt for running processes, so it should only be used when the **shutdown** command is blocking you from powering down.
On many systems, **reboot** is actually a call to **systemctl** with the appropriate reboot or power off option.
### Init
On Linux distributions without **systemd**, there are up to 7 runlevels your computer understands. Different distributions can assign each mode uniquely, but generally, 0 initiates a halt state, and 6 initiates a reboot (the numbers in between denote states such as single-user mode, multi-user mode, a GUI prompt, and a text prompt).
These modes are defined in **/etc/inittab** on systems without **systemd**. On distributions using **systemd** as the init system, the **/etc/inittab** file is either missing, or its just a placeholder.
The **telinit** command is the front-end to your init system. If youre using **systemd**, then this command is a link to **systemctl** with the appropriate options.
To power off your computer by sending it into runlevel 0:
```
`$ sudo telinit 0`
```
To reboot using the same method:
```
`$ sudo telinit 6`
```
How unsafe this command is for your data depends entirely on your init configuration. Most distributions try to protect you from pulling the plug (or the digital equivalent of that) by mapping runlevels to friendly commands.
You can see for yourself what happens at each runlevel by reading the init scripts found in **/etc/rc.d** or **/etc/init.d**, or by reading the **systemd** targets in **/lib/systemd/system/**.
### Apply brute force
So far Ive covered all the _right_ ways to reboot or shut down your Linux computer. To be thorough, I include here additional methods of bringing down a Linux computer, but by no means are these methods recommended. They arent designed as a daily reboot or shut down command (**reboot** and **shutdown** exist for that), but theyre valid means to accomplish the task.
If you try these methods, try them in a virtual machine. Otherwise, use them only in emergencies.
#### Proc
A step lower than the init system is the **/proc** filesystem, which is a virtual representation of nearly everything happening on your computer. For instance, you can view your CPUs as though they were text files (with **cat /proc/cpuinfo**), view how much power is left in your laptops battery, or, after a fashion, reboot your system.
Theres a provision in the Linux kernel for system requests (**Sysrq** on most keyboards). You can communicate directly with this subsystem using key combinations, ideally regardless of what state your computer is in; it gets complex on some keyboards because the **Sysrq** key can be a special function key that requires a different key to access (such as **Fn** on many laptops).
An option less likely to fail is using **echo** to insert information into **/proc**, manually. First, make sure that the Sysrq system is enabled:
```
`$ sudo echo 1 > /proc/sys/kernel/sysrq`
```
To reboot, you can use either **Alt**+**Sysrq**+**B** or type:
```
`$ sudo echo b > /proc/sysrq-trigger`
```
This method is not a reasonable way to reboot your machine on a regular basis, but it gets the job done in a pinch.
#### Sysctl
Kernel parameters can be managed during runtime with **sysctl**. There are lots of kernel parameters, and you can see them all with **sysctl --all**. Most probably dont mean much to you until you know what to look for, and in this case, youre looking for **kernel.panic**.
You can query kernel parameters using the **-value** option:
```
`$ sudo sysctl --value kernel.panic`
```
If you get a 0 back, then the kernel youre running has no special setting, at least by default, to reboot upon a kernel panic. That situation is fairly typical since rebooting immediately on a catastrophic system crash makes it difficult to diagnose the cause of the crash. Then again, systems that need to stay on no matter what might benefit from an automatic restart after a kernel failure, so its an option that does get switched on in some cases.
You can activate this feature as an experiment (if youre following along, try this in a virtual machine rather than on your actual computer):
```
`$ sudo sysctl kernel.reboot=1`
```
Now, should your computer experience a kernel panic, it is set to reboot instead of waiting patiently for you to diagnose the problem. You can test this by simulating a catastrophic crash with **sysrq**. First, make sure that Sysrq is enabled:
```
`$ sudo echo 1 > /proc/sys/kernel/sysrq`
```
And then simulate a kernel panic:
```
`$ sudo echo c > /proc/sysrq-trigger`
```
Your computer reboots immediately.
### Reboot responsibly
Knowing all of these options doesn't mean that you should use them all. Give careful thought to what you're trying to accomplish, and what the command you've selected will do. You don't want to damage your system by being reckless. That's what virtual machines are for. However, having so many options means that you're ready for most situations.
Have I left out your favorite method of rebooting or powering down a system? List what Ive missed in the comments!
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/7/reboot-linux
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/sethhttps://opensource.com/users/alanfdosshttps://opensource.com/users/sethhttps://opensource.com/users/marcobravohttps://opensource.com/users/sethhttps://opensource.com/users/greg-phttps://opensource.com/users/greg-phttps://opensource.com/users/sethhttps://opensource.com/users/cldxsolutions
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tux_linux_penguin_code_binary.jpg?itok=TxGxW0KY (Tux with binary code background)
[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains
[3]: https://opensource.com/sites/default/files/uploads/gnome-menu-power.jpg (The GNOME power button.)
[4]: https://opensource.com/sites/default/files/uploads/gnome-screen-power.jpg (The GNOME Activities menu power button.)
[5]: https://opensource.com/sites/default/files/uploads/kde-menu-power.jpg (The KDE power buttons via the Applications menu.)
[6]: https://opensource.com/sites/default/files/uploads/kde-screen-power.jpg (The KDE power buttons via the Leave option.)
[7]: https://en.wikipedia.org/wiki/Advanced_Configuration_and_Power_Interface
[8]: https://opensource.com/sites/default/files/uploads/gnome-settings-power.jpg (GNOMEs power button settings.)
[9]: https://opensource.com/sites/default/files/images/kde-power-management.jpg
[10]: http://slackware.com

View File

@ -0,0 +1,98 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Command line quick tips: More about permissions)
[#]: via: (https://fedoramagazine.org/command-line-quick-tips-more-about-permissions/)
[#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/)
Command line quick tips: More about permissions
======
![][1]
A previous article [covered some basics about file permissions][2] on your Fedora system. This installment shows you additional ways to use permissions to manage file access and sharing. It also builds on the knowledge and examples in the previous article, so if you havent read that one, do [check it out][2].
### Symbolic and octal
In the previous article you saw how there are three distinct permission sets for a file. The user that owns the file has a set, members of the group that owns the file has a set, and then a final set is for everyone else. These permissions are expressed on screen in a long listing (_ls -l_) using symbolic mode.
Each set has **r, w,** and **x** entries for whether a particular user (owner, group member, or other) can read, write, or execute that file. But theres another way to express these permissions: in **octal** mode.
Youre used to the [decimal][3] numbering system, which has ten distinct values (0 through 9). The octal system, on the other hand, has eight distinct values (0 through 7). In the case of permissions, octal is used as a shorthand to show the value of the **r, w,** and **x** fields. Think of each field as having a value:
* **r** = 4
* **w** = 2
* **x** = 1
Now you can express any combination with a single octal value. For instance, read and write permission, but no execute permission, would have a value of 6. Read and execute permission only would have a value of 5. A files **rwxr-xr-x** symbolic permission has an octal value of **755**.
You can use octal values to set file permissions with the _chmod_ command similarly to symbolic values. The following two commands set the same permissions on a file:
```
chmod u=rw,g=r,o=r myfile1
chmod 644 myfile1
```
### Special permission bits
There are several special permission bits also available on a file. These are called **setuid** (or **suid**), **setgid** (or **sgid**), and the **sticky bit** (or **delete inhibit**). Think of this as yet another set of octal values:
* setuid = 4
* setgid = 2
* sticky = 1
The **setuid** bit is ignored _unless_ the file is executable. If thats the case, the file (presumably an app or a script) runs as if it were launched by the user who owns the file. A good example of setuid is the _/bin/passwd_ utility, which allows a user to set or change passwords. This utility must be able to write to files no user should be allowed to change. Therefore it is carefully written, owned by the _root_ user, and has a setuid bit so it can alter the password related files.
The **setgid** bit works similarly for executable files. The file will run with the permissions of the group that owns it. However, setgid also has an additional use for directories. If a file is created in a directory with setgid permission, the group owner for the file will be set to the group owner of the directory.
Finally, the sticky bit, while ignored for files, is useful for directories. The sticky bit set on a directory will prevent a user from deleting files in that directory owned by other users.
The way to set these bits with _chmod_ in octal mode is to add a value prefix, such as **4755** to add setuid to an executable file. In symbolic mode, the **u** and **g** can be used to set or remove setuid and setgid, such as **u+s,g+s**. The sticky bit is set using **o+t**. (Other combinations, like **o+s** or **u+t**, are meaningless and ignored.)
### Sharing and special permissions
Recall the example from the previous article concerning a finance team that needs to share files. As you can imagine, the special permission bits help to solve their problem even more effectively. The original solution simply made a directory the whole group could write to:
```
drwxrwx---. 2 root finance 4096 Jul 6 15:35 finance
```
One problem with this directory is that users _dwayne_ and _jill_, who are both members of the _finance_ group, can delete each others files. Thats not optimal for a shared space. It might be useful in some situations, but probably not when dealing with financial records!
Another problem is that files in this directory may not be truly shared, because they will be owned by the default groups of _dwayne_ and _jill_ — most likely the user private groups also named _dwayne_ and _jill_.
A better way to solve this is to set both setgid and the sticky bit on the folder. This will do two things — cause files created in the folder to be owned by the _finance_ group automatically, and prevent _dwayne_ and _jill_ from deleting each others files. Either of these commands will work:
```
sudo chmod 3770 finance
sudo chmod u+rwx,g+rwxs,o+t finance
```
The long listing for the file now shows the new special permissions applied. The sticky bit appears as **T** and not **t** because the folder is not searchable for users outside the _finance_ group.
```
drwxrws--T. 2 root finance 4096 Jul 6 15:35 finance
```
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/command-line-quick-tips-more-about-permissions/
作者:[Paul W. Frields][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://fedoramagazine.org/author/pfrields/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2018/10/commandlinequicktips-816x345.jpg
[2]: https://fedoramagazine.org/command-line-quick-tips-permissions/
[3]: https://en.wikipedia.org/wiki/Decimal

View File

@ -0,0 +1,197 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to structure a multi-file C program: Part 1)
[#]: via: (https://opensource.com/article/19/7/structure-multi-file-c-part-1)
[#]: author: (Erik O'Shaughnessy https://opensource.com/users/jnyjnyhttps://opensource.com/users/jnyjnyhttps://opensource.com/users/jim-salterhttps://opensource.com/users/cldxsolutions)
How to structure a multi-file C program: Part 1
======
Grab your favorite beverage, editor, and compiler, crank up some tunes,
and start structuring a C program composed of multiple files.
![Programming keyboard.][1]
It has often been said that the art of computer programming is part managing complexity and part naming things. I contend that this is largely true with the addition of "and sometimes it requires drawing boxes."
In this article, I'll name some things and manage some complexity while writing a small C program that is loosely based on the program structure I discussed in "[How to write a good C main function][2]"—but different. This one will do something. Grab your favorite beverage, editor, and compiler, crank up some tunes, and let's write a mildly interesting C program together.
### Philosophy of a good Unix program
The first thing to know about this C program is that it's a [Unix][3] command-line tool. This means that it runs on (or can be ported to) operating systems that provide a Unix C runtime environment. When Unix was invented at Bell Labs, it was imbued from the beginning with a [design philosophy][4]. In my own words: _programs do one thing, do it well, and act on files_. While it makes sense to do one thing and do it well, the part about "acting on files" seems a little out of place.
It turns out that the Unix abstraction of a "file" is very powerful. A Unix file is a stream of bytes that ends with an end-of-file (EOF) marker. That's it. Any other structure in a file is imposed by the application and not the operating system. The operating system provides system calls that allow a program to perform a set of standard operations on files: open, read, write, seek, and close (there are others, but those are the biggies). Standardizing access to files allows different programs to share a common abstraction and work together even when different people implement them in different programming languages.
Having a shared file interface makes it possible to build programs that are _composable_. The output of one program can be the input of another program. The Unix family of operating systems provides three files by default whenever a program is executed: standard in (**stdin**), standard out (**stdout**), and standard error (**stderr**). Two of these files are opened in write-only mode: **stdout** and **stderr**, while **stdin** is opened read-only. We see this in action whenever we use file redirection in a command shell like Bash:
```
`$ ls | grep foo | sed -e 's/bar/baz/g' > ack`
```
This construction can be described briefly as: the output of **ls** is written to stdout, which is redirected to the stdin of **grep**, whose stdout is redirected to **sed**, whose stdout is redirected to write to a file called **ack** in the current directory.
We want our program to play well in this ecosystem of equally flexible and awesome programs, so let's write a program that reads and writes files.
### MeowMeow: A stream encoder/decoder concept
When I was a dewy-eyed kid studying computer science in the <mumbles>s, there were a plethora of encoding schemes. Some of them were for compressing files, some were for packaging files together, and others had no purpose but to be excruciatingly silly. An example of the last is the [MooMoo encoding scheme][5].
To give our program a purpose, I'll update this concept for the [2000s][6] and implement a concept called MeowMeow encoding (since the internet loves cats). The basic idea here is to take files and encode each nibble (half of a byte) with the text "meow." A lower-case letter indicates a zero, and an upper-case indicates a one. Yes, it will balloon the size of a file since we are trading 4 bits for 32 bits. Yes, it's pointless. But imagine the surprise on someone's face when this happens:
```
$ cat /home/your_sibling/.super_secret_journal_of_my_innermost_thoughts
MeOWmeOWmeowMEoW...
```
This is going to be awesome.
### Implementation, finally
The full source for this can be found on [GitHub][7], but I'll talk through my thought process while writing it. The object is to illustrate how to structure a C program composed of multiple files.
Having already established that I want to write a program that encodes and decodes files in MeowMeow format, I fired up a shell and issued the following commands:
```
$ mkdir meowmeow
$ cd meowmeow
$ git init
$ touch Makefile     # recipes for compiling the program
$ touch main.c       # handles command-line options
$ touch main.h       # "global" constants and definitions
$ touch mmencode.c   # implements encoding a MeowMeow file
$ touch mmencode.h   # describes the encoding API
$ touch mmdecode.c   # implements decoding a MeowMeow file
$ touch mmdecode.h   # describes the decoding API
$ touch table.h      # defines encoding lookup table values
$ touch .gitignore   # names in this file are ignored by git
$ git add .
$ git commit -m "initial commit of empty files"
```
In short, I created a directory full of empty files and committed them to git.
Even though the files are empty, you can infer the purpose of each from its name. Just in case you can't, I annotated each **touch** with a brief description.
Usually, a program starts as a single, simple **main.c** file, with only two or three functions that solve the problem. And then the programmer rashly shows that program to a friend or her boss, and suddenly the number of functions in the file balloons to support all the new "features" and "requirements" that pop up. The first rule of "Program Club" is don't talk about "Program Club." The second rule is to minimize the number of functions in one file.
To be honest, the C compiler does not care one little bit if every function in your program is in one file. But we don't write programs for computers or compilers; we write them for other people (who are sometimes us). I know that is probably a surprise, but it's true. A program embodies a set of algorithms that solve a problem with a computer, and it's important that people understand it when the parameters of the problem change in unanticipated ways. People will have to modify the program, and they will curse your name if you have all 2,049 functions in one file.
So we good and true programmers break functions out, grouping similar functions into separate files. Here I've got files **main.c**, **mmencode.c**, and **mmdecode.c**. For small programs like this, it may seem like overkill. But small programs rarely stay small, so planning for expansion is a "Good Idea."
But what about those **.h** files? I'll explain them in general terms later, but in brief, those are called _header_ files, and they can contain C language type definitions and C preprocessor directives. Header files should _not_ have any functions in them. You can think of headers as a definition of the application programming interface (API) offered by the **.c** flavored file that is used by other **.c** files.
### But what the heck is a Makefile?
I know all you cool kids are using the "Ultra CodeShredder 3000" integrated development environment to write the next blockbuster app, and building your project consists of mashing on Ctrl-Meta-Shift-Alt-Super-B. But back in my day (and also today), lots of useful work got done by C programs built with Makefiles. A Makefile is a text file that contains recipes for working with files, and programmers use it to automate building their program binaries from source (and other stuff too!).
Take, for instance, this little gem:
```
00 # Makefile
01 TARGET= my_sweet_program
02 $(TARGET): main.c
03    cc -o my_sweet_program main.c
```
Text after an octothorpe/pound/hash is a comment, like in line 00.
Line 01 is a variable assignment where the variable **TARGET** takes on the string value **my_sweet_program**. By convention, OK, my preference, all Makefile variables are capitalized and use underscores to separate words.
Line 02 consists of the name of the file that the recipe creates and the files it depends on. In this case, the target is **my_sweet_program**, ****and the dependency is **main.c**.
The final line, 03, is indented with a tab and not four spaces. This is the command that will be executed to create the target. In this case, we call **cc** the C compiler frontend to compile and link **my_sweet_program**.
Using a Makefile is simple:
```
$ make
cc -o my_sweet_program main.c
$ ls
Makefile  main.c  my_sweet_program
```
The [Makefile][8] that will build our MeowMeow encoder/decoder is considerably more sophisticated than this example, but the basic structure is the same. I'll break it down Barney-style in another article.
### Form follows function
My idea here is to write a program that reads a file, transforms it, and writes the transformed data to another file. The following fabricated command-line interaction is how I imagine using the program:
```
        $ meow < clear.txt > clear.meow
        $ unmeow < clear.meow > meow.tx
        $ diff clear.txt meow.tx
        $
```
We need to write code to handle command-line parsing and managing the input and output streams. We need a function to encode a stream and write it to another stream. And finally, we need a function to decode a stream and write it to another stream. Wait a second, I've only been talking about writing one program, but in the example above, I invoke two commands: **meow** and **unmeow**? I know you are probably thinking that this is getting complex as heck.
### Minor sidetrack: argv[0] and the ln command
If you recall, the signature of a C main function is:
```
`int main(int argc, char *argv[])`
```
where **argc** is the number of command-line arguments, and **argv** is a list of character pointers (strings). The value of **argv[0]** is the path of the file containing the program being executed. Many Unix utility programs with complementary functions (e.g., compress and uncompress) look like two programs, but in fact, they are one program with two names in the filesystem. The two-name trick is accomplished by creating a filesystem "link" using the **ln** command.
An example from **/usr/bin** on my laptop is:
```
   $ ls -li /usr/bin/git*
3376 -rwxr-xr-x. 113 root root     1.5M Aug 30  2018 /usr/bin/git
3376 -rwxr-xr-x. 113 root root     1.5M Aug 30  2018 /usr/bin/git-receive-pack
...
```
Here **git** and **git-receive-pack** are the same file with different names. We can tell it's the same file because they have the same inode number (the first column). An inode is a feature of the Unix filesystem and is super outside the scope of this article.
Good and/or lazy programmers can use this feature of the Unix filesystem to write less code but double the number of programs they deliver. First, we write a program that changes its behavior based on the value of **argv[0]**, then we make sure to create links with the names that cause the behavior.
In our Makefile, the **unmeow** link is created using this recipe:
```
 # Makefile
 ...
 $(DECODER): $(ENCODER)
         $(LN) -f $< $@
        ...
```
I tend to parameterize everything in my Makefiles, rarely using a "bare" string. I group all the definitions at the top of the Makefile, which makes it easy to find and change them. This makes a big difference when you are trying to port software to a new platform and you need to change all your rules to use **xcc** instead of **cc**.
The recipe should appear relatively straightforward except for the two built-in variables **$@** and **$<**. The first is a shortcut for the target of the recipe; in this case, **$(DECODER)**. (I remember this because the at-sign looks like a target to me.) The second, **$<** is the rule dependency; in this case, it resolves to **$(ENCODER)**.
Things are getting complex for sure, but it's managed.
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/7/structure-multi-file-c-part-1
作者:[Erik O'Shaughnessy][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jnyjnyhttps://opensource.com/users/jnyjnyhttps://opensource.com/users/jim-salterhttps://opensource.com/users/cldxsolutions
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming_keyboard_coding.png?itok=E0Vvam7A (Programming keyboard.)
[2]: https://opensource.com/article/19/5/how-write-good-c-main-function
[3]: https://en.wikipedia.org/wiki/Unix
[4]: http://harmful.cat-v.org/cat-v/
[5]: http://www.jabberwocky.com/software/moomooencode.html
[6]: https://giphy.com/gifs/nyan-cat-sIIhZliB2McAo
[7]: https://github.com/JnyJny/meowmeow
[8]: https://github.com/JnyJny/meowmeow/blob/master/Makefile

View File

@ -0,0 +1,285 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Top 8 Things to do after Installing Debian 10 (Buster))
[#]: via: (https://www.linuxtechi.com/things-to-do-after-installing-debian-10/)
[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/)
Top 8 Things to do after Installing Debian 10 (Buster)
======
Debian 10 code name Buster is the latest LTS release from the house of Debian and the latest release comes packed with a lot of features. So if you have already installed the Debian 10 in your system and thinking what next, then please continue reading the article till the end as we provide you with the top 8 things to do after installing Debian 10. For those who havent installed Debian 10, please read this guide [**Debian 10 (Buster) Installation Steps with Screenshots**][1]. So lets continue with the article:
<https://www.linuxtechi.com/wp-content/uploads/2019/07/Things-to-do-after-installing-debian10.jpg>
### 1) Install and Configure sudo
Once you complete setting up Debian 10 in your system, the first thing you need to do is install the sudo package as it enables you to get administrative privileges to install any package you need. In order to install and configure sudo, please use the following command:
Become the root user and then install sudo package using the beneath command,
```
root@linuxtechi:~$ su -
Password:
root@linuxtechi:~# apt install sudo -y
```
Add your local user to sudo group using the following [usermod][2] command,
```
root@linuxtechi:~# usermod -aG sudo pkumar
root@linuxtechi:~#
```
Now verify whether local user got the sudo rights or not,
```
root@linuxtechi:~$ id
uid=1000(pkumar) gid=1000(pkumar) groups=1000(pkumar),27(sudo)
root@linuxtechi:~$ sudo vi /etc/hosts
[sudo] password for pkumar:
root@linuxtechi:~$
```
### 2) Fix Date and time
Once youve successfully configured the sudo package, next thing you need to  fix the date and time according to your location. In order to fix the date and time,
Go to System **Settings** &gt; **Details** &gt; **Date and Time** and then change your time zone that suits to your location.
<https://www.linuxtechi.com/wp-content/uploads/2019/07/Adjust-date-time-Debian10.jpg>
Once the time zone is changed, you can see the time changed automatically in your clock
### 3) Apply all updates
After Debian 10 installation, it is recommended to install all updates which are available via Debian 10 package repositories, execute the beneath apt command,
```
root@linuxtechi:~$ sudo apt update
root@linuxtechi:~$ sudo apt upgrade -y
```
**Note:** If you are a big fan of vi editor then install vim using the following command apt command,
```
root@linuxtechi:~$ sudo apt install vim -y
```
### 4) Install Flash Player Plugin
By default, the Debian 10 (Buster) repositories dont come packed with the Flash plugin and hence users looking to install flash player in their system need to follow the steps outlined below:
Configure Repository for flash player:
```
root@linuxtechi:~$ echo "deb http://ftp.de.debian.org/debian buster main contrib" | sudo tee -a /etc/apt/sources.list
deb http://ftp.de.debian.org/debian buster main contrib
root@linuxtechi:~
```
Now update package index using following command,
```
root@linuxtechi:~$ sudo apt update
```
Install flash plugin using following apt command
```
root@linuxtechi:~$ sudo apt install pepperflashplugin-nonfree -y
```
Once package is installed successfully, then try to play videos in YouTube,
<https://www.linuxtechi.com/wp-content/uploads/2019/07/Flash-Player-plugin-Debian10.jpg>
### 5)  Install Software like VLC, SKYPE, FileZilla and Screenshot tool
So now weve enabled flash player, it is time to install all other software like VLC, Skype, Filezilla and screenshot tool like flameshot in our Debian 10 system.
**Install VLC Media Player**
To install VLC player in your system using apt command,
```
root@linuxtechi:~$ sudo apt install vlc -y
```
After the successful installation of VLC player, try to play your favorite videos
<https://www.linuxtechi.com/wp-content/uploads/2019/07/Debian10-VLC.jpg>
**Install Skype:**
First download the latest Skype package as shown below:
```
root@linuxtechi:~$ wget https://go.skype.com/skypeforlinux-64.deb
```
Next install the package using the apt command as shown below:
```
root@linuxtechi:~$ sudo apt install ./skypeforlinux-64.deb
```
After successful installation of Skype, try to access it and enter your Credentials,
<https://www.linuxtechi.com/wp-content/uploads/2019/07/skype-Debian10.jpg>
**Install Filezilla**
To install Filezilla in your system use the following apt command,
```
root@linuxtechi:~$ sudo apt install filezilla -y
```
Once FileZilla package is installed successfully, try to access it,
<https://www.linuxtechi.com/wp-content/uploads/2019/07/FileZilla-Debian10.jpg>
**Install Screenshot tool (flameshot)**
Use the following command to install screenshoot tool flameshot,
```
root@linuxtechi:~$ sudo apt install flameshot -y
```
**Note:** Shutter Tool in Debian 10 has been removed
<https://www.linuxtechi.com/wp-content/uploads/2019/07/flameshoot-debian10.jpg>
### 6) Enable and Start Firewall
It is always recommended to start firewall to make your secure over the network. If you are looking to enable firewall in Debian 10, **UFW** (Uncomplicated Firewall) is the best tool handle firewall. Since UFW is available in the Debian repositories, it is quite easy to install as shown below:
```
root@linuxtechi:~$ sudo apt install ufw
```
Once you have installed UFW, the next step is to set up the firewall. So, to setup the firewall, disable all incoming traffic by denying the ports and allow only the required ports like ssh, http and https.
```
root@linuxtechi:~$ sudo ufw default deny incoming
Default incoming policy changed to 'deny'
(be sure to update your rules accordingly)
root@linuxtechi:~$ sudo ufw default allow outgoing
Default outgoing policy changed to 'allow'
(be sure to update your rules accordingly)
root@linuxtechi:~$
```
Allow SSH port
```
root@linuxtechi:~$ sudo ufw allow ssh
Rules updated
Rules updated (v6)
root@linuxtechi:~$
```
In case you have installed Web Server in your system then allow their ports too in the firewall using the following ufw command,
```
root@linuxtechi:~$ sudo ufw allow 80
Rules updated
Rules updated (v6)
root@linuxtechi:~$ sudo ufw allow 443
Rules updated
Rules updated (v6)
root@linuxtechi:~$
```
Finally, you can enable UFW using the following command
```
root@linuxtechi:~$ sudo ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup
root@linuxtechi:~$
```
In case if you want to check the status of your firewall, you can check it using the following command
```
root@linuxtechi:~$ sudo ufw status
```
### 7) Install Virtualization Software (VirtualBox)
First step in installing Virtualbox is by importing the public keys of the Oracle VirtualBox repository to your Debian 10 system
```
root@linuxtechi:~$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
OK
root@linuxtechi:~$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
OK
root@linuxtechi:~$
```
If the import is successful, you will see a “OK” message displayed.
Next you need to add the repository to the source list
```
root@linuxtechi:~$ sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian buster contrib"
root@linuxtechi:~$
```
Finally, it is time to install VirtualBox 6.0 in your system
```
root@linuxtechi:~$ sudo apt update
root@linuxtechi:~$ sudo apt install virtualbox-6.0 -y
```
Once VirtualBox packages are installed successfully, try access it and start creating virtual machines,
<https://www.linuxtechi.com/wp-content/uploads/2019/07/VirtualBox6-Debian10-Workstation.jpg>
### 8) Install latest AMD Drivers
Finally, you can also install additional AMD drivers needed like the graphics card, ATI Proprietary and Nvidia Graphics drivers. To Install the latest AMD Drivers, first we must modify **/etc/apt/sources.list** file, add **non-free** word in lines which contains **main** and **contrib**, example is shown below
```
root@linuxtechi:~$ sudo vi /etc/apt/sources.list
…………………
deb http://deb.debian.org/debian/ buster main non-free contrib
deb-src http://deb.debian.org/debian/ buster main non-free contrib
deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free
deb http://ftp.us.debian.org/debian/ buster-updates main contrib non-free
……………………
```
Now use the following apt commands to install latest AMD drivers in Debian 10 system
```
root@linuxtechi:~$ sudo apt update
root@linuxtechi:~$ sudo apt install firmware-linux firmware-linux-nonfree libdrm-amdgpu1 xserver-xorg-video-amdgpu -y
```
Thats all from this article, I hope you got an idea what one should after installing Debian 10. Please do share your feedback and comments in comments section below.
--------------------------------------------------------------------------------
via: https://www.linuxtechi.com/things-to-do-after-installing-debian-10/
作者:[Pradeep Kumar][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.linuxtechi.com/author/pradeep/
[b]: https://github.com/lujun9972
[1]: https://www.linuxtechi.com/debian-10-buster-installation-guide/
[2]: https://www.linuxtechi.com/linux-commands-to-manage-local-accounts/

View File

@ -0,0 +1,86 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (OpenHMD: Open Source Project for VR Development)
[#]: via: (https://itsfoss.com/openhmd/)
[#]: author: (John Paul https://itsfoss.com/author/john/)
OpenHMD: Open Source Project for VR Development
======
In this day and age, there are open-source alternatives for all your computing needs. There is even an open-source platform for VR goggles and the like. Lets have a quick look at the OpenHMD project.
### What is OpenHMD?
![][1]
[OpenHMD][2] is a project that aims to create an open-source API and drivers for immersive technology. This category includes head-mounted displays with built-in head tracking.
They currently support quite a few systems, including Android, FreeBSD, Linux, OpenBSD, mac OS, and Windows. The [devices][3] that they support include Oculus Rift, HTC Vive, DreamWorld DreamGlass, Playstation Move, and others. They also offer support for a wide range of languages, including Go, Java, .NET, Perl, Python, and Rust.
The OpenHMD project is released under the [Boost License][4].
### More and Improved Features in the new Release
![][5]
Recently, the OpenHMD project [released version 0.3.0][6] codenamed Djungelvral. ([Djungelvral][7] is a salted licorice from Sweden.) This brought quite a few changes.
The update added support for the following devices:
* 3Glasses D3
* Oculus Rift CV1
* HTC Vive and HTC Vive Pro
* NOLO VR
* Windows Mixed Reality HMD support
* Deepoon E2
* GearVR Gen1
A universal distortion shader was added to OpenHMD. This additions “makes it possible to simply set some variables in the drivers that gives information to the shader regarding lens size, chromatic aberration, position and quirks.”
They also announced plans to change the build system. OpenHMD added support for Meson and will remove support for Autotools in the next (0.4) release.
The team behind OpenHMD also had to remove some features because they want their system to work for everyone. Support for PlayStation VR has been disabled because of some issue with Windows and mac OS due to incomplete HID headers. NOLO has a bunch of firmware version, many will small changes. OpenHMD is unable to test all of the firmware versions, so some version might not work. They recommend upgrading to the latest firmware release. Finally, several devices only have limited support and therefore are not included in this release.
[][8]
Suggested read  To Do App Remember The Milk Is Now Available For Linux
They accounted that they will be speeding up the OpenHMD release cycle to get newer features and support for more devices to users quicker. Their main priority will be to get “currently disabled devices in master ready for a patch release will be priority as well, among getting the elusive positional tracking functional for supported HMDs.”
### Final Thoughts
I dont have a VR device and have never used one. I do believe that they have great potential, even beyond gaming. I am thrill (but not surprised) that there is an open-source implementation that seeks to support many devices. Im glad that they are focusing on a wide range of devices, instead of focussing on some off-brand VR effort.
I wish the OpenHMD team well and hope they create a platform that will make them the goto VR project.
Have you ever used or encountered OpenHMD? Have you ever used VR for gaming and other pursuits? If yes, have you encountered any open-source hardware or software? Please let us know in the comments below.
If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][9].
--------------------------------------------------------------------------------
via: https://itsfoss.com/openhmd/
作者:[John Paul][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/john/
[b]: https://github.com/lujun9972
[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/openhmd-logo.png?resize=300%2C195&ssl=1
[2]: http://www.openhmd.net/
[3]: http://www.openhmd.net/index.php/devices/
[4]: https://github.com/OpenHMD/OpenHMD/blob/master/LICENSE
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/virtual-reality-development.jpg?ssl=1
[6]: http://www.openhmd.net/index.php/2019/07/12/openhmd-0-3-0-djungelvral-released/
[7]: https://www.youtube.com/watch?v=byP5i6LdDXs
[8]: https://itsfoss.com/remember-the-milk-linux/
[9]: http://reddit.com/r/linuxusersgroup

View File

@ -0,0 +1,169 @@
在树莓派上玩老式游戏的 5 种方法
======
使用这些用于树莓派的开源平台来重温游戏的黄金时代。
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/arcade_game_gaming.jpg?itok=84Rjk_32)
他们不像过去那样制造他们,是吗?我指的是电子游戏。
当然,现在的设备有点普通。赛达尔公主在过去每个方向有 16 个像素,现在她头上的每根头发都有足够的图像处理能力。今天的处理器可以在一场不费吹灰之力的战斗中打败 1988 年的处理器。
但是你知道缺少什么吗?乐趣。
你已经有了一个标准和一个按钮来学习只是为了完成教程任务。可能也有故事情节。你不应该需要一个故事情节来杀死坏人。你需要的只是跳跃和射击。因此,毫不奇怪,树莓派最持久的流行用途之一是重新体验 80 年代和 90 年代早期 8 位和 16 位游戏的黄金时代。但从哪里开始呢?
在树莓派上有几种方法可以玩老式游戏。每一种都有自己的优点和缺点,我将在这里讨论。
### Retropie
[Retropie][1] 可能是树莓派上最受欢迎的复古游戏平台。它是一个可靠的万能选手,是模拟经典桌面和控制台游戏系统的绝佳选择。
#### 它是什么?
Retropie 可以在 [Raspbian][2] 上运行。如果你愿意,它也可以安装在现有的 Raspbian 映像上。它使用 [EmulationStation][3] 作为开源仿真器库(包括 [Libretro][4] 仿真器)的图形前端。
不过,玩游戏并不需要理解上面任何一个词。
#### 它有什么好处
入门很容易。你需要做的就是将映像刻录到 SD 卡,配置你的控制器,复制游戏,然后开始杀死坏人。
庞大的用户群意味着那里有大量的支持和信息,以及活跃的在线社区可以求助问题。
除了随 Retropie 映像一起安装的仿真器之外还有一个可以从包管理器安装的庞大的仿真器库并且它一直在增长。Retropie 还提供用户友好的菜单系统来管理,节省您的时间。
从 Retropie 菜单中,可以轻松添加 Kodi 和 Raspbian 桌面,它随 Chromium 网络浏览器一起提供。这意味着您的复古游戏装备也适用于家庭影院,[YouTube](https://www.youtube.com/)[SoundCloud](https://soundcloud.com/) 以及所有其它“休息室电脑”的产品。
Retropie 还有许多其它自定义选项:你可以更改菜单中的图形,为不同的模拟器设置不同的控制板配置,使你的树莓派文件系统的所有内容对你的本地 Windows 网络可见。
Retropie 建立在 Raspbian 上,这意味着你可以使用树莓派最受欢迎的操作系统进行探索。你所发现的大多数树莓派项目和教程都是为 Raspbian 编写的,因此可以轻松地自定义和安装新内容。我已经使用我的 Retropie 装备作为无线桥接器,在上面安装了 MIDI 合成器,自学了一些 Python更重要的是 ,所有这些都没有影响它作为游戏机的用途。
#### 它有什么不太好的
Retropie 的简单安装和易用性在某种程度上是一把双刃剑。你可以玩 Retropie 很长时间,甚至不需要学习像`sudo apt-get` 这样简单的东西,但这意味着你正在错过了很多树莓派的体验。
它不一定是这样的; 当你需要它时,命令行仍然存在于打字机的罩子下,但是也许用户与 Bash shell 有点隔离,而 Bash shell 最终并没有看上去那么可怕。Retropie 的主菜单只能通过控制键盘操作,当你没有插入一个键盘时,这可能很烦人,因为你一直在使用系统进行游戏以外的事情。
#### 它适用于谁?
任何想直接进入游戏领域的人,任何想拥有最大最好的模拟器库的人,以及任何想在不玩游戏的时候开始探索 Linux 的人。
### Recalbox
[Recalbox][7] 是树莓派的一个较新的开源模拟器套件。它还支持其它基于 ARM 的小型计算机。
#### 它是什么?
与 Retropie 一样, Recalbox 基于 EmulationStation 和 Libretro 。它的不同之处在于它不是基于Raspbian 构建的,而是基于它自己的 LinuxRecalboxOS。
#### 它有什么好处
Recalbox 的设置比 Retropie 更容易。你甚至不需要对 SD 卡进行映像处理; 只需复制一些文件即可。它还为一些游戏控制器提供开箱即用的支持让你更快地达到1级。Kodi 是预装了。这是一个现成的游戏和媒体平台。
#### 它有什么不太好的
Recalbox 比 Retropie 拥有更少的仿真器,更少的自定义选项和更小的用户社区。
你的 Recalbox 装备可能总是用于模拟器和 Kodi与安装时相同。如果你想深入了解 Linux你可能需要为 Raspbian 提供一个新的SD卡。
#### 它适用于谁?
如果你想要绝对最简单的复古游戏体验,并且可以在没有一些更加模糊的游戏平台的情况下愉快地使用,或者如果你因为做一些技术性的想法而感到害怕(并且没有兴趣从中发展出来),那么 Recalbox 非常棒 。
对于大多数 opensource.com 读者来说Recalbox 可能最方便推荐给你那些不太技术的朋友或亲戚。它超级简单的设置和整体缺乏选项甚至可以帮助你避免不得不帮助他们。
### 制作你自己的
好的,如你一直在关注的话,你可能已经注意到 Retropie 和 Recalbox 都是由许多相同的开源组件构建的。那么是什么阻止你自己把它们放在一起呢?
#### 它是什么?
无论你想要什么,宝贝。开源软件的本质意味着你可以使用现有的模拟器套件作为起点,或者随意使用它们。
#### 它有什么好处
如果你有自己的自定义界面,我想除了卷起袖子去做,别无事可做。这也是安装仿真器的一种方法,仿真器还没有完全进入到 Retropie 中,例如 [BeebEm](http://www.mkw.me.uk/beebem/) 或 [ArcEm](http://arcem.sourceforge.net/)。
#### 它有什么不太好的
嗯,工作量有点大,不是吗?
#### 它适用于谁?
黑客,修改者,开发者,经验丰富的业余爱好者等。
## 本机 RISC 操所系统 游戏
现在有一匹黑马:[RISC 操作系统](https://opensource.com/article/18/7/gentle-intro-risc-os)ARM设备的原始操作系统。
#### 它是什么?
在ARM成为世界上最受欢迎的 CPU 架构之前,它最初是作为 Acorn Archimedes 的核心而构建的。现在这是一种被遗忘的野兽,但几年来它作为世界上最强大的台式计算机已经领先了很多年,并且吸引了大量的游戏开发。
因为树莓派中的 ARM 处理器是Archimedes 的曾孙,我们仍然可以在其上安装 RISC OS只要做一点工作就可以让这些游戏运行起来。这与我们到目前为止所涵盖的仿真器选项不同因为我们在操作系统和 CPU 架构上玩我们的游戏。
#### 它有什么好处
这是 RISC 操作系统的完美介绍。这绝对是操作系统的瑰宝,非常值得一试。
事实上,你使用的操作系统和以前的几乎相同,以加载和玩你的游戏,这使得你的复古游戏装备成为一个时间机器。这无疑为项目增添了一些魅力和复古价值。
有一些精彩的游戏只在 Archimedes 上发布。Archimedes 的巨大硬件优势也意味着它通常拥有许多多平台游戏的最佳图形和最流畅的游戏体验。许多游戏的版权持有者非常慷慨,可以合法地免费下载。
#### 它有什么不太好的
一旦你安装了 RISC 操作系统,它仍然需要一些努力才能让游戏运行起来。这是 [入门指南](https://blog.dxmtechsupport.com.au/playing-badass-acorn-archimedes-games-on-a-raspberry-pi/)。
对于休息室来说,这绝对不是一个很好的全方位服务。没有什么比 [Kodi](https://kodi.tv/) 更好的了。有一个网络浏览器,[NetSurf](https://www.netsurf-browser.org/)但它正在努力赶上现代网络。你将不会像使用模拟器套件那样获得要播放的标题范围。RISC OS Open 是业余爱好者可以免费下载和使用的,而且很多源代码已经开放。但尽管有这个名字,它并不是 100 的开源操作系统。
#### 它适用于谁?
这一款专为追求新奇的人、绝对怀旧的人、想要探索80年代有趣的操作系统的人、那些对过去的Acorn机器怀旧的人以及想要一个完全不同的怀旧游戏项目的人而设计。
### 命令行游戏
您是否真的需要安装模拟器或异国的操作系统才能重温辉煌的日子?为什么不从命令行安装一些原生 Linux 游戏?
#### 它是什么?
有一系列原生 Linux 游戏经过测试可以在 [树莓派](https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=51794) 上运行。
#### 它有什么好处
你可以使用命令行从程序包安装其中的大部分,然后开始玩。容易的。如果你已经启动并运行了 Raspbian那么它可能是你运行游戏的最快途径。
#### 它有什么不太好的
严格来说这并不是真正的复古游戏。Linux诞生于 1991 年,花了一段时间才能成为一个游戏平台。这不是经典的 8 位和 16 位时代的游戏;这些是后来构建的端口和受复古影响的游戏。
#### 它适用于谁?
如果你只是想找点乐子,这没问题。但如果你想重温真实的时代,那就不完全是这样了。
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/9/retro-gaming-raspberry-pi
作者:[James Mawson][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[canhetingsky](https://github.com/canhetingsky)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/dxmjames
[1]: https://retropie.org.uk/
[2]: https://www.raspbian.org/
[3]: https://emulationstation.org/
[4]: https://www.libretro.com/
[5]: https://www.youtube.com/
[6]: https://soundcloud.com/
[7]: https://www.recalbox.com/
[8]: http://www.mkw.me.uk/beebem/
[9]: http://arcem.sourceforge.net/
[10]: https://opensource.com/article/18/7/gentle-intro-risc-os
[11]: https://blog.dxmtechsupport.com.au/playing-badass-acorn-archimedes-games-on-a-raspberry-pi/
[12]: https://kodi.tv/
[13]: https://www.netsurf-browser.org/
[14]: https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=51794

View File

@ -0,0 +1,108 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (WPS Office on Linux is a Free Alternative to Microsoft Office)
[#]: via: (https://itsfoss.com/wps-office-linux/)
[#]: author: (Sergiu https://itsfoss.com/author/sergiu/)
Linux 上的 WPS Office 是 Microsoft Office 的免费替代品
======
_ **如果你在寻找 Linux 上免费的 Microsoft Office 替代品,那么 WPS Office 是最佳选择之一。它可以免费使用,并兼容 MS Office 文档格式。** _
[WPS Office][1] 是一个跨平台的办公生产力套件。它轻巧,并且与 Microsoft Office、Google Docs/Sheets/Slide 和 Adobe PDF 完全兼容。
对于许多用户而言WPS Office 具有足够直观,并且能够满足他们的需求。由于它在外观和兼容性方面与 Microsoft Office 非常相似,因此广受欢迎。
![WPS Office 2019 All In One Mode][2]
WPS office 由中国的金山公司创建。对于 Windows 用户而言WPS Office 有免费版和高级版。对于 Linux 用户WPS Office 可通过其[社区项目][3]免费获得。
非 FOSS 警告!
WPS Office 不是一个开源软件。因为它对于 Linux 用户免费使用,我们已经在这介绍过它,有时我们也会介绍即使不是开源的 Linux 软件。
### Linux 上的 WPS Office
![WPS Office in Linux | Image Credit: Ubuntu Handbook][4]
WPS Office 有四个主要组件:
* WPS 文字
* WPS 演示
* WPS 表格
* WPS PDF
WPS Office 与 MS Office 完全兼容,支持.doc、.docx、.dotx、.ppt、.pptx、.xls、.xlsx、.docm、.dotm、.xml、.txt、.html、.rtf (等其他),以及它自己的格式(.wps、.wpt。它还默认包含 Microsoft 字体(以确保兼容性),它可以导出 PDF 并提供超过 10 种语言的拼写检查功能。
但是,它在 ODT、ODP 和其他开放文档格式方面表现不佳。
三个主要的 WPS Office 应用都有与 Microsoft Office 非常相似的界面,都有相同的 Ribbon UI。尽管存在细微差别但使用仍然相对一致。你可以使用 WPS Office 轻松克隆任何 Microsoft Office/LibreOffice 文档。
![WPS Office Writer][5]
你可能唯一不喜欢的是一些默认的样式设置(一些标题下面有很多空间等),但这些可以很容易地调整。
默认情况下WPS 以 .docx、.pptx 和 .xlsx 文件类型保存文件。你还可以将文档保存到 **[WPS 云][7]**中并与他人协作。另一个不错的功能是能从[这里][8]下载大量模板。
### 在 Linux 上安装 WPS Office
WPS 为 Linux 发行版提供 DEB 和 RPM 安装程序。如果你使用的是 Debian/Ubuntu 或基于 Fedora 的发行版,那么安装 WPS Office 就简单了。
你可以在下载标签那下载Linux 中的 WPS
[Download WPS Office for Linux][9]
向下滚动,你将看到最新版本包的链接:
![WPS Office Download][10]
下载适合你发行版的文件。 只需双击 DEB 或者 RPM 就能[安装它们][11]。这会打开软件中心,你将看到安装选项:
![WPS Office Install Package][12]
几秒钟后,应用应该成功安装到你的系统上了!
你现在可以在“应用程序”菜单中搜索 **WPS**,查找 WPS Office 套件中所有的应用:
![WPS Applications Menu][13]
**你是否使用 WPS Office 或其他软件?**
还有其他 [Microsoft Office 的开源替代方案][14]但它们与 MS Office 的兼容性很差。
就个人而言,我更喜欢 LibreOffice但你必须要用到 Microsoft Office你可以尝试在 Linux 上使用 WPS Office。它看起来和 MS Office 类似,并且与 MS 文档格式具有良好的兼容性。它在 Linux 上是免费的,因此你也不必担心 Office 365 订阅。
你在系统上使用什么办公套件?你曾经在 Linux 上使用过 WPS Office 吗?你的体验如何?
--------------------------------------------------------------------------------
via: https://itsfoss.com/wps-office-linux/
作者:[Sergiu][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/sergiu/
[b]: https://github.com/lujun9972
[1]: https://www.wps.com/
[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps2019-all-in-one-mode.png?resize=800%2C526&ssl=1
[3]: http://wps-community.org/
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps-2019-Linux.jpg?resize=800%2C450&ssl=1
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps-office-writer.png?resize=800%2C454&ssl=1
[7]: https://account.wps.com/?cb=https%3A%2F%2Fdrive.wps.com%2F
[8]: https://template.wps.com/
[9]: http://wps-community.org/downloads
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps_office_download.jpg?fit=800%2C413&ssl=1
[11]: https://itsfoss.com/install-deb-files-ubuntu/
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps_office_install_package.png?fit=800%2C719&ssl=1
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/07/wps_applications_menu.jpg?fit=800%2C355&ssl=1
[14]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/