vue开发移动端环境配置_如何设置移动开发环境

vue开发移动端环境配置

The use of mobile devices has increased considerably in the past decade. It has been over two years since mobile browsing took over desktop. The usability of mobile devices has exploded, too. Mobile devices now come with huge processing power.

在过去的十年中,移动设备的使用已大大增加。 自从移动浏览接管桌面以来已经过去两年 。 移动设备的可用性也爆炸了。 现在,移动设备具有巨大的处理能力。

We often dismiss mobile platforms as serious workhorses for developers, but today, it’s possible to take advantage of mobile portability with a level of flexibility that gets closer to the desktop every year.

我们经常将移动平台视为开发人员的重要工作,但如今,有可能利用移动可移植性并以每年接近台式机的灵活性水平。

This post explains the process of running a Linux development environment from your mobile device using Samsung Dex.

这篇文章解释了使用Samsung Dex从移动设备运行Linux开发环境的过程。

三星Dex简史 (A Brief History of Samsung Dex)

Samsung Dex is a platform that allows you to use the computing power of your mobile device to run a desktop-like environment. It was introduced in 2017 and has been actively developed since. The number of devices that can run Dex has increased steadily. In this post, we explore how to set up a Linux development environment through Samsung Dex.

Samsung Dex是一个平台,可让您使用移动设备的计算能力来运行类似桌面的环境。 它于2017年推出,此后一直在积极开发。 可以运行Dex的设备数量稳步增加。 在本文中,我们探讨了如何通过Samsung Dex设置Linux开发环境。

Since its launch, Samsung Dex has been available on all of Samsung’s flagship devices. They are:

自发布以来,Samsung Dex已在所有三星旗舰设备上使用。 他们是:

  • Galaxy S8/S8+

    Galaxy S8 / S8 +
  • Note 8

    注8
  • Galaxy S9/S9+

    Galaxy S9 / S9 +
  • Note 9

    注9
  • Galaxy Tab S4

    Galaxy Tab S4
  • And most recently, the S10 family

    最近,S10系列

Samsung Dex launched with a docking accessory called the Dex Station. You had to connect your mobile device to the Dex Station, which had outlets for output devices through the HDMI port, and input devices (like a mouse and keyboard) through USB and USB-C ports.

三星Dex推出了名为Dex Station的对接附件。 您必须将移动设备连接到Dex Station,该设备具有通过HDMI端口输出设备的插座,以及通过USB和USB-C端口输入设备(如鼠标和键盘)的插座。

alt

Samsung Dex Station (Source)

三星Dex Station( 来源 )

While using the Dex Station was mandatory at first, this criteria has since been relaxed in more recent devices. If you are using a Galaxy Note 9 or newer device, a USB-C to HDMI converter can help you get hooked up to a display, and Bluetooth can be used for peripherals.

虽然起初必须使用Dex Station,但此标准在最近的设备中已经放宽。 如果您使用的是Galaxy Note 9或更高版本的设备,则USB-C至HDMI转换器可以帮助您连接显示器,并且可以将蓝牙用于外围设备。

Samsung has recently launched the Dex Pad, a portable version of the Dex Station, which has built in wireless charging and a cooling fan in addition to the HDMI and USB ports.

三星最近推出了Dex Station的便携式版本Dex Pad ,除了HDMI和USB端口外,它还内置了无线充电功能和散热风扇。

alt

Samsung Dex Pad (Source)

三星Dex Pad( 来源 )

Assuming you fulfil the hardware requirements, you need two apps in order to create a Linux development environment. First, you need to install the Samsung Dex app to enable the Samsung Dex experience. Next, you need the Linux on Dex app, which is currently in Beta mode. You can apply for access through the Google Play Store.

假设您满足硬件要求,则需要两个应用程序才能创建Linux开发环境。 首先,您需要安装Samsung Dex应用程序以启用Samsung Dex体验。 接下来,您需要Linux on Dex应用程序,该应用程序目前处于Beta模式。 您可以通过Google Play商店申请访问权限。

Now that we have tackled the requirements for the process, let us get started!

现在我们已经解决了流程的要求,让我们开始吧!

在Samsung Dex上配置Linux环境 (Configure a Linux Environment on Samsung Dex)

The Linux on Dex app shows you the list of virtual containers that you have created on your device. Let’s try and create our first one by clicking on the “+” button on the bottom right of the screen.

“ Linux on Dex”应用程序显示您在设备上创建的虚拟容器的列表。 让我们尝试通过单击屏幕右下方的“ +”按钮来创建第一个。

alt

When creating the container, you need to use a Linux image. Currently, only Ubuntu 16.04 LTS is supported. The image can be downloaded from the Samsung Dex servers. A modified version of Ubuntu needs to be used to adhere to Android’s security policy.

创建容器时,需要使用Linux映像。 当前,仅支持Ubuntu 16.04 LTS。 可以从Samsung Dex服务器下载该图像。 需要使用Ubuntu的修改版本来遵守Android的安全策略。

Download Linux Image

Downloading custom Linux image provided by Samsung

下载三星提供的自定义Linux映像

Once the download is complete, you need to extract the image.

下载完成后,您需要提取图像。

alt

