raspberry pi4_如何将Raspberry Pi 4用作廉价PC

raspberry pi4

You can probably have too many computers. I have a big desktop machine. And a laptop. Plus several connected to TVs and 3D printers. I recently set up a new shop in the backyard and I was tired of dragging the laptop out there to work and then dragging it back in. I didn’t want to spend a lot to put something out there partly for economics and partly because it is a shed and not terribly secure. So I thought of a Raspberry Pi.

您可能拥有太多计算机。 我有一台大型台式机。 和一台笔记本电脑。 加上一些连接到电视和3D打印机的内容。 我最近在后院开设了一家新商店,我厌倦了将笔记本电脑拖到那里去工作,然后再拖回去。我不想花很多钱在那儿放一些东西,部分原因是为了经济,部分是因为它是棚子,不是很安全。 所以我想到了Raspberry Pi。

You are undoubtedly aware of the Raspberry Pi. Little boards that run Linux and don’t cost very much. However, they also haven’t quite been what most people expect out of a working PC. That is until recently. The Raspberry Pi 4 is not available and while the basic models still fall short of a good desktop computer, you can now get models with 4G and even 8G of memory and still spend less than $100.

您无疑知道Raspberry Pi。 运行Linux且价格不高的小板。 但是,它们也不是大多数人期望的能正常工作的PC所期望的。 那是直到最近。 Raspberry Pi 4尚不可用,虽然基本型号仍无法提供出色的台式计算机,但您现在可以获得具有4G甚至8G内存的型号,而花费仍不到100美元。

So I set one up and after a little trial and error, I’m pretty happy with it. But I did learn a few things that I’ll share with you.

因此,我进行了设置,经过一番尝试和错误之后,我对此非常满意。 但是我确实学到了一些我将与您分享的东西。

1.您确实想要至少64GB的Class 10 SD卡 (1. You really want at least a 64GB Class 10 SDCard)

Image for post
Class 10 cards have this logo
10级卡片上有此徽标

The Pi uses the SDCard as its hard drive so this isn’t the place to cheap out. Class 10 is faster than the cheaper ones, and a 64 GB card isn’t very expensive anymore. UHS1 and UHS3 cards should also work but will cost more.

Pi使用SDCard作为其硬盘驱动器,因此这里不是便宜的地方。 Class 10比便宜的要快,而64 GB的存储卡已不再昂贵。 UHS1和UHS3卡也应该可以使用,但价格会更高。

2.忘记Ubuntu和64位操作系统 (2. Forget Ubuntu and 64-bit Operating Systems)

I really wanted to install Ubuntu and that is possible now — at least the server edition. It is pretty easy to upgrade to a full desktop version. The problem? A lot of software that is out for the Pi isn’t out for 64-bit yet. In particular Vivaldi — a great Web browser isn’t ready for 64-bit ARM yet. One day, this won’t matter, but for today, stick with the 4GB system and the 32-bit Raspberry Pi OS which, like Ubuntu, is based on Debian.

我真的很想安装Ubuntu,现在至少可以安装服务器版本。 升级到完整的桌面版本非常容易。 问题? Pi推出的许多软件尚未推出64位。 特别是Vivaldi -一款出色的Web浏览器尚未为64位ARM做好准备。 有一天,这无关紧要,但是直到今天,仍要坚持使用4GB系统和32位Raspberry Pi OS,后者像Ubuntu一样,是基于Debian的。

3. KDE等离子很好... (3. KDE Plasma is Fine… Sort of)

By default, the OS runs a lightweight desktop, but I miss KDE. Luckily, the Pi has plenty of power to run Plasma (the KDE desktop manager). There was one snag, though. After modifying config.txt to work with my HDMI monitor (look at hdmi_mode), everything was fine until I got to the login screen. There were three problems here. First, compositing blows the video card’s mind.

默认情况下,该操作系统运行一个轻量级的桌面,但是我想念KDE。 幸运的是,Pi具有运行Plasma(KDE桌面管理器)的强大功能。 但是,有一个障碍。 修改config.txt以使其与我的HDMI监视器一起使用 (查看hdmi_mode)之后,一切都很好,直到进入登录屏幕为止。 这里有三个问题。 首先,合成会打击视频卡。

Unfortunately, the sddm login manager apparently uses compositing and I couldn’t figure out how to turn it off. However, lightdm works. The only problem there is you can’t select a different session. So here are the basic steps you need to follow (as root) after you install kde-full (apt install kde-full).

不幸的是,sddm登录管理器显然使用了合成,我不知道如何关闭它。 但是,lightdm有效。 唯一的问题是您无法选择其他会话。 因此,这是安装kde-full(apt安装kde-full)之后需要(以root用户身份)执行的基本步骤。

