作者:Michael

Home / 作者:Michael

Expand your Pi-Star SD card

01/31/2018 | GUIDE | 没有评论

1. Expand the file system if you have not done so already

pi-star@pi-star(ro):~$ sudo pistar-expand
2. Reboot after the expand process completes.

pi-star@pi-star(ro):~$ sudo reboot

I have created a tool that uses various unicode block graphics characters to improve the resolution (compared to the canonical 2 pixel per characterapproach taken by other solutions posted here). It also automatically displays images in a thumbnail mode if multiple images are provided as input.

Installation:

git clone https://github.com/stefanhaustein/TerminalImageViewer.git
cd TerminalImageViewer/src/main/cpp
make
sudo make install

Usage:

tiv <image(s)>
More details at the github project: https://github.com/stefanhaustein/TerminalImageViewer

Example screenshot:

Raspberry Pi PIXEL UI install

01/30/2018 | GUIDE | 没有评论

The Raspbian + PIXEL image is available from the Downloads page on our website now. Note that the uncompressed image is over 4GB in size, and some older unzippers will fail to decompress it properly. If you have problems, use 7-Zip on Windows and The Unarchiver on Mac – both are free applications which have been tested to decompress the file correctly.

To update an existing Jessie image, type the following at the command line:

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install -y rpi-chromium-mods
sudo apt-get install -y python-sense-emu python3-sense-emu
sudo apt-get install -y python-sense-emu-doc realvnc-vnc-viewer

and then reboot.

If you don’t use xrdp and would like to use the RealVNC server to remotely access your Pi, type the following:

sudo apt-get install -y realvnc-vnc-server

As always, your feedback on the new release is very welcome; feel free to let us know what you think in the comments or on the forums.

I’m following these directions, which are the same as these directions.

I have done update (twice) and upgrade. and I still get the “Unable to locate package” error:

$ sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package realvnc-vnc-server
E: Unable to locate package realvnc-vnc-viewer

The realvnc-vnc-server package isn’t in the repositories for jessie, but you can download the deb file VNC-Server-6.2.1-Linux-ARM.deb from here: https://www.realvnc.com/download/vnc/raspberrypi/

sudo wget https://www.realvnc.com/download/file/vnc.files/VNC-Server-6.2.1-Linux-ARM.deb

And install it manually with sudo dpkg –install filename

sudo dpkg -i VNC-Server-6.2.1-Linux-ARM.deb

install raspi-config

sudo apt-get install raspi-config

and then

How to rotate of RaspberryPi TFT display.

01/30/2018 | GUIDE | 没有评论

official info:https://www.raspberrypi.org/blog/the-eagerly-awaited-raspberry-pi-display/

如何反转180度:

sudo nano /boot/config.txt

在/boot/config.txt 中最后,回车新开启一行 加入:

lcd_rotate=2

Customize reMarkable Screens

01/26/2018 | GUIDE | 没有评论

There are 3 pics for reMarkable Screens.
In order to get the best result for our customized image we’re going to need to know a little about the medium on which it will be viewed.

The official reMarkable documentation lists the screen specs as:
1872 x 1404 resolution (226 DPI)

Share for you!

树莓派添加虚拟键盘

07/04/2017 | LINUX | 没有评论

更新一下,下载matchbox启动需要依赖的软件包,matchbox就是后面要用的虚拟键盘。

sudo apt-get update
sudo apt-get install -y libfakekey-dev libpng-dev libxft-dev autoconf libtool

下载源码编译安装

git clone https://github.com/mwilliams03/matchbox-keyboard.git
cd matchbox-keyboard
./autogen.sh
make
sudo make install

安装共享库

sudo apt-get install libmatchbox1 -y

然后编辑一个shell脚本做一下判断和启动操作:

sudo vim.tiny /usr/bin/toggle-matchbox-keyboard.sh

写入如下内容:

#!/bin/bash
#This script toggle the virtual keyboard

PID=`pidof matchbox-keyboard`
if [ ! -e $PID ]; then
killall matchbox-keyboard
else
/usr/bin/matchbox-keyboard -s 80 extened
fi

赋予执行权限:

sudo chmod +x /usr/bin/toggle-matchbox-keyboard

接下来可以添加它到开始菜单,这里要注意不同的版本可能添加路径不一样。

对于老版本在这里创建:

pi@raspberrypi ~ $ sudo vim.tiny /usr/local/share/applications/toggle-matchbox-keyboard.desktop

对于新版本,包括Jessie在这里创建:

