ubuntu AMD64 问题

Posted 11 months, 1 week ago at 11:32 am. 0 comments

http://forum.ubuntu.org.cn/viewtopic.php?t=42579
http://woolzey.bokee.com/4351289.html
http://wiki.ubuntu.org.tw/index.php/Ubuntu-AMD64-Howto
http://ubuntuforums.org/showthread.php?t=341727

ubuntu amd64 下 firefox 的flash 插件无法安装。郁闷…

AMD64不支持的软件包的解决办法

* 如果你喜欢在AMD64系统上玩游戏,你需要安装emul库: emul-linux-x86-soundlibs, emul-linux-x86-sdl,和 最新的 emul-linux-x86-nvidia nvidia-kernel或者 emul-linux-x86-ati ati-kernel.
* 特别提醒 emul-linux-x86-soundlibs: 确保alsa库的 emul库版本和原生库的版本一致.
* 如果你有nforce250的主板芯片,你需要2.6.8以後的内核.
* 如果你希望观看视频片段,在某些格式上可能会遇到问题,这归根于大多数人用mplayer和xine能使用的 win32codecs 解码器,部分解码器现在还没有64位的版本.你可以使用mplayer-bin来使用32位的库文件来解决问题
* Moziila和Firefox的 flash插件有问题 可以参看这里
* Java问题现在可以解决了,我装的是sun-jdk-1.5.08-amd64.bin portage里面有相关的软件包.直接 emerge 就可以了

NVIDIA

NVIDIA 在AMD64上的驱动与x86得到的支持相同

via http://zh.gentoo-wiki.com/HOWTO_AMD_64

amd64: 安装 Mozilla/Firefox 插件

注意:你必须安装通过以上任一种方法安装其余的 Java 。

如果你 JRE 的发布中包括了 Mozilla/Firefox 的插件(目前 Sun 公司还没有将它包括),你可以在 Mozilla 和 Firefox 插件的目录中创建一个指向它的符号链接。如果拷贝插件的话好象不能使用。根据你使用一下两种不同的安装方法安装目录是不同的,见下文:

第一种方法:

$ sudo ln -sf /usr/local/j2re-1.4.2/plugin/amd64/mozilla/libjavaplugin_oji.so /usr/lib/mozilla-firefox/plugins/libjavaplugin.so

$ sudo ln -sf /usr/local/j2re-1.4.2/plugin/amd64/mozilla/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin.so

或者第二种方法:

$ sudo ln -sf /usr/lib/j2re1.4-blackdown/plugin/amd64/mozilla/libjavaplugin_oji.so /usr/lib/mozilla-firefox/plugins/libjavaplugin.so

$ sudo ln -sf /usr/lib/j2re1.4-blackdown/plugin/amd64/mozilla/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin.so

1 - 安装 32 位的应用程序支持 :

* sudo apt-get install ia32-libs ia32-libs-gtk linux32

2 -从 www.getfirefox.com 下载 32 位的 firefox

*

http://www.mozilla.com/products/download.html?product=firefox-1.5&os=linux&lang=en-US

(另一种方法在新版本的 Firefox 在细节上有些不同 (在 /opt 中安装;使用一个新命令替换掉正常的 /usr/bin/firefox), 但是我没试过。)

3 - 像你经常在 Ubuntu 中解压文件那样把下载的文件包解压, 并进入解压后的目录:

* cd ~/Desktop/firefox

*

(或者进入到你解压到的地方)

4 - 创建一个安装 32 位 firefox 的文件夹,并将 firefox 拷贝到那儿:

* mkdir /usr/local/firefox32 cp -r -p ./* /usr/local/firefox32/

5 - 创建一个执行 32 位 firefox 的文件:

* sudo nano /etc/pango32/pangorc

* 加入下面的文本:
o [Pango]

ModuleFiles=/etc/pango32/pango.modules [PangoX]

AliasFiles=/etc/pango/pangox.aliases
o 然后创建另外一个文件 加入下面的文本:
+ #!/bin/sh export GTK_PATH=/usr/lib32/gtk-2.0 export PANGO_RC_FILE=/etc/pango32/pangorc linux32 /usr/local/firefox32/firefox $@

6 - 使它能正常启动:

* sudo chmod +x /usr/local/bin/firefox32

7 - 测试你新 32 位的 firefox 是不是正常工作:

*

firefox32 &

*

(它会警告但是没有关系)

11 - 安装可以启动 applets 的 Java 播放器,到 http://www.java.com, 并下载给 linux 32 位 linux 计算机的文件 (我非常惊喜的发现这个文件在 amd64 的 Breezy 安装中可以正常工作) :

*

http://www.java.com/en/download/linux_manual.jsp

12 - 安装 java :

* sudo bash chmod 777 ./jre-1_5_0_06-linux-i586.bin

(这个文件名由你下载的 java 版本决定)
* /jre-1_5_0_06-linux-i586.bin

(它会问一些问题) mkdir /usr/local/java32 cp -r -p ./jre1.5.0_06/* /usr/local/java32 cd /usr/local/firefox32/plugins/ ln -s /usr/local/java32/plugin/i386/ns7/libjavaplugin_oji.so ./

13 - 重启 firefox32 并检查 Java 是否在工作:

*

firefox32 &

14 - 访问: http://www.java.com/en/download/installed.jsp

15 - 在顶上的面板中添加一个启动这个’酷’浏览器的图标 :

* 鼠标右键点击顶上的面板 选择:添加到面板 选择:自定义程序启动器,并点击 ‘添加’按钮
o Name : firefox32 Generic name : Firefox 1.5 32 bits Comment : Firefox with ‘Flash’ and ‘Java’ Command : firefox32 Type : Application Icon : /usr/share/pixmaps/mozilla-firefox.png

16 - 享受网络吧 !

什么是chroot?chroot基本上重定义了一个程序的运行环境。更确切地说,它重定义了一个程序(或登录会话)的“ROOT”目录或“/”。
也就是说,对于chroot了的程序或shell来说,chroot环境之外的目录是不存在的。

那这样又有什么用呢?如果入侵者入侵了你的电脑,他们就不能看见你系统里所有的文件了。
这样,就限制了入侵者可能执行的命令,从而禁止了他们溢出不安全文件的机会。但唯一的缺点是,
我认为这不能阻止他们察看网络连接和其他资

Popularity: 14% [?]

Tags:

fiesty amd64

Posted 11 months, 1 week ago at 11:32 am. 0 comments

虽然 hp 3239 笔记本 feisty 跑的不错!没有什么问题,但毕竟不是 amd64 啊,很想感受一下 64 的区别。正在下载,刻盘,准备系统崩溃ing…

http://mirror.lupaworld.com/ubuntu/releases/feisty/

http://mirror.lupaworld.com/ubuntu/releases/feisty/ubuntu-7.04-beta-desktop-amd64.iso

如何烧录

https://help.ubuntu.com/community/BurningIsoHowto

如何验证完整性
https://help.ubuntu.com/community/HowToMD5SUM

Popularity: 10% [?]

Tags:

ubuntu 下的音乐播放器

Posted 11 months, 1 week ago at 11:32 am. 0 comments

Beep Media Player
简单的播放器

Banshee
音乐管理和播放
Import, organize, play, and share your music using Banshee’s simple, powerful interface.
Rip CDs, play and sync your iPod, create playlists, and burn audio and MP3 CDs. Most portable music devices are supported.

Rhythmbox
带 Album 管理的播放器

Listen

据说是最好的音乐播放器。

A nice music player and manager for GNOME

With Listen you can:

- Play your favorite songs
- Manage your library
- Make playlists
- Automatically or manually download album covers
- Automatically synchronize album covers with iPod
- Easily burn an audio CD
- Directly get informations from wikipedia when you play a song
- See the lyrics of a song
- Have statistics about your favorite songs, albums or artists
- Listen to web radio
- Submit your songs to Audioscrobbler
- Quick access to last.fm related file

XMMS
老牌播放器,现在显得有点过时了。

quod libet

amarok
KDE下的播放器。功能强大。我喜欢它的 win+b 下一首歌快捷键,以及显在在系统托盘功能。

Muine Music Player
简洁、舒适的播放器

mplayer
强大的播放器,甚至可以在tty终端中播放。就是图形界面差了些。

kaffeine
KDE 音乐播放器。

Juk
KDE 播放器

Quod Libet
Quod Libet is a GTK+-based audio player written in Python. It’s designed around the idea that you know how to organize your music better than we do. It lets you make playlists based on regular expressions (don’t worry, regular searches work too). It lets you display and edit any tags you want in the file. And it lets you do this for all the file formats it supports — Ogg Vorbis, FLAC, MP3, Musepack, and MOD.

exaile

Exaile
is a music player aiming to be similar to KDE’s Amarok, but for GTK+ and written in Python.

Decibel Audio Player

Decibel Audio Player is a GTK+ open-source (GPL license) audio player designed for GNU/Linux, which aims at being very straightforward to use by mean of a very clean and user friendly interface. It is especially targeted at Gnome and will follow as closely as possible the Gnome HIG.

相关日志:

linux mp3 中文乱码问题
ubuntu 媒体
Guide to Best Linux [Ubuntu (GNOME)] Applications
ubuntu 下中文字幕问题
ubuntu 下让 totem 播放 rmvb
ubuntu feisty amd64 播放 rmvb 问题

Popularity: 70% [?]

Tags: , , , , , , , , , , , , ,

ubuntu feisty amd64 安装 flash

Posted 11 months, 1 week ago at 11:32 am. 0 comments

以前在新利得里,安装过一个 moziila-flash的插件,似乎也能运行flash,但功能不全。下面的方法更好一些。

nspluginwrapper is an Open Source compatibility plugin for Netscape 4 (NPAPI) plugins. That is, it enables you to use plugins on platforms they were not built for. For example, you can use the Adobe Flash plugin on Linux/x86_64, NetBSD and FreeBSD platforms.

nspluginwrapper is distributed under the terms of the GNU General Public License (GPL).

download nspluginwrapper

其实在ubuntuforum.org已经有人解决了。原帖在此:http://ubuntuforums.org/showthread.php?t=341727
这里重新提一下,与原帖稍有不同。
通过nspluginwrapper使64位的firefox调用32位的flash player 9以实现flash显示,这是迄今为止最完美的flash解决方案。
废话完毕。

0
代码:
sudo apt-get install ia32-libs ia32-libs-gtk linux32 lib32asound2
或许你可以冒险少装一个。

1 去nspluginwrapper主页下载rpm自己转或者从附件下载alien装好的deb包并安装。

2 去adobe那下载flash player 9

3 将libflashplayer.so复制到~/.mozilla/plugins/

4代码:
nspluginwrapper -i ~/.mozilla/plugins/libflashplayer.so

5代码:
nspluginwrapper -l

若返回
代码:
/home/’whoami’/.mozilla/plugins/npwrapper.libflashplayer.so
Original plugin: .mozilla/plugins/libflashplayer.so
Wrapper version string: 0.9.91.2

类似信息,则OK。

运行:nspluginwrapper -l
出现:段错误 (core dumped)

不过还是能用了。
via http://forum.ubuntu.org.cn/viewtopic.php?t=42579

相关日志:

%RELATEDPOSTS%

Popularity: 30% [?]

Tags: , , , , , , , ,

352 种linux发行版图标

Posted 11 months, 1 week ago at 11:32 am. 0 comments

来自 http://www.gridter.com/linx/linux.html

Popularity: 26% [?]

Tags: , , , , , , , , ,

为你的笔记本电脑节省电源(转)

Posted 11 months, 1 week ago at 11:32 am. 0 comments

via 为你的笔记本电脑节省电源

powertop 通过降低cpu工作时钟来节电,可惜我的 amd 还要等待 Linux kernel version 2.6.23

fcicq 评论如下:

(1) tickless(CONFIG_NO_HZ)
x86 平台的 tickless 在 2.6.21 进入 mainline
amd64/ppc等平台应该在 2.6.23

(2) 效果
powertop官方有一位工程师把自己的本子的电池时间从4h->7h
(不敢相信这个事实…)

(3) 不仅是笔记本
台式机省电效果也是有的,不过没这么明显罢了

(4) 工具的作用
这东西不是用来找应用程序的.
(因为这些操作基本都不用你做)

都已经有总结了,比如降低无线功率,打开USB休眠之类,这些才是电池的杀手
(更重要的,打开laptop_mode)

http://www.linuxpowertop.org/known.php

Popularity: 14% [?]

Tags: , , , ,

dpkg 命令解释

Posted 11 months, 1 week ago at 11:31 am. 0 comments

最常用的就是-i,-r。简单,安装/卸载。不用说。
下面简单介绍最常用,也最好用的4种命令参数。也好记,L,l,S,s。大小L和大小S。
——————————-
dpkg -L|–listfiles <软件包名> … 列出所有“属于”该软件包(或多个软件包) 的文件
相当与synaptic的看包属性:
~$ dpkg -L gcc-3.4|head -n 5
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/gcc-3.4-base
——————————-
dpkg -l|–list [<表达式> … 简明地列出软件包的状态
查找包,使用表达式,方便很多
$ dpkg -l gcc*
期望状态=未知(u)/安装(i)/删除(r)/清除(p)/保持(h)
| 当前状态=未(n)/已安装(i)/仅存配置(c)/仅解压缩(U)/配置失败(F)/不完全安装(H)
|/ 错误?=(无)/保持(?)/须重装(R)/两者兼有(#) (状态,错误:大写=故障)
||/ 名称 版本 简介
+++-==============-==============-============================================
ii gcc 3.3.5-1 The GNU C compiler
un gcc-2.95 <无> (无相关介绍)
un gcc-3.2 <无> (无相关介绍)
ii gcc-3.3 3.3.5-8ubuntu2 The GNU C compiler
ii gcc-3.3-base 3.3.5-8ubuntu2 The GNU Compiler Collection (base package)
un gcc-3.3-doc <无> (无相关介绍)
ii gcc-3.4 3.4.3-9ubuntu4 The GNU C compiler
ii gcc-3.4-base 3.4.3-9ubuntu4 The GNU Compiler Collection (base package)
un gcc-3.4-doc <无> (无相关介绍)
un gcc-3.5-base <无> (无相关介绍)
ii gcc-4.0-base 4.0.0-7ubuntu6 The GNU Compiler Collection (base package)
un gcc-doc <无> (无相关介绍)
——————————-
dpkg -S|–search <表达式> … 搜寻拥有该文件(或多个文件)的软件包
由单个(多个)文件回溯找包:
$ dpkg -S /usr/share/doc/gcc-3.4-base/FAQ.gz
gcc-3.4: /usr/share/doc/gcc-3.4-base/FAQ.gz

链接也可以自动处理。
$ ls -l /usr/bin/ppp*
lrwxrwxrwx 1 root root 15 2005-09-17 01:11 /usr/bin/pppoeci -> eciadsl-pppoeci

$ dpkg -S /usr/bin/pppoeci
eciadsl-usermode: /usr/bin/pppoeci
——————————-
dpkg -s|–status <软件包名> … 显示软件包详尽的状态信息
相当于synaptic看依赖关系。
$ dpkg -s gcc-3.4
Package: gcc-3.4
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 4404
Maintainer: Debian GCC maintainers
Architecture: i386
Version: 3.4.3-9ubuntu4
Provides: c-compiler
Depends: gcc-3.4-base (>= 3.4.3-9ubuntu4), libgcc1 (>= 1:3.4.3-9ubuntu4), libc6 (>= 2.3.2.ds1-4), cpp-3.4 (>= 3.4.3-9ubuntu4), cpp-3.4 (<< 3.4.5), binutils (>= 2.15-5)
Recommends: libc6-dev (>= 2.3.2.ds1-16)
Suggests: gcc-3.4-doc (>= 3.4.3-9ubuntu4), amd64-libs-dev
Conflicts: gcc-3.2 (<= 1:3.2.3-0pre8)
Description: The GNU C compiler
This is the GNU C compiler, a fairly portable optimizing compiler for C.
.
ABIs changed between gcc-3.3 and gcc-3.4 on some architectures (hppa, m68k,
mips, mipsel, sparc). Please read /usr/share/doc/gcc-3.4/README.Debian
for more details.
via ubuntu 中文

Popularity: 10% [?]

Tags: , , , , , ,

cedega war3测试报告

Posted 11 months, 1 week ago at 11:31 am. 0 comments

我使用的是 cedega5.1
在公司用的是 P4 2.4G 512M MX400 64M
家里用的是 AMD64 2800+ 1G FX5200 128M
系统dapper fight5
C: opengl测试通过,3d加速fail H: 均测试通过

使用命令方式运行 如: cedega ../XXXX/XXX/War3.exe -OpenGL

公司:很卡,基本上不能玩
家里:很卡,基本上不能玩

使用图形界面启动:参数为默认
公司:比较流畅,鼠标反应稍慢
家里:很完美,完全可以随意操作

。。。。 。。。

Popularity: 8% [?]

Tags:

ubuntu Nvidia 驱动安装脚本

Posted 11 months, 1 week ago at 11:30 am. 0 comments

guoshuang2006-09-24+Envy的安装有所变化,请到官方站点下载 deb 然后

1) Download and install the deb package
2) Log out and press CTRL+ALT+F1 (so as to get out of the Desktop Environment, i.e. you’ll see ONLY the command line)
3) Log in (if required)
4) Run “envy” by opening Terminal or Konsole and typing (quite obviously):
envy
5) Choose to install or uninstall the driver (from the textual interface)

下面是原来的老办法

本来是没问题的,但在安装Nvidia 官网的NVIDIA-Linux-x86-1.0-8762-pkg1.run时,出现问题于是连原来的驱动也不能使用,而只能改

Section “Device”
Identifier “NVIDIA Corporation NV11 [GeForce2 MX/MX 400]”
Driver “nvidia”
EndSection

Section “Device”
Identifier “NVIDIA Corporation NV11 [GeForce2 MX/MX 400]”
Driver “nv”
EndSection

但这样没有加速,不能跑游戏。折腾了N天也无法解决。今天找到这个脚本Envy,执行后搞定。

我用的是 envy_8762_32,内容如下:

#!/bin/bash
# “Envy”
# Written by Alberto Milone (aka “tseliot”)
# Licence GPL
# Version 0.41
# For Ubuntu Dapper Drake 32 bit ONLY!!!
ARCA=x86
VERA=1.0-8762
PACA=pkg1
DRIVER=NVIDIA-Linux-$ARCA-$VERA-$PACA.run
MD5OLD=86bcf4a3a9d441dff9e25b82ec8a6060
NVIDIAFTP=Linux-$ARCA/$VERA

function installer {
echo -e “Do you want to install or uninstall the Nvidia driver $VERA ?\n(Type “i” to install or “u” to uninstall) (or press CTRL+C to exit)”
read inst
if [ "$inst" = "i" ]
then sudo apt-get –assume-yes –force-yes –purge remove linux-restricted-modules-`uname -r` linux-restricted-modules-common nvidia-glx nvidia-settings nvidia-kernel-common;
sudo rm /etc/init.d/nvidia-* >&/dev/null;

sudo apt-get –assume-yes –force-yes install linux-headers-`uname -r` build-essential gcc gcc-3.4 xserver-xorg-dev;

#AVOID CONFLICTS
sudo rm /usr/lib/xorg/modules/extensions/libglx.so.* >&/dev/null;
sudo rm /usr/lib/libGLcore.so.* >&/dev/null;

#GO TO YOUR HOME FOLDER
cd $HOME

#DOWNLOAD AND/OR CHECK THE NVIDIA INSTALLER
if [ ! -f $DRIVER ]
then wget -c ftp://download.nvidia.com/XFree86/$NVIDIAFTP/$DRIVER;
if [ ! -f $DRIVER ]
then echo “ERROR: I can’t find the Nvidia installer. Make sure it’s in the same folder of this script”; exit
fi

MD5PRINT1=`md5sum $DRIVER | cut -d ” ” -f1`
if [ "$MD5PRINT1" = "$MD5OLD" ]
then echo “md5sum is ok”;
else echo “ERROR: md5sum is not correct!”; exit;
fi
else
MD5PRINT2=`md5sum $DRIVER | cut -d ” ” -f1`
if [ "$MD5PRINT2" = "$MD5OLD" ]
then echo “md5sum is ok”
else echo “ERROR: md5sum is not correct!”; exit;
fi
fi

#FIND AND DELETE THE EXTRACTED FOLDER
if [ -f NVIDIA-Linux-$ARCA-$VERA-$PACA ]
then sudo rm -R NVIDIA-Linux-$ARCA-$VERA-$PACA >&/dev/null;
fi

#EXTRACT THE INSTALLER
sh $DRIVER –extract-only;

cd NVIDIA-Linux-$ARCA-$VERA-$PACA;

#BACKUP THE XORG.CONF
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup_`date +%Y%m%d%H%M`;

#CHECK AND/OR SET GCC
if [ `uname -r | grep "2.6.12"` -o `uname -r | grep "2.6.11"` -o `uname -r | grep "2.6.10"` ]
then sudo ln -sf /usr/bin/gcc-3.4 /usr/bin/gcc
fi

#SUPPORT FOR KERNEL 2.6.14 OR HIGHER
if ls /usr/src/ | grep “kernel-headers-`uname -r`”
then
if [ `uname -r | grep "2.6.14"` -o `uname -r | grep "2.6.15"` -o `uname -r | grep "2.6.16"` -o `uname -r | grep "2.6.17"` ]
then
cd /usr/src/kernel-headers-`uname -r`/arch/i386/
sudo rm Makefile.cpu >&/dev/null;
sudo wget www.albertomilone.eu/ubuntu/nvidia/scripts/Makefile.cpu
cd /usr/src/kernel-headers-`uname -r`/
sudo make prepare
sudo make prepare scripts
cd $HOME/NVIDIA-Linux-$ARCA-$VERA-$PACA;
fi
fi

#UBUNTU AMD64 CHECK
if [ ! -f /usr/lib64/xorg/ ]
then
#SEE IF THE KERNEL IS RECOMPILED OR NOT (32BIT)
if ls /usr/src/ | grep “kernel-headers-`uname -r`”
then sudo ./nvidia-installer -n -s –x-prefix=/usr/lib/xorg/modules –kernel-source-path=/usr/src/kernel-headers-`uname -r`
else sudo ./nvidia-installer -n -s –x-prefix=/usr/lib/xorg/modules –kernel-source-path=/usr/src/linux-headers-`uname -r`
fi
else
#SEE IF THE KERNEL IS RECOMPILED OR NOT (64BIT)
if ls /usr/src/ | grep “kernel-headers-`uname -r`”
then sudo ./nvidia-installer -n -s –x-prefix=/usr/lib64/xorg/modules –kernel-source-path=/usr/src/kernel-headers-`uname -r`
else sudo ./nvidia-installer -n -s –x-prefix=/usr/lib64/xorg/modules –kernel-source-path=/usr/src/linux-headers-`uname -r`
fi
fi

#RESTORE GCC (SYMLINK)
if [ `uname -r | grep 2.6.12` -o `uname -r | grep 2.6.11` -o `uname -r | grep 2.6.10` ]
then sudo ln -sf /usr/bin/gcc-4.0 /usr/bin/gcc
fi

#Return to previous directory
cd ..

choice=”nada”;
while [ "$choice" = "nada" ]; do
echo “Do you want your xorg.conf to be automatically configured? (y/n) \ “Yes” is the default answer”;
read choice;
if [ "$choice" = "y" ]
then sudo /usr/bin/nvidia-xconfig
elif [ "$choice" = "" ]
then sudo /usr/bin/nvidia-xconfig
elif [ "$choice" = "n" ]
then echo “Remember to set the Driver to nvidia in your xorg.conf”
elif [ "$choice" = "no" ]
then echo “Remember to set the Driver to nvidia in your xorg.conf”
else choice=”nada”
fi;
done;

sudo modprobe nvidia;

echo “Do you want to Start the Xserver now? (y/n) \ “Yes” is the default answer”;
read server;
if [ "$server" = "y" ]
then
sudo /etc/init.d/gdm restart >&/dev/null; sudo /etc/init.d/kdm restart >&/dev/null;

elif [ "$server" = "" ]
then
sudo /etc/init.d/gdm restart >&/dev/null; sudo /etc/init.d/kdm restart >&/dev/null;

elif [ "$server" = "n" ]
then echo “Remember to start the xserver manually”
elif [ "$server" = "no" ]
then echo “Remember to start the xserver manually”
fi;

elif [ "$inst" = "u" ]
then sudo apt-get –assume-yes –force-yes –purge remove linux-restricted-modules-`uname -r` linux-restricted-modules-common nvidia-glx nvidia-settings nvidia-kernel-common;

#GO TO YOUR HOME FOLDER
cd $HOME

if [ ! -f NVIDIA-Linux-$ARCA-$VERA-$PACA ]
then
if [ ! -f $DRIVER ]
then wget ftp://download.nvidia.com/XFree86/$NVIDIAFTP/$DRIVER;
if [ ! -f $DRIVER ]
then echo “ERROR: I can’t find the Nvidia installer. Make sure it’s in the same folder of this script”; exit
fi
MD5PRINT1=`md5sum $DRIVER | cut -d ” ” -f1`
if [ "$MD5PRINT1" = "$MD5OLD" ]
then echo “md5sum is ok”;
else echo “ERROR: md5sum is not correct!”; exit;
fi

else MD5PRINT2=`md5sum $DRIVER | cut -d ” ” -f1`
if [ "$MD5PRINT2" = "$MD5OLD" ]
then echo “md5sum is ok”;
else echo “ERROR: md5sum is not correct!”; exit;
fi

fi

sh $DRIVER –extract-only;

fi

cd NVIDIA-Linux-$ARCA-$VERA-$PACA;
sudo ./nvidia-installer –uninstall;
sudo rm /etc/init.d/nvidia-* >&/dev/null;

#UBUNTU AMD64 CHECK
if [ ! -f /usr/lib64/xorg/ ]
then
sudo rm /usr/lib/xorg/lib/libX* >&/dev/null;
sudo rm /usr/lib/xorg/modules/libX* >&/dev/null;

sudo rm /usr/lib/xorg/lib/modules/drivers/nvidia_drv.* >&/dev/null;
sudo rm /usr/lib/xorg/modules/drivers/nvidia_drv.* >&/dev/null;

#AVOID CONFLICTS
sudo rm /usr/lib/xorg/modules/extensions/libglx.so.* >&/dev/null;
sudo rm /usr/lib/libGLcore.so.* >/dev/null;

sudo rm /usr/lib/xorg/lib/modules/extensions/libglx.so* >&/dev/null;

else

sudo rm /usr/lib64/xorg/lib/libX* >&/dev/null;
sudo rm /usr/lib64/xorg/modules/libX* >&/dev/null;

sudo rm /usr/lib64/xorg/lib/modules/drivers/nvidia_drv.* >&/dev/null;
sudo rm /usr/lib64/xorg/modules/drivers/nvidia_drv.* >&/dev/null;

#AVOID CONFLICTS
sudo rm /usr/lib64/xorg/modules/extensions/libglx.so.* >&/dev/null;
sudo rm /usr/lib64/libGLcore.so.* >&/dev/null;

sudo rm /usr/lib64/xorg/lib/modules/extensions/libglx.so* >&/dev/null;
fi

else echo ‘You should type “i” or “u”! (or press CTRL+C to exit)’; installer;
fi
}

#set -x
#set -v

sudo /etc/init.d/gdm stop >&/dev/null; sudo /etc/init.d/kdm stop >&/dev/null;
installer

使用方法:

复制上面内容为文件 nvidia,ctrl+alt+backspace 退出 xserver。登录。进入 nvidia 所在目录。

chmod a+x nvidia
./nvidia

Popularity: 13% [?]

Tags: , , , , , ,

ad 468x60