2011-10-25

golden dict partener

问题:
金典中添加的在线辞典(方法见以前的blog) 无法播放在线辞典网页的真人发音 又没有办法在浏览器中打开 甚至连个地址都复制不出来

解决:
自己写个网页 骗取金典生成的在线辞典查词地址 然后复制 粘贴 到浏览器打开 (ubuntu下用鼠标轮下键更加快捷)


<script>
var ods = {
ciba:"http://www.iciba.com/%GDWORD%/",
youdao:"http://dict.youdao.com/search?q=%GDWORD%",
dictcn:"http://dict.cn/%GDWORD%"
};
var goods = location.hash.split(/[#@]/);
document.write(ods[goods[2]].replace('%GDWORD%',goods[1]));
</script>


以上代码存成文件,例如 goldenDictPartener.htm 用web服务器发布

用以下地址和ciba在线辞典配合使用 就可以得到ciba的查词地址了 选中 鼠标轮下键在google chrome里面新建tab页即可
http://127.0.0.1/goldenDictPartener.htm#%GDWORD%@ciba

2011-10-22

Update dell studio 1558 bios with winpe

Are you going to update your bios?
Have you purged windows from your computer ? Are you enjoying linux? 
Yes? Go on...

1.Build your winpe from other one's windows 7

Booting Windows PE from a USB Drive Walkthrough

Άρθρο από Lefteris Karafilis Mon, 01/11/2010 - 13:15

Windows preinstallation environment (windows PE) is a bootable tool that provides a minimal set of operating system features for installation, troubleshooting, and recovery. In this post I am going to explain how you can setup a windows PE environment to boot from a USB drive in 5 simple steps:

  1. Download and install windows AIK from Microsoft
  2. Prepare WinPE image
  3. Add drivers to your WinPE image
  4. Setup USB drive to be able to boot
  5. Copy the files to USB drive

Download and install windows AIK from Microsoft

Windows AIK is a set of tools and documentation that support the configuration and deployment of Windows® operating systems. You can download WAIK from Microsoft download center http://www.microsoft.com/download (search term WAIK) and install it to your computer for free.

After WAIK installation a set of folders will be created by default under \program files\Windows AIK that contain the appropriate files and tools to create and manage WinPE images, unattended installation files, a volume activation management tool, SDKs and some sample files.

Prepare WinPE image

After installing WAIK you are ready to prepare your WinPE image. In order to do so you have to go to \program files\Windows AIK\Tools\PETools (default location) and copy your candidate WinPE image files to a temporary location. To do that you issue the command copype.cmd <x86|amd64|ia64> <temporary location> for example copype.cmd x86 c:\temp\WinPEx86 (x86 is the 32bit architecture).

As a final step you need to copy and rename the base image file c:\temp\WinPEx86\winpe.wim (based on the above example) to the ISO\Sources subdirectory of this temporary folder as boot.wim. To do this, issue the command copy c:\temp\WinPEx86\winpe.wim c:\temp\WinPEx86\ISO\sources\boot.wim.

Add drivers to your WinPE image (optional)

In case you need to preload any drivers to your WinPE image or add optional components you have to follow some additional steps outlined below. In case you don't you skip to the next section.

First step is to create a directory, for example c:\temp\WinPEx86\Drivers, and download your drivers in this location. Note that the drivers must be fully extracted with their .inf files exposed in order to be added to the WinPE image.

Second step is to mount the base WinPE image copied previously. To do that execute "c:\Program Files\Windows AIK\Tools\Servicing\Dism.exe" /mount-Wim /WimFile:c:\temp\WinPEx86\ISO\Sources\boot.wim /index:1 /MountDir:c:\temp\WinPEx86\Mount.

Third step is to add the downloaded drivers to the Image by executing "c:\Program Files\Windows AIK\Tools\Servicing\Dism.exe" /image:c:\temp\WinPEx86\Mount /Add-Driver /Driver:c:\temp\WinPEx86\drivers /recurse /ForceUnsigned. By including the /recurse switch you tell to the command to recurse the drivers' subfolders for valid .inf drivers and by including the /ForceUnsigned you tell the command to ignore driver signing requirements.

Fourth step is to unmount and commit the WinPE image by executing "c:\Program Files\Windows AIK\Tools\Servicing\Dism.exe" /unmount-wim /MountDir:c:\temp\WinPEx86\Mount /commit.

Note, that you can add additional files and folders to your custom WinPE image simply by copying your files to the c:\temp\WinPEx86\Mount. These files will be loaded to the RAM drive after WinPE boot (c:\). If you don't want these files to be loaded to the RAM Drive (consumes RAM) and be available to the USB drive instead, just copy them to a structure under c:\temp\WinPEx86\ISO folder.

Setup USB drive to be able to boot

In this step you need to use the diskpart utility (windows Vista and above O/S) to create a bootable partition to your usb drive as outlined below.

Use Diskpart to identify the disk ID of your usb drive:

 diskpart
list disk

diskpart

After you have identified your usb disk ID (based on size), you can wipe your partition information, create a new one and mark it as active.

 select disk 1
clean
create partition primary
select partition 1
active
format quick fs=ntfs
assign
exit

Copy the files to USB drive

Final step is to copy the files included under your ISO subfolder to your USB drive: xcopy c:\temp\WinPEx86\ISO\*.* f:\ /E (where f:\ is your USB drive).

Note that you may need to alter your PC's BIOS settings in order to be able to boot from USB drives and of course it needs to be USB boot capable.

Final Thoughts

In case you want to load drivers after WinPE boot you can use the drvload.exe command (drvload.exe inf_path).

To manipulate winPE environment you need to use the wpeutil <command> <argument> command. Most usable commands of wpeutil: EnableFirewall, DisableFirewall, Reboot, ShutDown, Initializenetwork.



2.Download latest bios from dell, unzip the exe file get files:
 1558_A12.exe  Version.txt  Win_1194.exe
3.Use Wine to extract the WinPhlash and bios.wph file from your ubuntu linux

because winpe from 1 have only cmd interface ,so can't run the .exe from dell, so you need a cmd version bois update tools.
 wine 1558_A12.exe
ignore any errors , but go to :
/home/andrew/.wine/drive_c/users/andrew/Temp
copy them to your usb disk


4.Reboot from usb disk, update your bios 
go to C:\ find Winphlash.exe
run: 
Winphlash.exe /BU BIOS1.WPH
or 
Winphlash64.exe /BU BIOS1.WPH

2011-10-07

史上最快的vnc(比xrdp快 慢的还可以忍受)

史上最快的vnc(比xrdp快 慢的还可以忍受)


在服务器端:
$ sudo x11vnc -nowf -noxfixes -noxdamage -auth /var/lib/gdm/:0.Xauth -display :0

在本地命令行执行命令登录服务器:
$ sudo apt-get install xtightvncviewer
$ vncviewer -encodings "tight" -compresslevel 9 -nocursorshape 10.8.0.22:1

这将把你带到物理控制台会话,你可以登录,用完请注销


已知的问题:
* 分辨率无法提高(800*600)美其名曰 快

所见所闻所思