pi@raspberrypi ~ $ sudo nano /usr/share/applications/toggle-matchbox-keyboard.desktop

拷贝如下内容进去就好:

[Desktop Entry]
Name=Toggle Matchbox Keyboard
Comment=Toggle Matchbox Keyboard
Exec=toggle-matchbox-keyboard.sh
Type=Application
Icon=matchbox-keyboard.png
Categories=Panel;Utility;MB
X-MB-INPUT-MECHANSIM=True

如果想要创建一个图标在任务栏上,方便我们进行键盘的调用,就需要修改一下LXDE 面板的配置文件了:

pi@raspberrypi ~ $ vim.tiny ~/.config/lxpanel/LXDE/panels/panel

如果系统提示上面的文件不存在,或者无法创建,说明你用的是比较新的系统了,所以需要重新定位一下。新版jessie比较坑爹的地方就在这里,很多人不懂就卡住了,其实路径差不多,如果用table键补全应该是很快就好的,为了帮助大家区分,还是写细一些。

如果你用的是老版本的RASPBIAN WHEEZY:

pi@raspberrypi ~ $ vim.tiny ~/.config/lxpanel-pi/LXDE/panels/panel

如果你用的是新版本的RASPBIAN JESSIE:

pi@raspberrypi ~ $ vim.tiny ~/.config/lxpanel/LXDE-pi/panels/panel

通过vim的查找功能找到这段内容:

