如何使用树莓派在家办公?

电子森林 2020-04-18 00:00

看到这篇发布在树莓派官网上的文章,对于我这种树莓派小白来讲,信息量还是很大的,转发一下给树莓派的爱好者们。


树莓派4的性能已经足够强大,可以替代台式电脑用做家庭办公,或者作为你的第二电脑,比如视频电话,对于我来讲,就是设计电路、调试电路板喽。


文中介绍了如何配置树莓派,如何使用一些常用的工具,当然Google Doc、Hangout之类的功能我们用不了,但你可以用KiCad啊,还有很多其它基于云的业务都可以用。下面是原文:



Working from home with your Raspberry Pi


Raspberry Pi 4 is more than powerful enough to serve as replacement desktop computer while you’re working from home. Or as a secondary desktop to help you out while you’re doing other things, such video conferencing, on your main computer.

Raspberry Pi 4 Model B

If you’re pulling your Raspberry Pi out of a drawer right now, you should make sure you update it with the latest version of Raspbian; if it’s been a while since you used this Raspberry Pi, you might even want to install a new copy of Raspbian so you know you’re working from a good base image. Fortunately, you can use our new imaging utility, which makes installing a fresh copy of the operating system much easier.

Connecting a monitor, keyboard, and Mouse

I normally use my Raspberry Pis headless as a server. But working from home, and using Raspberry Pi as your primary computer, you’re going to need a monitor, keyboard, and mouse.

My Raspberry Pi 4, which I use for video calls, perched on the edge of my desk at home

Except for the monitor, the Raspberry Pi Desktop Kit has everything you need to get you going, including a USB-C power supply and all the necessary cables.

Connecting a keyboard and a mouse to your Raspberry Pi just involves plugging them in, although you should probably make sure you plug them into the USB 2 rather than the USB 3 sockets. You can tell these apart by their colour: USB 3 sockets have blue ‘tongues’, while USB 2 sockets have black ones.

USB 2 sockets (left), USB 3 sockets (middle), and Ethernet socket (right)

Raspberry Pi 4 has two micro HDMI sockets, allowing you to use it with dual monitors if you wish: it supports one 4K screen at 60fps, or two 4K screens at 30fps.

Power (USB-C) socket (left),  two micro-HDMI sockets (middle), and the headphone jack (right)

You can connect Raspberry Pi to any HDMI monitor (or two) you have in the house — you’ll only need a micro-HDMI to HDMI cable (or two) to do it. There are two of these included in the Desktop Kit.

While the official Raspberry Pi keyboard and mouse are great, I’ve picked up a smaller wireless keyboard and mouse for added convenience and fewer wires.

Setting up wireless networking

Setting up wireless networking on Raspberry Pi can be done from your desktop. Alternatively, you can also set up networking before you boot your Raspberry Pifor the first time by editing a file on the boot partition of your SD card after you burn the operating system onto it.

$ cd /Volumes/boot
$ nano wpa_supplicant.conf

Then add the following lines to the wpa_supplicant.conf file:

country=COUNTRY
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="SSID"
psk="PASSWORD"
key_mgmt=WPA-PSK
}

COUNTRY should be set the two-letter ISO/IEC alpha2 code for the country in which you are using your Raspberry Pi, e.g.:

  • GB (United Kingdom)

  • FR (France)

  • DE (Germany)

  • US (United States)

  • SE (Sweden)

SSID is the ESSID of your home network, with PASSWORD being the WPA2 password for that network.

It’s important to enter the correct country code in the file, as this will determine which regulatory domain your Raspberry Pi thinks it’s operating in, and therefore which wireless channels it enables on your adaptor.

Setting up email

For many of us, our email lives in our browsers these days, so just navigate to your normal email provider in Chromium and you will be able to use it as normal.

However, you can get your email directly to your Raspberry Pi desktop if you want to do that. Raspbian ships with the Claws Mail client, which supports both POP3 and IMAP standards. Although some ISPs still use the POP3 protocol, IMAP access is the more commonly used, especially when it comes to most of the web-based services like Google’s Gmail.

Using Microsoft Office

