顯示具有 hal 標籤的文章。 顯示所有文章
顯示具有 hal 標籤的文章。 顯示所有文章

2009年4月8日 星期三

xorg.conf without hal


之前因為某些原因不想要開 hal (它實在是開太慢了...) 上網才發現它不是很好找,所以放上先記著(來自這裡): ##ReadMore##

# 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" "pc104" Option "XkbLayout" "us" EndSection Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" EndSection Section "Device" Identifier "Configured Video Device" Driver "intel" #Option "AccelMethod" "XAA" Option "AccelMethod" "UXA" #Option "XAANoOffscreenPixmaps" EndSection Section "Monitor" Identifier "Configured Monitor" EndSection Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" SubSection "Display" Virtual 3160 1050 EndSubSection EndSection Section "ServerLayout" Identifier "Default Layout" Option "AutoAddDevices" "off" EndSection 當然,只是個參考,要用對基本上還是需要問問 man xorg.conf 領悟它設定的精神才行。

2009年2月15日 星期日

[KDE] hal mount ntfs with write permission


其實這個設定頗有一般性,gnome 下應應該也 work
參考頁也是從 archwiki 的 hal section 下找到:url ##ReadMore##

  • 增加 /etc/hal/fdi/policy/20-ntfs-config-write-policy.fdi 檔案: <!--xml version="1.0" encoding="UTF-8"?--> <deviceinfo version="0.2"> <device> <match key="volume.fstype" string="ntfs"> <match key="@block.storage_device:storage.hotpluggable" bool="true"> <merge key="volume.fstype" type="string">ntfs-3g</merge> <merge key="volume.policy.mount_filesystem" type="string">ntfs-3g</merge> <append key="volume.mount.valid_options" type="strlist">locale=</append> </match> </match> </device> </deviceinfo> 將外接 ntfs 的磁區改用 ntfs-3g 的檔案系統,並添加 locale 的合法選項
  • 在檔案 /etc/PolicyKit/PolicyKit.conf 中的 <config> 區段內添加 <match user="$USER"> <!-- replace with your login or delete the line if you want to allow all users to manipulate devices (keep security issues in mind though) --> <match action="org.freedesktop.hal.storage.*"> <return result="yes"/> </match> <match action="hal-storage-mount-fixed-extra-options"> <!-- for internal devices mounted with extra options like a wished mount point --> <return result="yes" /> </match> <match action="hal-storage-mount-removable-extra-options"> <!-- for external devices mounted with extra options like a wished mount point --> <return result="yes" /> </match> </match> <!-- don't forget to delete this line if you deleted the first one --> 把 $USER 改為你的使用者 login name,此為允許掛載使用額外選項 (mount with extra options) ;若想要設成所有使用者皆可,把首末行去掉即可
  • 重新啟動 hal 或 reboot, 收工

2008年12月13日 星期六

what the hal with xorg


誠如我在先前幾篇文章中所碰到的問題,發現最新的 hal 和 xorg 的改變,已經讓 xorg.conf 越來越變得沒有存在的必要了。其中最有名的大概就是 fedora,根本沒有那個檔案。

而在我目前的狀況下,也發現有很多設定可以拿掉了(Archlinux, ATi Radeon Xpress 200M, hal 0.5.11, xorg-server 1.5.3),只剩下下面的三行:

Section "DRI" Mode 0666 EndSection
查看 log 也可以發現,如果可以的話已經的自動開啟 aiglx, 跑特效應該沒有問題是的確沒問題,compiz 比 kwin 順多。

2008年12月6日 星期六

wpa_supplicant gui + ethernet applet : wicd


簡單講,是一套 wireless / wired network solution, 可以支援較複雜的無線加密方式如 peap wpa, blah blah blah... 目前 svn 版本是以 python 作 gui 連同 dbus / hal 熱插技術實現方便的介面,基本上完成度十分好了,對於曾有過指令年代完成 peap 連線的我來說份外感動〒▽〒
以下是截圖: ##ReadMore##

系統圖示長這樣:

連線 list:
一些小設定,沒事預設就好:

2008年11月30日 星期日

xorg 7.4, hal 0.5.9.1 : synaptics, default mount path


