如何在Ubuntu Server 8.10上运行USDownloader
在自动机上运行最好? 文件共享下载 - 在无GUI(或他们说无头)的Linux服务器(在我的例子是Ubuntu Server 8.10)中的俄语Universal Share Downloader(USD)( http://www.dimonius.ru/ )我们将需要四步。 最复杂的事情就是设置X-Xvfb的“假”帧缓冲版本。 其余的很容易
那我们走吧
1) - 设置XVFB,葡萄酒和CABEXTRACT -
==安装Xvfb,wine和cabextract:
$ sudo apt-get install xvfb wine cabextract
由于xvfb( https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/294454 )中的次要打包错误,我们需要通过安装一些其他软件包进行补偿:
$ sudo apt-get install xfs xfonts-scalable xfonts-100dpi
==开始Xvfb:
$ /usr/bin/X11/Xvfb :10.10 -screen 10 800x600x16 -ac -br -kb -c -fbdir /var/tmp/ &
**在这一步,您可能会收到默认Xorg配置的几个错误(由于xvfb包中提到的错误) - 所以这里是我的conf文件的参考:
$ cat /etc/X11/xorg.conf
# xorg.conf (X.Org X Window System server configuration file) # # This file was generated by dexconf, the Debian X Configuration tool, using # values from the debconf database. # # Edit this file with caution, and see the xorg.conf manual page. # (Type "man xorg.conf" at the shell prompt.) # # This file is automatically updated on xserver-xorg package upgrades *only* # if it has not been modified since the last upgrade of the xserver-xorg # package. # # If you have edited this file but would like it to be automatically updated # again, run the following command: # sudo dpkg-reconfigure -phigh xserver-xorg Section "InputDevice" Identifier "Generic Keyboard" Driver "kbd" Option "XkbRules" "xorg" Option "XkbModel" "pc105" Option "XkbLayout" "us,ru" Option "XkbVariant" ",winkeys" Option "XkbOptions" "grp:caps_toggle,grp_led:scroll" EndSection Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" EndSection Section "Device" Identifier "Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Int egrated Graphics Device" EndSection Section "Monitor" Identifier "LG" EndSection Section "Screen" Identifier "Default Screen" Device "Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graph ics Device" Monitor "LG" DefaultDepth 16 SubSection "Display" Viewport 0 0 Depth 16 Modes "800x600" "640x480" EndSubSection EndSection Section "ServerLayout" Identifier "Default Layout" Screen "Default Screen" EndSection
$ cat /etc/X11/xserver/SecurityPolicy
version-1 # $Xorg: SecurityPolicy,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ # The site policy fields are interpreted by the XC-QUERY-SECURITY-1 # authorization protocol. The values are arbitrary and site-specific. # Refer to the Security Extension Specification for the usage of the policies. #sitepolicy A #sitepolicy B #sitepolicy C # Property access rules: # property <property> <window> <permissions> # <window> ::= any | root | <propertyselector> # <propertyselector> ::= <property> | <property>=<value> # <permissions> :== [ <operation> | <action> | <space> ]* # <operation> :== r | w | d # r read # w write # d delete # <action> :== a | i | e # a allow # i ignore # e error # Allow reading of application resources, but not writing. property RESOURCE_MANAGER root ar iw property SCREEN_RESOURCES root ar iw # Ignore attempts to use cut buffers. Giving errors causes apps to crash, # and allowing access may give away too much information. property CUT_BUFFER0 root irw property CUT_BUFFER1 root irw property CUT_BUFFER2 root irw property CUT_BUFFER3 root irw property CUT_BUFFER4 root irw property CUT_BUFFER5 root irw property CUT_BUFFER6 root irw property CUT_BUFFER7 root irw # If you are using Motif, you probably want these. property _MOTIF_DEFAULT_BINDINGS root ar iw property _MOTIF_DRAG_WINDOW root ar iw property _MOTIF_DRAG_TARGETS any ar iw property _MOTIF_DRAG_ATOMS any ar iw property _MOTIF_DRAG_ATOM_PAIRS any ar iw # If you are running CDE you also need these property _MOTIF_WM_INFO root arw property TT_SESSION root irw property WM_ICON_SIZE root irw property "SDT Pixel Set" any irw # The next two rules let xwininfo -tree work when untrusted. property WM_NAME any ar # Allow read of WM_CLASS, but only for windows with WM_NAME. # This might be more restrictive than necessary, but demonstrates # the <required property> facility, and is also an attempt to # say "top level windows only." property WM_CLASS WM_NAME ar # These next three let xlsclients work untrusted. Think carefully # before including these; giving away the client machine name and command # may be exposing too much. property WM_STATE WM_NAME ar property WM_CLIENT_MACHINE WM_NAME ar property WM_COMMAND WM_NAME ar # To let untrusted clients use the standard colormaps created by # xstdcmap, include these lines. property RGB_DEFAULT_MAP root ar property RGB_BEST_MAP root ar property RGB_RED_MAP root ar property RGB_GREEN_MAP root ar property RGB_BLUE_MAP root ar property RGB_GRAY_MAP root ar # To let untrusted clients use the color management database created # by xcmsdb, include these lines. property XDCCC_LINEAR_RGB_CORRECTION root ar property XDCCC_LINEAR_RGB_MATRICES root ar property XDCCC_GRAY_SCREENWHITEPOINT root ar property XDCCC_GRAY_CORRECTION root ar # To let untrusted clients use the overlay visuals that many vendors # support, include this line. property SERVER_OVERLAY_VISUALS root ar
==设置当前显示:
$ export DISPLAY=:10.10
双击它:
$ echo $DISPLAY
==跳舞,让Xvfb正常工作(至少 - 应用程序应该不会因关键错误而崩溃)。
较小的错误(与字体相关等)不会关闭USDownloader。
尝试开始,例如:
$ wine notepad.exe &
并检查它是否正在运行:
$ ps -C notepad.exe
2) - 设置IES4LINUX -
按照可敬的作者的指示(我猜第6步是我们真正需要的Ubuntu 8.10): http : //www.tatanka.com.br/ies4linux/page/Installation : Ubuntu
3) - 设置WINDOWS脚本主机(.VBS需要) -
==下载这个伟大的脚本来自动安装windoze组件在葡萄酒上(非常感谢Dan Kegel的输入,dank@kegel.com):
http://kegel.com/wine/winetricks
我们需要使用/ Q选项删除所有不必要的(在我们的无头:)情况下)弹出式用户操作请求(“接受许可条款”等):
从>更改相应的行
try $WINE "$WINETRICKS_CACHE"/vc6redistsetup_enu.exe "/T:`$WINE winepath -w "$WINETRICKS_TMP"`" /c $WINETRICKS_QUIET
到>
try $WINE "$WINETRICKS_CACHE"/vc6redistsetup_enu.exe "/T:`$WINE winepath -w "$WINETRICKS_TMP"`" /c /Q
从>更改相应的行
$WINE "$WINETRICKS_CACHE"/vcredist.exe || true
到>
$WINE "$WINETRICKS_CACHE"/vcredist.exe /Q || true
从>更改相应的行
try $WINE "$WINETRICKS_CACHE"/WindowsXP-Windows2000-Script56-KB917344-x86-enu.exe $WINETRICKS_QUIET
到>
try $WINE "$WINETRICKS_CACHE"/WindowsXP-Windows2000-Script56-KB917344-x86-enu.exe /Q
==安装Windows脚本宿主(有必要以USD为单位运行.vbs脚本):
$ ./winetricks -v wsh56
4) - 设置USD Downloader本身 -
==下载最近的便携式blackmanos'美元装配(我们需要一个支持JavaScript的浏览器 - 汇编放置在几个文件共享主机上):
http://forum.ru-board.com/topic.cgi?forum=5&topic=27428&start=20#19
在windoze中打开包装,将其内容复制到某些Linux目录下(对于我来说,这是〜/ .wine / drive_c / usd
)。
==创建“windoze磁盘” u:\
作为我们希望USD放入下载文件的目录的软链接(对于我的情况,它是/ mm / usd
):
$ cd ~/.wine/dosdevices
$ ln -s -T /mm/usd u:
==在USDownloader.ini中
更正相应的路径(在这一步,我们将USD的默认语言更改为英文 - 在Linux上更轻松地阅读日志):
[Main] SelectLang=1 Language=USDownloader.eng.lng SaveTo=u:\ SaveToItems=u:\ ... DefaultSaveToFolder=u:\
==也在USDownloader.ini中
设置美元网络服务器开始:
[WebServer] Enabled=1 Address=0.0.0.0 Port=8088 Login=YOURLOGIN Password=YOURPASSWORD Form.AddLink.Width=400 Form.AddLink.URL.Height=200 Form.AddLink.Descr.Height=100
你自己和你的密码
当然应该是你的。 不要忘了在防火墙中打开所提到的端口(这里是8088
),用于出站连接 - 这将是管理USD的唯一方法。
==开始USD下载:
wine C:\\usd\\USDownloader.exe &
检查此过程是否正在运行:
$ ps -C USDownloader.exe
==使用您最喜爱的浏览器登录美元:
http://your.server.ip.address:8088
检查这些东西的工作原理 - 添加一些下载,同时观看USD日志:
$ tail -f ~/.wine/drive_c/usd/USDownloader.log
从存款文件下载工作正常 - 因此,似乎vbs自动化脚本按照它们应该工作。 而已。