Some workplaces will prefer that you use MS Office. Raspbian ships with Libre Office, and there is no native version of Microsoft Office applications that run on Raspberry Pi. However, you can use Office directly in your browser.

Using Microsoft Office in the browser

Navigate to office.com and log in with your Microsoft Live account to access the free version; if your company subscribes to Office 365, you should be able to log in with your work username and password.

Using Google Docs and Drive

Designed to be used in web browsers, Google Docs, Sheets, Slides, and Formswork out of the box on Raspberry Pi.

Using Google Docs on the Raspberry Pi

Like all the other Google applications you can access Google Drive directly in your browser from your Raspberry Pi. However if needed you can mount Google Drive using FUSE as part of the file system.

Setting up a VPN client

It’s really easy to find advice and tutorials on how to set up a VPN server for Raspberry Pi. Finding information on how to set up your Raspberry Pi as a VPN client, to allow it to connect to your existing work VPN back in the office, is much harder.

How you get your Raspberry Pi to talk to your office VPN is going to depend on exactly which type of VPN your company uses. So reach out to your company’s IT team to ask them for advice.

Using OpenVPN

The OpenVPN protocol is one of the youngest VPN protocols; it is open-source and generally considered one of the more secure protocols.

To get OpenVPN working on Raspberry Pi, first you’ll need to install the OpenVPN package:

$ sudo apt-get install openvpn

Then you’ll need to create a client.conf configuration file in /etc/openvpn.

client
dev tun

proto udp
remote HOSTNAME PORT

resolv-retry infinite
nobind

user nobody
group nogroup

persist-key
persist-tun

# Path to your certificates (ca.crt, client.crt, and client.key)
ca FILEPATH_CA
cert FILEPATH_CRT
key FILEPATH_KEY

ns-cert-type server
comp-lzo
verb 3

Replace HOSTNAME and PORT with the name and port number of your company’s VPN server, and FILEPATH_CAFILEPATH_CRT, and FILEPATH_KEY with the fully resolved path to your ca.rtclient.crt, and client.key certificate files; you can obtain this information from your company’s IT people. While these files normally live alongside your configuration file in /etc/openvpn, it isn’t necessary to have them saved there if you really want them to live somewhere else.

Then in a terminal window, type:

$ sudo openvpn /etc/openvpn/client.conf

You should then be connected to your company’s VPN via OpenVPN.

Using PPTP

The Point Tunneling Protocol (PPTP) is an older VPN protocols, and despite known vulnerabilities, it is still one of the more widely used ones because it’s integrated into Windows, macOS, and Linux. If your workplace offers other protocols, such as OpenVPN, I suggest that you choose one of these instead, since they are more secure. However, if you do need to use PPTP, you can do so on Raspberry Pi.

First you’ll need to install the PPTP package:

$ sudo apt-get install pptp-linux

Then go ahead and create a /etc/ppp/peers/pptp-config file to hold your PPTP configuration, and copy and paste the following into the file:

pty "pptp HOSTNAME --nolaunchpppd --debug"
name USERNAME
password PASSWORD
remotename PPTP
require-mppe-128
require-mschap-v2
refuse-eap
refuse-pap
refuse-chap
refuse-mschap
noauth
debug
persist
maxfail 0
defaultroute
replacedefaultroute
usepeerdns

Replace HOSTNAMEUSERNAME, and PASSWORD with the name of your company’s VPN server, your own username, and your password.

Then in a terminal window, type:

$ sudo pon /etc/ppp/peers/pptp-config

You should then be connected to your company’s VPN via PPTP.

Using L2TP/IPSec

Because of the lack of confidentiality inherent in the Layer 2 Tunneling Protocol (L2TP), it is normally used in conjunction with another protocol called IPSec. Unfortunately setting up an L2TP/IPSec client on Raspberry Pi is somewhat more involved than using either OpenVPN or PPTP.

If your company supports it, I’d opt to use OpenVPN rather than trying to get L2TP/IPsec up and working on Raspberry Pi.

One alternative approach is to swap out Raspberry Pi’s default wireless management for Network Manager and use the Network Manager widget to setup L2TP/IPSec instead of the default tools. It’s probably easier than trying to set things up via the command line, but if you run into problems, it’s going to be somewhat harder to figure out what is going wrong.

