Chinaunix首页 | 论坛 | 博客
  • 博客访问: 198017
  • 博文数量: 124
  • 博客积分: 7051
  • 博客等级: 少将
  • 技术积分: 1425
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-20 13:21
文章分类

全部博文(124)

文章存档

2008年(124)

我的朋友

分类:

2008-09-26 14:49:42

    最近特别喜欢 crystal 这款光标, 样式好看, 以下将以这款光标为例, 说下光标的安装。

    freebsd下:

          cd /usr/ports/x11-themes/cursor-crystal-theme
          make install clean

          cursor被安装的目录是
                         /usr/local/lib/X11/icons
                         /usr/X11R6/lib/X11/icons
    这里可以看见有很多的 cursor 名称, 记住这里的名称就是我们将要用到的光标的名称, 后面将要用到。
       这里我特别推荐的就时 crystal 这款光标, 与其他光标相比, 他足够出色, 以前用 redglass 这款光标, 在 根 桌面上可以显示正常, 但是一到 firefox 下, 光标便回到原来的模样, 不再是 redglass 光标样式了, 这是应为他没有定义一些 firefox 下的样式, 故而变样了。

那让我们来看下 crystal 为我们做了什么吧,以下是在 /usr/local/lib/x11/icons/crystalblue/cursors下 ls -l 的结果, 特别列出 redglass 等光标所没有帮我们做的事情。

lrwxr-xr-x  1 root  wheel      14 Sep 26 10:13 00008160000006810000408080010102@ -> v_double_arrow
lrwxr-xr-x  1 root  wheel      14 Sep 26 10:13 028006030e0e7ebffc7f7070c0600140@ -> h_double_arrow
lrwxr-xr-x  1 root  wheel      14 Sep 26 10:13 03b6e0fcb3499374a867c041f52298f0@ -> crossed_circle
lrwxr-xr-x  1 root  wheel      14 Sep 26 10:13 08e8e1c95fe2fc01f976f1e063a24ccd@ -> left_ptr_watch
lrwxr-xr-x  1 root  wheel       4 Sep 26 10:13 1081e37283d90000800003c07f3ef6bf@ -> copy
lrwxr-xr-x  1 root  wheel      17 Sep 26 10:13 14fef782d02440884392942c11205230@ -> sb_h_double_arrow
lrwxr-xr-x  1 root  wheel      17 Sep 26 10:13 2870a09082c103050810ffdffffe0204@ -> sb_v_double_arrow
lrwxr-xr-x  1 root  wheel       4 Sep 26 10:13 3085a0e285430894940527032f8b26df@ -> link
lrwxr-xr-x  1 root  wheel      14 Sep 26 10:13 3ecb610c1bf2410f44200f48c40d3599@ -> left_ptr_watch
lrwxr-xr-x  1 root  wheel       4 Sep 26 10:13 4498f0e0c1937ffe01fd06f973665830@ -> move
lrwxr-xr-x  1 root  wheel       4 Sep 26 10:13 6407b0e94181790501fd1e167b474872@ -> copy
lrwxr-xr-x  1 root  wheel       4 Sep 26 10:13 640fb0e74195791501fd1ed57b41487f@ -> link
lrwxr-xr-x  1 root  wheel       4 Sep 26 10:13 9081237383d90e509aa00f00170e968f@ -> move
lrwxr-xr-x  1 root  wheel       5 Sep 26 10:13 9d800788f1b08800ae810202380a0822@ -> hand1
lrwxr-xr-x  1 root  wheel      15 Sep 26 10:13 c7088f0f3e6c8088236ef8e1e3e70000@ -> bd_double_arrow
lrwxr-xr-x  1 root  wheel      14 Sep 26 10:13 d9ce0ab605698f320427677b458ad60b@ -> question_arrow
lrwxr-xr-x  1 root  wheel       5 Sep 26 10:13 e29285e634086352946a0e7090d73106@ -> hand2
lrwxr-xr-x  1 root  wheel      15 Sep 26 10:13 fcf1c3c7cd4491d801f1e1c78f100000@ -> fd_double_arrow
lrwxr-xr-x  1 root  wheel      15 Sep 26 10:13 ll_angle@ -> fd_double_arrow
lrwxr-xr-x  1 root  wheel      15 Sep 26 10:13 lr_angle@ -> bd_double_arrow
lrwxr-xr-x  1 root  wheel       8 Sep 26 10:13 top_left_arrow@ -> left_ptr

特别注意, 以上的软链接, 这个就是 crystal 光标之所以能够在 firefox 等软件下依旧很出色的原因, 而 redglass 却没有帮我们做。。。。。说到这里, 理所当然, 如若你喜欢别的款式的 光标, 但是 其 没有帮我们定义好这些链接, 我们就可以照这个样式, 在其 cursors 目录里面做上这些软链接就可以了。。。 好了, 下面就我就说, 怎么来 使用它吧。

1)
    以上 ports 安装的是 需要 root 用户才行, 若假设 /usr/local/lib/X11/icons 已经安装了你需要的软件, 那么只要在你 家目录下 建立以下文件之一(看你登录X的方式):
       .Xdefaults      ( startx 会读取 )
       .Xresouces      ( gdm 登录器读取此文件 )
在其中写下:
       Xcursor.theme: cyrstal      # cyrstal可以改为任何你在 /usr/local/lib/X11/icons 所看见的光标名字。
       Xcursor.theme: 16           # 定义光标的大小, 有 16 32 48 64等, 但是通常可以不定义, 默认的就很好了。

重启 X, 你将看见一款 你所期望的光标。

2)
    倘若普通用户需要安装 光标, 没有 root 密码, 并且 /usr/local 下又没有你想要的光标, 那你可以在 家目录下面 建立 ~/.icons 目录, 然后 将你要的光标样式放在这个目录里面, 如上所示, 写好 .Xdefaults .Xresouces 就可以了。

    Debian下:
          apt-get install cursor-crystal-theme
光标会放在 /usr/share/icons 或者
       /etc/X11/icons 目录下面。
    此时, 可以按照 以上所示写好 .Xdefaults 或者 .Xresouces 就行了。。。不写也没有关系, 这里 也可以用 update-alternatives --config xcursor(可能不是这个名字, 若不是, 可以进入 /etc/alternatives 下面检查下, ls -l *cursor*, 看一下具体的名字, 然后改过来就可以了, 其实这里面都是些软链接, 不用此命令自己做个链接也行 如 当安了vim时候 这里的vi将被默认指向vim, 故而启动vi时候, 实际上是vim), 系统级别的选上 X 下的 光标。
                  
阅读(783) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~