Image for post
Untick the Enable compositor on startup box
取消选中启动时启用合成器框

First, run dpkg-reconfigure lightdm and select lightdm to be the display manager. Second, you need to set the x-session-manager alternative to /usr/bin/startkde. Do that with update-alternatives --config x-session-manager. Finally, once you get to the desktop, the screen will be scrambled. Press Alt+Shift+F12 to get the screen to normal. This turns off compositing. Go to system settings and on the display settings, untick the box to automatically start compositing. This will keep you from having to remember to press Alt+Shift+F12 again after you reboot.

首先,运行dpkg-reconfigure lightdm并选择lightdm作为显示管理器。 其次,您需要将x-session-manager设置为/ usr / bin / startkde。 使用update-alternatives --config x-session-manager做到这一点。 最后,一旦进入桌面,屏幕就会被打乱。 按Alt + Shift + F12可使屏幕恢复正常。 这将关闭合成。 转到系统设置,然后在显示设置上,取消选中该框以自动开始合成。 这将使您不必记住在重新启动后再次按Alt + Shift + F12组合键。

4.你不能只买树莓派 (4. You Can’t Just Buy the Pi)

The Pi is cheap, but you still need a monitor, a micro HDMI cable, a USB-C power supply, an SDCard, a keyboard, and a mouse. Still, you may have some of those things already and even if you don’t you can still come in at under $100 if you pick up a second-hand monitor. Some companies sell ready-made kits.

Pi很便宜,但是您仍然需要监视器,微型HDMI电缆,USB-C电源,SD卡,键盘和鼠标。 尽管如此,您可能已经拥有了其中的一些东西,即使您没有,如果您拿起二手显示器,仍可以100美元以下的价格购得。 一些公司出售现成的套件。

Image for post

The Pi 4 runs hot, so you may want a case and a fan, too. However, the 3D printed case in the picture above runs fine with no fan, and with or without the fan, cases are cheap and plentiful. Just make sure you get one that will fit the Pi 4.

Pi 4的温度很高,因此您可能还需要外壳和风扇。 但是,上图中的3D打印外壳在没有风扇的情况下也可以正常运行,无论有没有风扇,外壳都非常便宜和丰富。 只需确保获得适合Pi 4的设备即可。

If you have two monitors, the Pi will drive them both. Just be aware, that there are limits on how high a resolution the Pi can drive, so my Retina display isn’t getting the maximum use. Instead of buying a micro HDMI to full-size HDMI cable, I bought a little dongle that converts a micro HDMI plug into a full-sized socket. This is a little cheaper if you already have HDMI cables and it is also more versatile.

如果您有两个显示器,则Pi会同时驱动它们。 请注意,Pi可以驱动的分辨率有限制,因此我的Retina显示器无法获得最大的使用率。 我没有购买微型HDMI到全尺寸HDMI电缆,而是购买了一个小加密狗,将微型HDMI插头转换为全尺寸插座。 如果您已经有了HDMI电缆,这会便宜一些,而且用途也更广泛。

5.管理期望 (5. Manage Expectations)

The thing works great. But let’s face it. It is a $100 worth of hardware all in. It isn’t going to do amazing 3D graphics. It isn’t going to be lightning-fast. It isn’t going to work effortlessly all the time. For example, I’ve had freezes with system settings, on occasion. You probably don’t want 500 tabs open in your browser.

事情很好。 但是,让我们面对现实吧。 它是一台价值100美元的硬件。它不会做出色的3D图形。 它不会闪电般快。 它不会一直轻松工作。 例如,有时我冻结了系统设置。 您可能不希望在浏览器中打开500个标签。

Swap space is pretty important here. I set up ZSWAP and also installed swapspace — topics for another article. ZSWAP is a little involved, but swapspace is as easy as apt install swapspace.

交换空间在这里非常重要。 我设置了ZSWAP,还安装了swapspace,这是另一篇文章的主题。 ZSWAP有点涉及,但是swapspace和apt install swapspace一样apt install swapspace

祝好运! (Good Luck!)

I’ll admit the setup was a little hairy, but now that it is running fine, I sometimes forget I’m not on my big machine. The network is fast and there are USB3 ports. For the money, it is really hard to beat.

我承认设置有点麻烦,但现在运行良好,有时我会忘记自己不在大型计算机上。 网络速度很快,并且有USB3端口。 为了钱,这真的很难被击败。

翻译自: https://medium.com/for-linux-users/how-to-use-a-raspberry-pi-4-as-a-cheap-pc-68b697a7ca8

raspberry pi4

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值