Plugin {
type = launchbar
Config {
Button {
id=lxde-screenlock.desktop
}
Button {
id=lxde-logout.desktop
}
}

在其中添加一段内容

Plugin {
type = launchbar
Config {
Button {
id=toggle-matchbox-keyboard.desktop
}
Button {
id=lxde-screenlock.desktop
}
Button {
id=lxde-logout.desktop
}
}

然后保存退出,重新启动一下就可以看到键盘图标了。

这个虚拟键盘叫做:Matchbox-keyboard

你也可以在图形界面的终端里面输入命令打开,切记,要有终端哦,没有终端是不能够显示的,需要X环境。

pi@raspberrypi ~ $ matchbox-keyboard

另外,如果你用ssh从PC端或者笔记本登陆到你的树莓派,那么可以用过这个命令来使用:

pi@raspberrypi ~ $ DISPLAY=:0.0 matchbox-keyboard

Matchbox-keyboard 默认是100%大小的窗口,你可以通过 -s 加上整数来进行窗口大小变化,这个值在30%-100% 之间,代表宽度。

下面就是用50%的宽度显示键盘的图示。

pi@raspberrypi ~ $ matchbox-keyboard -s 50
mbk-50percentdefault

另外如果想要扩展键盘的内容,可以用extended参数,非常有用的,至少输入网址需要这个扩展键盘。

pi@raspberrypi ~ $ matchbox-keyboard -s 50 extended
mbk-70percentextended

done

Raspbian Sources Change

02/01/2017 | LINUX | 没有评论

下面有个列表,从树莓派实验室拿来的,大家随意取用:

中山大学
Raspbian http://mirror.sysu.edu.cn/raspbian/raspbian/
中国科学技术大学
Raspbian http://mirrors.ustc.edu.cn/raspbian/raspbian/
清华大学
Raspbian http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/
华中科技大学
Raspbian http://mirrors.hustunique.com/raspbian/raspbian/
Arch Linux ARM http://mirrors.hustunique.com/archlinuxarm/
大连东软信息学院源(北方用户)
Raspbian http://mirrors.neusoft.edu.cn/raspbian/raspbian/
重庆大学源(中西部用户)
Raspbian http://mirrors.cqu.edu.cn/Raspbian/raspbian/
新加坡国立大学
Raspbian http://mirror.nus.edu.sg/raspbian/raspbian
牛津大学
Raspbian http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/
韩国KAIST大学
Raspbian http://ftp.kaist.ac.kr/raspbian/raspbian/
更新自己的/etc/apt/sources.list里面的内容即可,就是要注意自己的源的版本,别把jessie更新成了wheezy,也别弄反了。我的系统是Jessie的,所以,你懂得。

编辑/etc/apt/sources.list 文件,参考如下命令:

sudo cp /etc/apt/sources.list{,.bak}
cat > /etc/apt/sources.list << EOF
deb http://mirror.sysu.edu.cn/raspbian/raspbian/ Jessie main contrib non-free
deb-src http://mirror.sysu.edu.cn/raspbian/raspbian/ Jessie main contrib non-free
EOF

注:网址末尾的raspbian重复两次是必须的。因为Raspbian的仓库中除了APT软件源还包含其他代码。APT软件源不在仓库的根目录,而在raspbian/子目录下。

编辑镜像站后,请使用sudo apt-get update命令,更新软件源列表,同时检查您的编辑是否正确。
如果需要, 你可以执行以下命令将Raspbian public key加入你的 apt-get keyring :

wget http://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add -

如何卸载win10的自带应用

01/27/2017 | GUIDE | 2条评论

win10自带了好多应用,有些看起来不错,其实用起来不太方便哈(我的个人感觉),我们都更喜欢第三方应用,所以我们就来看看如何卸载这些自带应用。如图,是卸载完成后的Windows PowerShell:
Windows PowerShell
win10中的管理员身份
方法/步骤
1
要卸载这些所有内置应用,就要用到Windows PowerShell,它是win10系统自带的一个应用,要打开它,就单击开始菜单中的“所有应用”,然后找到Windows Power Shell的文件夹,右键单击Windows PowerShell(注意不是Windows PowerShell ISE),然后单击以管理员身份运行,就打开了。
2
打开了Windows PowerShell,就开始输入命令了
3
要卸载OneNote,在里面输入
Get-AppxPackage *OneNote* | Remove-AppxPackage
可以复制,回车执行
4
要卸载3D,输入
Get-AppxPackage *3d* | Remove-AppxPackage
5
要卸载Camera(相机),输入
Get-AppxPackage *camera* | Remove-AppxPackage
6
要卸载邮件和日历,输入
Get-AppxPackage *communi* | Remove-AppxPackage
7
要卸载新闻订阅,输入
Get-AppxPackage *bing* | Remove-AppxPackage
8
要卸载Groove音乐、电影与电视:
Get-AppxPackage *zune* | Remove-AppxPackage
9
要卸载人脉,输入
Get-AppxPackage *people* | Remove-AppxPackage
10
要卸载手机伴侣(Phone Companion),输入
Get-AppxPackage *phone* | Remove-AppxPackage
11
要卸载照片,输入
Get-AppxPackage *photo* | Remove-AppxPackage
12
要卸载纸牌游戏,输入
Get-AppxPackage *solit* | Remove-AppxPackage
13
要卸载录音机,输入
Get-AppxPackage *soundrec* | Remove-AppxPackage
14
要卸载Xbox,输入
Get-AppxPackage *xbox* | Remove-AppxPackage
15
在卸载Xbox的时候,会提示有很多错误,其实它已经被卸载了,可以不用担心!
如何卸载win10的自带应用
16
所有卸载完成后,就只剩下应用商店了,这个留着吧,有用!
其他信息
1
卸载Windows 10的命令:
OneNote:
Get-AppxPackage *OneNote* | Remove-AppxPackage
3D:
Get-AppxPackage *3d* | Remove-AppxPackage
Camera相机:
Get-AppxPackage *camera* | Remove-AppxPackage
邮件和日历:
Get-AppxPackage *communi* | Remove-AppxPackage
新闻订阅:
Get-AppxPackage *bing* | Remove-AppxPackage
Groove音乐、电影与电视:
Get-AppxPackage *zune* | Remove-AppxPackage
人脉:
Get-AppxPackage *people* | Remove-AppxPackage
手机伴侣(Phone Companion):
Get-AppxPackage *phone* | Remove-AppxPackage
照片:
Get-AppxPackage *photo* | Remove-AppxPackage
纸牌游戏:
Get-AppxPackage *solit* | Remove-AppxPackage
录音机:
Get-AppxPackage *soundrec* | Remove-AppxPackage
Xbox:
Get-AppxPackage *xbox* | Remove-AppxPackage
2
卸载Xbox后出现的提示:(正常现象,出现此现象说明Xbox已被成功卸载)
英文提示:
PS C:\WINDOWS\system32> Get-AppxPackage *xbox* | Remove-AppxPackage
Remove-AppxPackage : Deployment failed with HRESULT: 0x80073CFA, Removal failed. Please contact your software vendor.
(Exception from HRESULT: 0x80073CFA)
error 0x80070032: AppX Deployment Remove operation on package
Microsoft.XboxGameCallableUI_1000.10240.16384.0_neutral_neutral_cw5n1h2txyewy from:
C:\Windows\SystemApps\Microsoft.XboxGameCallableUI_cw5n1h2txyewy failed. This app is part of Windows and cannot be
uninstalled on a per-user basis. An administrator can attempt to remove the app from the computer using Turn Windows
Features on or off. However, it may not be possible to uninstall the app.
NOTE: For additional information, look for [ActivityId] 1d60accb-cb8d-0003-d5b8-601d8dcbd001 in the Event Log or use
the command line Get-AppxLog -ActivityID 1d60accb-cb8d-0003-d5b8-601d8dcbd001
At line:1 char:26
+ Get-AppxPackage *xbox* | Remove-AppxPackage
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.XboxG…l_cw5n1h2txyewy:String) [Remove-AppxPackage], IOException
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand
Remove-AppxPackage : Deployment failed with HRESULT: 0x80073CFA, Removal failed. Please contact your software vendor.
(Exception from HRESULT: 0x80073CFA)
error 0x80070032: AppX Deployment Remove operation on package
Microsoft.XboxIdentityProvider_1000.10240.16384.0_neutral_neutral_cw5n1h2txyewy from:
C:\Windows\SystemApps\Microsoft.XboxIdentityProvider_cw5n1h2txyewy failed. This app is part of Windows and cannot be
uninstalled on a per-user basis. An administrator can attempt to remove the app from the computer using Turn Windows
Features on or off. However, it may not be possible to uninstall the app.
NOTE: For additional information, look for [ActivityId] 1d60accb-cb8d-0001-d9b9-601d8dcbd001 in the Event Log or use
the command line Get-AppxLog -ActivityID 1d60accb-cb8d-0001-d9b9-601d8dcbd001
At line:1 char:26
+ Get-AppxPackage *xbox* | Remove-AppxPackage
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.XboxI…l_cw5n1h2txyewy:String) [Remove-AppxPackage], IOException
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand
中文提示:
PS C:\windows\system32> Get-AppxPackage *xbox* | Remove-AppxPackage
Remove-AppxPackage : 部署失败,原因是 HRESULT: 0x80073CFA, 无法卸载。请联系你的软件供应商。 (异常来自 HRESULT:0x80073CF
A)
错误 0x80070032: C:\Windows\SystemApps\Microsoft.XboxGameCallableUI_cw5n1h2txyewy 中的程序包 Microsoft.XboxGameCallable
UI_1000.10240.16384.0_neutral_neutral_cw5n1h2txyewy 上的 AppX 部署 删除 操作失败。此应用是 Windows 的一部分,无法针对每
个用户卸载该应用。管理员可以尝试使用“启用或关闭 Windows 功能”从计算机中删除该应用。不过,该应用可能无法被卸载。
注: 有关其他信息,请在事件日志中查找 [ActivityId] 84d12a44-dbe5-0000-0557-d184e5dbd001,或使用命令行 Get-AppxLog -Activ
ityID 84d12a44-dbe5-0000-0557-d184e5dbd001
所在位置 行:1 字符: 26
+ Get-AppxPackage *xbox* | Remove-AppxPackage
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.XboxG…l_cw5n1h2txyewy:String) [Remove-AppxPackage], IOException
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand
Remove-AppxPackage : 部署失败,原因是 HRESULT: 0x80073CFA, 无法卸载。请联系你的软件供应商。 (异常来自 HRESULT:0x80073CF
A)
错误 0x80070032: C:\Windows\SystemApps\Microsoft.XboxIdentityProvider_cw5n1h2txyewy 中的程序包 Microsoft.XboxIdentityPr
ovider_1000.10240.16384.0_neutral_neutral_cw5n1h2txyewy 上的 AppX 部署 删除 操作失败。此应用是 Windows 的一部分,无法针
对每个用户卸载该应用。管理员可以尝试使用“启用或关闭 Windows 功能”从计算机中删除该应用。不过,该应用可能无法被卸载。
注: 有关其他信息,请在事件日志中查找 [ActivityId] 84d12a44-dbe5-0000-0f57-d184e5dbd001,或使用命令行 Get-AppxLog -Activ
ityID 84d12a44-dbe5-0000-0f57-d184e5dbd001
所在位置 行:1 字符: 26
+ Get-AppxPackage *xbox* | Remove-AppxPackage
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.XboxI…l_cw5n1h2txyewy:String) [Remove-AppxPackage], IOException
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand
至于这些提示,大家如果有兴趣就去研究研究原因吧,总之应用是被成功卸载了!
END
注意事项
打开的是Windows PowerShell,而不是Windows PowerShell ISE
Windows PowerShell 一定要以管理员身份运行!
Windows PowerShell 支持快捷键复制粘贴,为了避免输入错误,可以通过Ctrl+C(复制)和Ctrl+V(粘贴)来输入命令
卸载应用之前一定要谨慎!