Unzip downloaded Linux image

解压缩下载的Linux映像

To create a new container, browse to the location of the unzipped image on your file system and provide a name and description for the image. You also need to specify the storage space to be allocated to this image. This can be changed at a later time when the container has been successfully created. A minimum of 10 GB is required.

要创建一个新的容器,请浏览到文件系统上未压缩图像的位置,并提供该图像的名称和描述。 您还需要指定要分配给该映像的存储空间。 在成功创建容器之后,可以更改此设置。 至少需要10 GB。

alt

Options to create a container

创建容器的选项

Creating the container does not take long — the custom image of the Linux operating system provided by Samsung is already compatible with Dex. The default user is dextop and the password is secret.

创建容器不会花费很长时间-三星提供的Linux操作系统的自定义映像已经与Dex兼容。 默认用户为dextop ,密码为secret

Once you’ve created the container, you can view a list of containers on the app. Select a container to view its details.

创建容器后,您可以在应用程序上查看容器列表。 选择一个容器以查看其详细信息。

Container Details

Container details

货柜明细

在Mobile和Samsung Dex上测试Linux环境 (Testing Linux Environment on Mobile and Samsung Dex)

Before connecting to an external display, you can still access the container from the Linux on Dex app by starting a terminal. Select the “Terminal mode” option in the details page shown above to start the terminal.

在连接到外部显示器之前,您仍然可以通过启动终端从Linux on Dex应用程序访问容器。 在上面显示的详细信息页面中选择“终端模式”选项以启动终端。

Terminal on mobile

Running the container’s terminal on mobile

在移动设备上运行容器的终端

You can run a Python interpreter from within this terminal and test out some basic statements.

您可以在此终端中运行Python解释器并测试一些基本语句。

Running Python interpreter on mobile

Running Python interpreter of the container on mobile

在移动设备上运行容器的Python解释器

To use the Linux environment in a desktop setting, connect your mobile device to an external display. At this point, you may not be running the Linux on Dex app. You will see the Samsung Dex logo on the display as the desktop version loads into the display.

要在桌面设置中使用Linux环境,请将您的移动设备连接到外部显示器。 此时,您可能尚未运行Linux on Dex应用程序。 当桌面版本加载到显示屏中时,您将在显示屏上看到Samsung Dex徽标。

Samsung Dex Home Page on starting up

Desktop of Samsung Dex on starting up

三星Dex桌面启动

Once the Samsung Dex has loaded, you can use your connected mobile device as a trackpad or use a connected mouse and keyboard. Navigate to the installed apps in your mobile device and select the Linux on Dex app. You will be able to see a list of all the available containers in the app. Select the container that you wish to run.

三星Dex加载后,您可以将连接的移动设备用作触控板,也可以使用连接的鼠标和键盘。 导航到移动设备中已安装的应用程序,然后选择“ Linux on Dex”应用程序。 您将能够看到该应用程序中所有可用容器的列表。 选择您要运行的容器。

Container Details on Linux on Dex app on the screen

Click on the run button to get into the Linux environment.

单击运行按钮进入Linux环境。

Ubuntu Environment on Samsung Dex

You’ll be taken into the Linux environment within Samsung Dex. You can still access the bottom menu of the Dex environment, which I have used to take a screenshot.

您将被带入Samsung Dex中的Linux环境。 您仍然可以访问Dex环境的底部菜单,我曾用它来截屏。

Linux on Dex is still in its nascent stage, where you can run various applications, but the performance isn’t at par with desktop computers. Linux on Dex has targeted developers primarily and perhaps this is a group of users who may be able to use it in its current form.

Linux on Dex仍处于起步阶段,您可以在其中运行各种应用程序,但性能与台式计算机不相称。 Linux on Dex主要针对开发人员,也许这是一群可以使用其当前形式使用它的用户。

最后的想法 (Final Thoughts)

A Linux development machine with Samsung Dex can emulate a desktop computer in terms of functionality. And crucially, the increasing popularity of cloud-based services reduces dependency on traditional storage needs.

具有Samsung Dex的Linux开发机可以在功能方面模拟台式计算机。 至关重要的是,基于云的服务的日益普及减少了对传统存储需求的依赖。

The computing power isn’t great Compared to running Linux natively on a desktop machine, this isn’t the snappiest experience. Further, support for a variety of devices is limited and Linux on Dex is still in beta. But given the the rate at which our mobile devices become more capable, it would not be a surprise to see end users replace traditional personal computers with containers on mobile devices in coming years.

与本地在桌面计算机上运行Linux相比,这不是最轻松的体验。 此外,对各种设备的支持也受到限制,并且Linux on Dex仍处于测试阶段。 但是,鉴于我们的移动设备越来越强大的能力,在未来几年中看到最终用户用移动设备上的容器替换传统的个人计算机也就不足为奇了。

Did you give Linux on Dex a try? Do you think it will complement (or even replace!) your current development setup? Let us know in the comments below!

您是否尝试过在Dex上使用Linux? 您认为它将补充(甚至取代!)您当前的开发设置吗? 在下面的评论中让我们知道!

翻译自: https://www.sitepoint.com/mobile-development-environment/

vue开发移动端环境配置

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值