xud6的笔记本

徐岱青

树莓派Kiosk(展台模式)设置

 • 

安装Raspbian Buster lite

启用SSH

boot分区下新建名称为ssh的空文本

添加WiFi信息

boot分区下新建wpa_supplicant.conf

country=CN
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="NETWORK-NAME"
    psk="NETWORK-PASSWORD"
}

设置自动启动

sudo raspi-config

菜单中选择

Boot Options

    Desktop CLI

        Console Autologin

Advanced Options

    Overscan

        No / OK

设置local

sudo raspi-config

选择

安装最小GUI组件

sudo apt-get install --no-install-recommends xserver-xorg x11-xserver-utils xinit openbox -y

安装Chrome

sudo apt-get install --no-install-recommends chromium chromium-l10n -y

安装中文字体

sudo apt-get install fonts-wqy-zenhei

配置Openbox

sudo nano /etc/xdg/openbox/autostart

添加

xset -dpms			# turn off display power management system
xset s noblank		# turn off screen blanking
xset s off			# turn off screen saver

# Remove exit errors from the config files that could trigger a warning
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/'Local State'
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/"exit_type":"Normal"/' ~/.config/chromium/Default/Preferences

# Run Chromium in kiosk mode
chromium  --noerrdialogs --disable-infobars --lang=zh-CN --kiosk $KIOSK_URL

配置环境

sudo nano /etc/xdg/openbox/environment

添加

export KIOSK_URL=https://url.url

自动启动xserver

使用自动登录的用户
检查~/.bash_profile是不是存在

ls -la ~/.bash_profile

如果不存在创建~/.bash_profile

touch ~/.bash_profile

编辑~/.bash_profile

sudo nano ~/.bash_profile

添加

[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx -- -nocursor

应用更新

source ~/.bash_profile

重启

sudo reboot

Powershell 手动Trim

 • 
Optimize-Volume -DriveLetter YourDriveLetter -ReTrim -Verbose

Veeam Agent for Microsoft Windows 清除本地设置和状态

 •  Filed under windows, veeam
  1. 停止VeeamEndpointBackupSvc服务
  2. 删除 C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\VeeamEndPoint 文件夹
  3. 删除 C:\ProgramData\Veeam\EndpointData 文件夹
  4. 将注册表 HKEY_LOCAL_MACHINE\Software\Veeam\Veeam Endpoint Backup\RecreateDatabase 设为 "1"
  5. 启动VeeamEndpointBackupSvc服务

Centos 7 启用定期TRIM

 •  Filed under centos, centos7

启用定期TRIM

sudo systemctl enable fstrim.timer
sudo systemctl restart fstrim.timer

手动TRIM

sudo fstrim -a -v

debian8

sudo cp /usr/share/doc/util-linux/examples/fstrim.service /etc/systemd/system
sudo cp /usr/share/doc/util-linux/examples/fstrim.timer /etc/systemd/system

清理 GPO 中 Extra Registry Settings

 •  Filed under Active Directory, windows

对于Office Deployment中Setting值为Software\Policies\Microsoft\Office\11.0\Word\DisabledCmdBarItemsCheckBoxes\FileOpenToolsFind的项,如果在User Configuration中

Remove-GPRegistryValue -Name "Office Deployment" -Key "HKCU\Software\Policies\Microsoft\Office\11.0\Word\DisabledCmdBarItemsCheckBoxes" -ValueName "FileOpenToolsFind"

对应的如果在Computer Configuration中应把HKCU换为HKLM

Powershell 转移 FSMO

 •  Filed under Active Directory, windows

获取当前FSMO

Get-ADForest | select SchemaMaster,DomainNamingMaster
Get-ADDomain | select PDCEmulator,RIDMaster,InfrastructureMaster

转移FSMO

Move-ADDirectoryServerOperationMasterRole -Identity <Target-DC> -OperationMasterRole SchemaMaster,RIDMaster,InfrastructureMaster,DomainNamingMaster,PDCEmulator

强制转移FSMO

Move-ADDirectoryServerOperationMasterRole -Identity <Target-DC> -OperationMasterRole SchemaMaster,RIDMaster,InfrastructureMaster,DomainNamingMaster,PDCEmulator -Force