Setting up video conferencing

To get video conferencing working with Raspberry Pi, you’ll need three things: a way to get audio out of Raspberry Pi, a way to get audio in, and a camera so that people can see you.

Adding audio

Setting up audio out for your Raspberry Pi is normally fairly easy. You can just plug a set of headphones into the audio jack, or use the speakers in your computer monitor connected via HDMI, and Raspberry Pi should just figure things out for you.

If you’re not getting sound out of your Raspberry Pi, either via the audio jack or the built-in speakers in your monitor, you might need to set audio output manuallyusing the raspi-config tool.

Unfortunately, Raspberry Pi doesn’t have any native audio input capability. The simplest way to to add audio input is to use a USB microphone. These range from a cheap and cheerful mini USB microphone, designed for basic sound capture, to much more impressive ones designed for podcasting.

Alternatively, you can get a compatible USB sound card, which means that you may be able to use a wired headset and microphone with a standard audio jack. But be warned, most USB sound cards don’t provide any gain for passive mics, so you’ll need to provide a good signal.

Adding a camera

The absolutely easiest way to add a camera to your Raspberry Pi for video conferencing is just to plug in a USB webcam. If your camera offers a built-in microphone, like the Razor Kiyo, and your monitor has built-in speakers, then your camera can provide your audio as well as video.

You can test your USB web camera using the fswebcam package.

If you’ve got a Raspberry Pi Camera Module, it’s possible to use that as well — just make sure you configure the Camera Module using raspi-config. You will however need to have a separate microphone, as the Raspberry Pi Camera Module doesn’t have one built in.

Using Google Hangouts

Google Hangouts works in your browser and doesn’t require a client. You should be able to navigate to hangouts.google.com or click directly on the meeting link in your calendar or email.

Google Hangouts on the Raspberry Pi desktop

However, the first time you open Hangouts, despite giving permission for the app to access your camera and microphone, you might find that it thinks that access has been denied.

To fix this problem, navigate to the padlockicon in your browser’s address bar and click on it. This will open a drop-down menue letting you mark both the Camera and Microphone as ‘Allow’. Select ‘Allow’ for both the camera and microphone, even if they are set to ‘Allow’ already.

The permissions drop-down menu in Google Hangouts

Close the drop-down menu by clicking on the cross in the top right-hand corner of the dialog window. Doing so add a bar at the top of your window prompting you to ‘Reload’. Click on ‘Reload’. This time, Google Hangouts should be able to access your camera and microphone.

This trick may also be handy for some other video conferencing applications.

Using Zoom

While there isn’t a Zoom desktop client for Raspberry Pi, you can run the Zoom client application, or even host a meeting, directly in the browser.

Open your browser, navigate to join.zoom.us, and enter the meeting ID and password; if you have received an email invitation, you can click directly on the meeting request URL in the email.

Click on the ‘Cancel’ button when prompted to ‘Open xdg-open’ by Zoom

Then, when you get asked to ‘Open xdg-open?’ in the system dialog that opens, click on ‘Cancel’.

Next click on the ‘click here’ link near the bottom of the page where it says “If nothing prompts from browser, click here to launch the meeting…”. Another ‘Open xdg-open?’ system dialog will open, and you need to click on ‘Cancel’ again.

Then you should see a new “start from your browser” link in really small font at the bottom of the page. Go ahead and click on the this link.

Your Zoom meeting should now start normally in your browser.

Using Skype

There is a Skype web client, which works out of the box on Raspberry Pi. Just navigate to web.skype.com and log in as normal.

Setting up Citrix Workspace (Citrix Receiver)

It’s possible to use Citrix Receiver on your Raspberry Pi, because Citrix offers a prepackaged Linux binary for the ARM architecture that will run without problems on Raspberry Pi.

Download the ‘Full Package (Self-Service Support)’ for Debian Linux, picking the ‘Citrix Workspace app for Linux (ARM HF)’ package.

Then install it by typing into a terminal window:

$ sudo dpkg -I iaclient_19.12.0.19_armhf.deb

You can then find the newly installed client in main desktop menu.

