未分类 - XiZi's Blog
远程桌面问题排查
1.测试网络连通性
ping,等各种测试工具。
2.查看端口连通状态
netstat /aon | find "3389"
3.检查防火墙
“防火墙”对于不用的“网络位置”采用不同的规则,windows自动设置的远程桌面只会在“专用网络”,打开远程桌面连接的端口。所以当你的位置为“公共网络”时,需要手动调整防火墙规则,打开公共网络的防火墙规则。
移动系统后,修复找不到到Profile(如:systemprofile\Desktop)文件的问题。
首先启动移动后的系统,通常会提示找不到c:\Windows\system32\config\systemprofile\Desktop。说明你的用户的Profile出现了问题。我们打开可以这样修复
1、打开注册表,定位到以下位置:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\
通常你会发下一个带有.bak的项(文件夹),说明这个是原来的配置,不知道什么原因,系统认为它有问题,创建了一个同名的项,把原来的项重命名了一个(.bak),我们把带有.bak的项下,所有的变量拷贝到不带有bak的同名项目下面。然后重启试试。
2、如果以上办法还不奏效,那么修改注册表下面的所有变量
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
将c:\Windows\system32\config\systemprofile替换为真实的用户目录如(c:\Users\Administrator),参考范例:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders] "AppData"="C:\\Users\\Administrator\\AppData\\Roaming" "Local AppData"="C:\\Users\\Administrator\\AppData\\Local" "My Video"="C:\\Users\\Administrator\\Videos" "{1B3EA5DC-B587-4786-B4EF-BD1DC332AEAE}"="C:\\Users\\Administrator\\AppData\\Roaming\\Microsoft\\Windows\\Libraries" "My Pictures"="C:\\Users\\Administrator\\Pictures" "Desktop"="C:\\Users\\Administrator\\Desktop" "History"="C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\Windows\\History" "NetHood"="C:\\Users\\Administrator\\AppData\\Roaming\\Microsoft\\Windows\\Network Shortcuts" "Cookies"="C:\\Users\\Administrator\\AppData\\Roaming\\Microsoft\\Windows\\Cookies" "Favorites"="C:\\Users\\Administrator\\Favorites" "SendTo"="C:\\Users\\Administrator\\AppData\\Roaming\\Microsoft\\Windows\\SendTo" "Start Menu"="C:\\Users\\Administrator\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu" "My Music"="C:\\Users\\Administrator\\Music" "Programs"="C:\\Users\\Administrator\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs" "Recent"="C:\\Users\\Administrator\\AppData\\Roaming\\Microsoft\\Windows\\Recent" "CD Burning"="C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\Windows\\Burn\\Burn" "PrintHood"="C:\\Users\\Administrator\\AppData\\Roaming\\Microsoft\\Windows\\Printer Shortcuts" "{374DE290-123F-4565-9164-39C4925E467B}"="C:\\Users\\Administrator\\Downloads" "Startup"="C:\\Users\\Administrator\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup" "Administrative Tools"="C:\\Users\\Administrator\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Administrative Tools" "Personal"="C:\\Users\\Administrator\\Documents" "Cache"="C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\Windows\\Temporary Internet Files" "Templates"="C:\\Users\\Administrator\\AppData\\Roaming\\Microsoft\\Windows\\Templates" "Fonts"="C:\\Windows\\Fonts"
Windows 修复 Wubi 的引导问题。
昨天帮朋友更新了下Wubi装的Ubuntu,结果没有手动更新Grub2或者是由于内核安装包没有安装正常,导致Grub2启动不了,一闪而过,弄了一晚上,现在归结一下原因:
1、一闪而过,提示”Wubildr not found“,但这个不是问题。
2、问题在于系统的grub错误,或linux启动文件错误,即root.disk,文件中的grub.cfg,或者boot目录下的vmlinux或initrd有问题。
解决方案:
总体来说就是,使用旧的vmlinux和initrd,手动设置引导,启动到ubuntu,修复grub及启动文件问题。
具体过程如下:
1,Windows下调整ubuntu安装目录下Winboot文件夹下的wubildr.cfg, 让他不查找root.disk,这样就能停在Grub里面。
2,采用类似的手动写gurb命令的方式,引导ubuntu启动。
后续补充完整过程。
关掉Windows的权限提示
1、打开本地组策略编辑器
gpedit.msc
2、找到 计算机配置->Windows设置->安全设置->本地策略->安全选项
修改 用户帐户控制:管理员批准模式中的管理员提升权限提示的行为 为 不提示,直接提升
并检查:用户帐户控制:以管理员审批模式运行所有管理员 为 已启用
PS:
对于Server的系统,使用内部管理员账号(administrator),需要 启用 用户帐户控制:用于内置帐户的管理员审批模式
Windows 8.1 IE 代理设置问题
设置IE使用本地代理(如goagent、stunnel等的代理),仍然无法上网
原因:是因为IE启用了“启用增强型保护模式*”选项。
方法:将 Internet选项-> 高级 -> “启用增强型保护模式*”关闭。重启浏览器。
Gallery3 On Windows with Apache Server.
1.We need to patch some files to make gallery3 run on windows with apache web server. This is the path, but it's not stronge. you can not use this patch when you use linux etc.
2.This patch mainly fixed errors when you use none utf8 encode system. it convert the utf8 encoded filenames to locale encoded ones.
diff --git a/index.php b/index.php index e6636cf..70aeb3d 100644 --- a/index.php +++ b/index.php @@ -26,7 +26,8 @@ version_compare(PHP_VERSION, "5.2.3", "<") and // Gallery is not supported on Windows. if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { - exit("Gallery is not supported on Windows (PHP reports that you're using: " . PHP_OS . ")"); +define("WIN",true); +// exit("Gallery is not supported on Windows (PHP reports that you're using: " . PHP_OS . ")"); } // PHP 5.4 requires a timezone - if one isn't set date functions aren't going to work properly. diff --git a/modules/gallery/helpers/system.php b/modules/gallery/helpers/system.php index f0879d6..2c34d11 100644 --- a/modules/gallery/helpers/system.php +++ b/modules/gallery/helpers/system.php @@ -48,7 +48,11 @@ class system_Core { foreach ($paths as $path) { $path = rtrim($path, "/"); - $candidate = "$path/$binary"; + if (!preg_match("/^win/i", PHP_OS)) { + $candidate = "$path/$binary"; + }else{ + $candidate = "$path/$binary.exe"; + } // @suppress errors below to avoid open_basedir issues if (@file_exists($candidate)) { if (!@is_executable($candidate) && diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index c446eea..cfc75f8 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -167,7 +167,7 @@ class Item_Model_Core extends ORM_MPTT { * movie: /usr/home/www/gallery3/var/albums/Bobs Wedding/First-Dance.mp4 */ public function file_path() { - return VARPATH . "albums/" . urldecode($this->relative_path()); + return VARPATH . "albums/" . iconv("UTF-8","GBK",urldecode($this->relative_path())); } /** @@ -194,7 +194,7 @@ class Item_Model_Core extends ORM_MPTT { * movie: /usr/home/www/gallery3/var/thumbs/Bobs Wedding/First-Dance.jpg */ public function thumb_path() { - $base = VARPATH . "thumbs/" . urldecode($this->relative_path()); + $base = VARPATH . "thumbs/" . iconv("UTF-8","GBK",urldecode($this->relative_path())); if ($this->is_photo()) { return $base; } else if ($this->is_album()) { @@ -245,7 +245,7 @@ class Item_Model_Core extends ORM_MPTT { * (*) Since only photos have resizes, album and movie paths are fictitious. */ public function resize_path() { - return VARPATH . "resizes/" . urldecode($this->relative_path()) . + return VARPATH . "resizes/" . iconv("UTF-8","GBK",urldecode($this->relative_path())) . ($this->is_album() ? "/.album.jpg" : ""); } diff --git a/modules/gallery/views/admin_block_platform.html.php b/modules/gallery/views/admin_block_platform.html.php index 9a594fa..76fb0a2 100644 --- a/modules/gallery/views/admin_block_platform.html.php +++ b/modules/gallery/views/admin_block_platform.html.php @@ -15,9 +15,11 @@ <li> <?= t("MySQL: %mysql_version", array("mysql_version" => Database::instance()->query("SELECT version() as v")->current()->v)) ?> </li> + <?php if (function_exists("sys_getloadavg")): ?> <li> <?= t("Server load: %load_average", array("load_average" => join(" ", sys_getloadavg()))) ?> </li> + <?php endif; ?> <li> <?= t("Graphics toolkit: %toolkit", array("toolkit" => module::get_var("gallery", "graphics_toolkit"))) ?> </li>
给windows镜像集成语言包
set mount="your mount point" set d="your install driver" set rmPackName=Microsoft-Windows-Client-LanguagePack-Package~31bf3856ad364e35~x86~en-US~6.3.9600.16384 set newPackPath=E:\Users\Administrator\Downloads\Win8.1X86CHS-lp.cab Dism /mount-wim /wimfile:%d%\sources\install.wim /index:2 /mountdir:%mount% Dism /Image:%mount% /Enable-Feature /FeatureName:NetFX3 /Source:%d%\sources\sxs Dism /Image:%mount% /Remove-Package /PackageName:%rmPackName% Dism /Image:%mount% /Add-Package /PackagePath:%newPackPath% Dism /image:%mount% /Set-AllIntl:zh-CN Dism /image:%mount% /Set-SKUIntlDefaults:zh-CN Dism /image:%mount% /Set-InputLocale:0804:00000804 /Set-InputLocale:0804:00000804 Dism /image:%mount% /Set-TimeZone:"China Standard Time" Dism /Unmount-Image /MountDir:%mount% /Commit
给firefox添加BUILDIN证书
1. 需要NSS工具包(主要是addbuildin工具)
这里提供一个链接:http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_15_1_RTM/src/nss-3.15.1-with-nspr-4.10.tar.gz
2. 参照firefox源包根目录下的security/nss/lib/ckfw/builtins目录里面README文件的说明,添加自定义证书即可。
This README file explains how to add a builtin root CA certificate to NSS or remove a builtin root CA certificate from NSS. The builtin root CA certificates in NSS are stored in the nssckbi PKCS #11 module. The sources to the nssckbi module are in this directory. I. Adding a Builtin Root CA Certificate You need to use the addbuiltin command-line tool to add a root CA certificate to the nssckbi module. In the procedure described below, we assume that the new root CA certificate is distributed in DER format in the file newroot.der. 1. Add the directory where the addbuiltin executable resides to your PATH environment variable. Then, add the directory where the NSPR and NSS shared libraries (DLLs) reside to the platform-specific environment variable that specifies your shared library search path: LD_LIBRARY_PATH (most Unix variants), SHLIB_PATH (32-bit HP-UX), LIBPATH (AIX), or PATH (Windows). 2. Copy newroot.der to this directory. 3. In this directory, run addbuiltin to add the new root certificate. The argument to the -n option should be replaced by the nickname of the root certificate. % addbuiltin -n "Nickname of the Root Certificate" -t C,C,C < newroot.der >> certdata.txt % addbuiltin -n "Nickname of the Root Certificate" -t CT,C,C < newroot.der >> certdata.txt 4. Edit nssckbi.h to bump the version of the module. 5. Run gmake in this directory to build the nssckbi module. 6. After you verify that the new nssckbi module is correct, check in certdata.txt and nssckbi.h. II. Removing a Builtin Root CA Certificate 1. Change directory to this directory. 2. Edit certdata.txt and remove the root CA certificate. 3. Edit nssckbi.h to bump the version of the module. 4. Run gmake in this directory to build the nssckbi module. 5. After you verify that the new nssckbi module is correct, check in certdata.txt and nssckbi.h.
交叉编译Gcc For ARM
1、编译binutils
/path/to/binutils/source/configure --build=x86_64-centos-linux-gnu \ --host=x86_64-centos-linux-gnu --target=arm-cortex_a8-linux-gnueabi \ --prefix=/path/to/install make -j4 make install
2、编译安装gcc-core
make all-gcc make install-gcc
3、编译目标libc(glibc或eglibc)
/path/to/libc/source/configure --build=x86_64-centos-linux-gnu \ --host=arm-cortex_a8-linux-gnueabi --target=arm-cortex_a8-gnueabi \ --prefix=/usr make -j4 make -j4 install_root=${SYSROOT} install
4、编译完整gcc
make -j4 make install
Just For Me
1.
../binutils-2.23.2/configure --build=x86_64-centos-linux-gnu \ --host=x86_64-centos-linux-gnu --target arm-cortex_a8-linux-gnueabi \ --prefix=/opt/arm-cortex_a8-linux-gnueabi --with-float=softfp \ --with-sysroot=/opt/arm-cortex_a8-linux-gnueabi/sysroot --enable-lto \ --disable-nls make -j6 make install
2.
../gcc-4.8-4.8.1.orig/gcc-4.8.1/configure --build=x86_64-centos-linux-gnu \ --host=x86_64-centos-linux-gnu --target=arm-cortex_a8-linux-gnueabi \ --prefix=/opt/arm-cortex_a8-linux-gnueabi \ --with-sysroot=/opt/arm-cortex_a8-linux-gnueabi/sysroot \ --with-newlib --enable-threads=no --disable-shared \ --with-arch=armv7-a --with-cpu=cortex-a8 \ --with-tune=cortex-a8 --with-fpu=neon --with-float=softfp --enable-__cxa_atexit \ #--with-host-libstdcxx="-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm \ #-L/home/renxifeng/linaro-gcc/.build/arm-cortex_a8-linux-gnueabi/buildtools/lib -lpwl" / --enable-lto --disable-libgomp --disable-libmudflap --disable-nls --enable-multilib make -j6 all-gcc make install
3.
../libc/configure --prefix=/usr --build=x86_64-centos-linux-gnu \ --host=arm-cortex_a8-linux-gnueabi --cache-file=config.cache --without-cvs \ --disable-profile --without-gd \ --with-hearders=/opt/arm-cortex_a8-linux-gnueabi/sysroot/usr/include \ --enable-obsolete-rpc --enable-kernel=3.0.83 --with-__thread --with-tls \ --enable-shared --with-fp --enable-add-ons=nptl,ports make -j6 make -j6 install_root=/opt/arm-cortex_a8-linux-gnueabi/sysroot/ install
4.
../gcc-4.8-4.8.1.orig/gcc-4.8.1/configure --build=x86_64-centos-linux-gnu \ --host=x86_64-centos-linux-gnu --target=arm-cortex_a8-linux-gnueabi \ --prefix=/opt/arm-cortex_a8-linux-gnueabi \ --with-sysroot=/opt/arm-cortex_a8-linux-gnueabi/sysroot --enable-shared \ --with-arch=armv7-a --with-cpu=cortex-a8 \ --with-tune=cortex-a8 --with-fpu=neon --with-float=softfp --enable-__cxa_atexit \ #--with-host-libstdcxx="-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm \ #-L/home/renxifeng/linaro-gcc/.build/arm-cortex_a8-linux-gnueabi/buildtools/lib -lpwl" / --enable-lto --disable-libgomp --disable-libmudflap --disable-nls --enable-multilib make -j6 make install
快速解决 VS2010 _ITERATOR_DEBUG_LEVEL doesn't match error.