主要是在最新的 hal 和 xorg 下的一些變動 ##ReadMore##

  • hal mounting options
  • 此篇的 Changing default mount options 中可以知道,過往要設定一個指定裝置的 mount option 是透過更改 hal policy 來完成的,但這很明顯不甚符合 hal 的精神:其目的即在於能提供使用者自由使用可移除裝置,所以現在新版的就把設定 mount point 的 policy 拿掉了,而需要讓 desktop environment 自己去指定 mount point,但很不幸地,目前似乎只有 gnome 可以辦到這件事....

  • synaptics
  • wiki 得知,在 Xorg 7.4 中觸控板現在也算成是 hal 的熱插拔元件,因此不需在 xorg.conf 中做設定,「理論上」是可以讓你在 desktop environment 中做自由調整,無奈此功能才剛出,根本無任何 de 有配套。目前解法如下,在 /etc/hal/fdi/policy 中建立 11-x11-synaptics.fdi:

    <!--xml version="1.0" encoding="ISO-8859-1"?--> <deviceinfo version="0.2"> <device> <match key="info.capabilities" contains="input.touchpad"> <match key="info.product" contains="Synaptics TouchPad"> <merge key="input.x11_driver" type="string">synaptics</merge> <merge key="input.x11_options.MinSpeed" type="string">0.09</merge> <merge key="input.x11_options.MaxSpeed" type="string">0.18</merge> <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge> <merge key="input.x11_options.SHMConfig" type="string">true</merge> <merge key="input.x11_options.AccelFactor" type="string">0.032</merge> <merge key="input.x11_options.LeftEdge" type="string">1700</merge> <merge key="input.x11_options.RightEdge" type="string">5300</merge> <merge key="input.x11_options.TopEdge" type="string">1700</merge> <merge key="input.x11_options.BottomEdge" type="string">4200</merge> <merge key="input.x11_options.FingerLow" type="string">25</merge> <merge key="input.x11_options.FingerHigh" type="string">30</merge> <merge key="input.x11_options.MaxTapTime" type="string">180</merge> <merge key="input.x11_options.MaxTapMove" type="string">220</merge> <merge key="input.x11_options.HorizEdgeScroll" type="string">true</merge> <merge key="input.x11_options.HorizScrollDelta" type="string">100</merge> <merge key="input.x11_options.VertEdgeScroll" type="string">true</merge> <merge key="input.x11_options.VertScrollDelta" type="string">100</merge> <!-- Restore old synaptics driver defaults removed by Fedora/RH patch --> <merge key="input.x11_options.RTCornerButton" type="string">2</merge> <merge key="input.x11_options.RBCornerButton" type="string">3</merge> <merge key="input.x11_options.TapButton1" type="string">1</merge> <merge key="input.x11_options.TapButton2" type="string">2</merge> <merge key="input.x11_options.TapButton3" type="string">3</merge> <!-- Arbitrary options can be passed to the driver using the input.x11_options property since xorg-server-1.5. --> <!-- EXAMPLE: <merge key="input.x11_options.LeftEdge" type="string">120</merge> --> </match> <match key="info.product" contains="AlpsPS/2 ALPS"> <merge key="input.x11_driver" type="string">synaptics</merge> </match> <match key="info.product" contains="appletouch"> <merge key="input.x11_driver" type="string">synaptics</merge> </match> <match key="info.product" contains="bcm5974"> <merge key="input.x11_driver" type="string">synaptics</merge> </match> </match> </device> </deviceinfo> 如此,大部份觸控版功能才能正常使用

2008年11月18日 星期二

org.freedesktop.hal.storage.mount-removable no


基本上就是,在本人更新完 hal in testing 後發現外接掛不瞭,便股溝之,得解:
(引用自網頁,適用於 SuSE 與 Archlinux) ##ReadMore##

修改 /etc/PolicyKit/PolicyKit.conf ,將以下內容加到<config version="0.1">、</config>中:

<match action="org.freedesktop.hal.storage.mount-removable"> <return result="yes"/> </match> <match action="org.freedesktop.hal.storage.mount-fixed"> <return result="yes"/> </match> <match action="org.freedesktop.hal.storage.eject"> <return result="yes"/> </match> 之後重啟 hal: [root]# /etc/rc.d/hal restart

2008年8月31日 星期日

hal auto utf8 of usb storage devices with fat32 alike (vfat)


使用 hal 來達成熱插拔的方式是不錯,但是如果沒有設定過的話,隨身碟自動掛載後中日文字都會變成亂碼一片,雖然可以從指令介面下手修正這個問題: ##ReadMore##

[root]# mount /dev/sdc1 /media/disk -o iocharset=utf8但不能直接用 file manager 看到的點入直接用就是不順心,在爬了這篇文章後就憑著直覺修改成功了。

修改方式

建立 /usr/share/hal/fdi/policy/10osvendor/10-vfat.fdi 輸入以下內容: <device> <match key="volume.fstype" string="vfat"> <merge key="volume.policy.mount_option.iocharset=utf8" type="bool">true</merge> </match> </device> 其實就是一條規則:如果裝置的檔案系統是 vfat (fat32/fat16, etc.) 就加入這條 "iocharset=utf8" 的選項,詳細的規則編寫法可以參考那篇 wiki ,它的處理方式和 fontconfig 差不多,不會很難上手才是。

  • 如果發現上面 code 的角括號被換成亂碼,請看原始碼來複製貼上 (firefox issue with ReadMore plugin)