The newly installed Citrix Workspace client

Clicking on the Citrix icon will open a pop-up menu asking you to accept the EULA and then prompting you to add an account. Here you need to enter your work email or the server address provided by your company’s IT people.

Setting up a VNC client

Raspbian includes the VNC Connect client from RealVNC. To open it, navigate to the start menu, click on ‘Internet’, and then on ‘VNC Viewer’.

VNC Viewer connected to my Mac mini

Type the host name of the computer you’re trying to reach into the address bar of the VNC Viewer. You’ll be prompted for a username and password to authenticate to your remote computer. Your remote desktop should appear in a window. You can access the window setting by mousing over near the middle top of the window where a small drop-down panel will appear.

Wrapping things up

I’d been a freelance journalist for years before joining Raspberry Pi, so I perfected my home-working setup a long time ago; but I’m still finding it incredibly useful having a Raspberry Pi set up at the corner of my desk.

A number of our colleagues here at Pi Towers are are using a Raspberry Pi as their main work-from-home computer, or as a supplementary device for conferencing and file-sharing. We’re also seeing a very large number of people, both in our team and out in the community, using Raspberry Pi as a computer for kids to do homework on (an absolute necessity in so many households where parents are using all the available computers to do their own work on!).

If you’ve found any clever work-from-home workarounds that you’d like to share, please let us know about them below.

祝贺大家周末愉快!


准备好参加下周的智能车竞赛的培训哦,并帮助广而告之!


电子森林 讲述电子工程师需要掌握的重要技能: PCB设计、FPGA应用、模拟信号链路、电源管理等等;不断刷新的行业新技术 - 树莓派、ESP32、Arduino等开源系统;随时代演进的热点应用 - 物联网、无人驾驶、人工智能....
评论
  • 流量传感器是实现对燃气、废气、生活用水、污水、冷却液、石油等各种流体流量精准计量的关键手段。但随着工业自动化、数字化、智能化与低碳化进程的不断加速,采用传统机械式检测方式的流量传感器已不能满足当代流体计量行业对于测量精度、测量范围、使用寿命与维护成本等方面的精细需求。流量传感器的应用场景(部分)超声波流量传感器,是一种利用超声波技术测量流体流量的新型传感器,其主要通过发射超声波信号并接收反射回来的信号,根据超声波在流体中传播的时间、幅度或相位变化等参数,间接计算流体的流量,具有非侵入式测量、高精
    华普微HOPERF 2025-01-13 14:18 474浏览
  • ARMv8-A是ARM公司为满足新需求而重新设计的一个架构,是近20年来ARM架构变动最大的一次。以下是对ARMv8-A的详细介绍: 1. 背景介绍    ARM公司最初并未涉足PC市场,其产品主要针对功耗敏感的移动设备。     随着技术的发展和市场需求的变化,ARM开始扩展到企业设备、服务器等领域,这要求其架构能够支持更大的内存和更复杂的计算任务。 2. 架构特点    ARMv8-A引入了Execution State(执行状
    丙丁先生 2025-01-12 10:30 464浏览
  • 随着数字化的不断推进,LED显示屏行业对4K、8K等超高清画质的需求日益提升。与此同时,Mini及Micro LED技术的日益成熟,推动了间距小于1.2 Pitch的Mini、Micro LED显示屏的快速发展。这类显示屏不仅画质卓越,而且尺寸适中,通常在110至1000英寸之间,非常适合应用于电影院、监控中心、大型会议、以及电影拍摄等多种室内场景。鉴于室内LED显示屏与用户距离较近,因此对于噪音控制、体积小型化、冗余备份能力及电气安全性的要求尤为严格。为满足这一市场需求,开关电源技术推出了专为
    晶台光耦 2025-01-13 10:42 492浏览
  • 在不断发展的电子元件领域,继电器——作为切换电路的关键设备,正在经历前所未有的技术变革。固态继电器(SSR)和机械继电器之间的争论由来已久。然而,从未来发展的角度来看,固态继电器正逐渐占据上风。本文将从耐用性、速度和能效三个方面,全面剖析固态继电器为何更具优势,并探讨其在行业中的应用与发展趋势。1. 耐用性:经久耐用的设计机械继电器:机械继电器依靠物理触点完成电路切换。然而,随着时间的推移,这些触点因电弧、氧化和材料老化而逐渐磨损,导致其使用寿命有限。因此,它们更适合低频或对切换耐久性要求不高的
    腾恩科技-彭工 2025-01-10 16:15 97浏览
  • 数字隔离芯片是现代电气工程师在进行电路设计时所必须考虑的一种电子元件,主要用于保护低压控制电路中敏感电子设备的稳定运行与操作人员的人身安全。其不仅能隔离两个或多个高低压回路之间的电气联系,还能防止漏电流、共模噪声与浪涌等干扰信号的传播,有效增强电路间信号传输的抗干扰能力,同时提升电子系统的电磁兼容性与通信稳定性。容耦隔离芯片的典型应用原理图值得一提的是,在电子电路中引入隔离措施会带来传输延迟、功耗增加、成本增加与尺寸增加等问题,而数字隔离芯片的目标就是尽可能消除这些不利影响,同时满足安全法规的要
    华普微HOPERF 2025-01-15 09:48 49浏览
  • 食物浪费已成为全球亟待解决的严峻挑战,并对环境和经济造成了重大影响。最新统计数据显示,全球高达三分之一的粮食在生产过程中损失或被无谓浪费,这不仅导致了资源消耗,还加剧了温室气体排放,并带来了巨大经济损失。全球领先的光学解决方案供应商艾迈斯欧司朗(SIX:AMS)近日宣布,艾迈斯欧司朗基于AS7341多光谱传感器开发的创新应用来解决食物浪费这一全球性难题。其多光谱传感解决方案为农业与食品行业带来深远变革,该技术通过精确判定最佳收获时机,提升质量控制水平,并在整个供应链中有效减少浪费。 在2024
    艾迈斯欧司朗 2025-01-14 18:45 44浏览
  • 电动汽车(EV)正在改变交通运输,为传统内燃机提供更清洁、更高效的替代方案。这种转变的核心是电力电子和能源管理方面的创新,而光耦合器在其中发挥着关键作用。这些不起眼的组件可实现可靠的通信、增强安全性并优化电动汽车系统的性能,使其成为正在进行的革命中不可或缺的一部分。光耦合器,也称为光隔离器,是一种使用光传输电信号的设备。通过隔离高压和低压电路,光耦合器可确保安全性、减少干扰并保持信号完整性。这些特性对于电动汽车至关重要,因为精确控制和安全性至关重要。 光耦合器在电动汽车中的作用1.电池
    腾恩科技-彭工 2025-01-10 16:14 75浏览
  • 根据Global Info Research(环洋市场咨询)项目团队最新调研,预计2030年全球无人机电池和电源产值达到2834百万美元,2024-2030年期间年复合增长率CAGR为10.1%。 无人机电池是为无人机提供动力并使其飞行的关键。无人机使用的电池类型因无人机的大小和型号而异。一些常见的无人机电池类型包括锂聚合物(LiPo)电池、锂离子电池和镍氢(NiMH)电池。锂聚合物电池是最常用的无人机电池类型,因为其能量密度高、设计轻巧。这些电池以输出功率大、飞行时间长而著称。不过,它们需要
    GIRtina 2025-01-13 10:49 173浏览
  • 随着通信技术的迅速发展,现代通信设备需要更高效、可靠且紧凑的解决方案来应对日益复杂的系统。中国自主研发和制造的国产接口芯片,正逐渐成为通信设备(从5G基站到工业通信模块)中的重要基石。这些芯片凭借卓越性能、成本效益及灵活性,满足了现代通信基础设施的多样化需求。 1. 接口芯片在通信设备中的关键作用接口芯片作为数据交互的桥梁,是通信设备中不可或缺的核心组件。它们在设备内的各种子系统之间实现无缝数据传输,支持高速数据交换、协议转换和信号调节等功能。无论是5G基站中的数据处理,还是物联网网关
    克里雅半导体科技 2025-01-10 16:20 442浏览
  •   在信号处理过程中,由于信号的时域截断会导致频谱扩展泄露现象。那么导致频谱泄露发生的根本原因是什么?又该采取什么样的改善方法。本文以ADC性能指标的测试场景为例,探讨了对ADC的输出结果进行非周期截断所带来的影响及问题总结。 两个点   为了更好的分析或处理信号,实际应用时需要从频域而非时域的角度观察原信号。但物理意义上只能直接获取信号的时域信息,为了得到信号的频域信息需要利用傅里叶变换这个工具计算出原信号的频谱函数。但对于计算机来说实现这种计算需要面对两个问题: 1.
    TIAN301 2025-01-14 14:15 103浏览
  • PNT、GNSS、GPS均是卫星定位和导航相关领域中的常见缩写词,他们经常会被用到,且在很多情况下会被等同使用或替换使用。我们会把定位导航功能测试叫做PNT性能测试,也会叫做GNSS性能测试。我们会把定位导航终端叫做GNSS模块,也会叫做GPS模块。但是实际上他们之间是有一些重要的区别。伴随着技术发展与越发深入,我们有必要对这三个词汇做以清晰的区分。一、什么是GPS?GPS是Global Positioning System(全球定位系统)的缩写,它是美国建立的全球卫星定位导航系统,是GNSS概
    德思特测试测量 2025-01-13 15:42 486浏览
  • Snyk 是一家为开发人员提供安全平台的公司,致力于协助他们构建安全的应用程序,并为安全团队提供应对数字世界挑战的工具。以下为 Snyk 如何通过 CircleCI 实现其“交付”使命的案例分析。一、Snyk 的挑战随着客户对安全工具需求的不断增长,Snyk 的开发团队面临多重挑战:加速交付的需求:Snyk 的核心目标是为开发者提供更快、更可靠的安全解决方案,但他们的现有 CI/CD 工具(TravisCI)运行缓慢,无法满足快速开发和部署的要求。扩展能力不足:随着团队规模和代码库的不断扩大,S
    艾体宝IT 2025-01-10 15:52 164浏览
  • 新年伊始,又到了对去年做总结,对今年做展望的时刻 不知道你在2024年初立的Flag都实现了吗? 2025年对自己又有什么新的期待呢? 2024年注定是不平凡的一年, 一年里我测评了50余块开发板, 写出了很多科普文章, 从一个小小的工作室成长为科工公司。 展望2025年, 中国香河英茂科工, 会继续深耕于,具身机器人、飞行器、物联网等方面的研发, 我觉得,要向未来学习未来, 未来是什么? 是掌握在孩子们生活中的发现,和精历, 把最好的技术带给孩子,
    丙丁先生 2025-01-11 11:35 454浏览
  • 01. 什么是过程能力分析?过程能力研究利用生产过程中初始一批产品的数据,预测制造过程是否能够稳定地生产符合规格的产品。可以把它想象成一种预测。通过历史数据的分析,推断未来是否可以依赖该工艺持续生产高质量产品。客户可能会要求将过程能力研究作为生产件批准程序 (PPAP) 的一部分。这是为了确保制造过程能够持续稳定地生产合格的产品。02. 基本概念在定义制造过程时,目标是确保生产的零件符合上下规格限 (USL 和 LSL)。过程能力衡量制造过程能多大程度上稳定地生产符合规格的产品。核心概念很简单:
    优思学院 2025-01-12 15:43 512浏览
  • 随着全球向绿色能源转型的加速,对高效、可靠和环保元件的需求从未如此强烈。在这种背景下,国产固态继电器(SSR)在实现太阳能逆变器、风力涡轮机和储能系统等关键技术方面发挥着关键作用。本文探讨了绿色能源系统背景下中国固态继电器行业的前景,并强调了2025年的前景。 1.对绿色能源解决方案日益增长的需求绿色能源系统依靠先进的电源管理技术来最大限度地提高效率并最大限度地减少损失。固态继电器以其耐用性、快速开关速度和抗机械磨损而闻名,正日益成为传统机电继电器的首选。可再生能源(尤其是太阳能和风能
    克里雅半导体科技 2025-01-10 16:18 322浏览
我要评论
0
点击右上角,分享到朋友圈 我知道啦
请使用浏览器分享功能 我知道啦