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

2016年5月1日 星期日

Can't use baloosearch for Chinese characters

I have some pictures named "快照##.png" (that means screenshot)

in my Pictures folder (see fig 1),

but search with dolphin shows no results (see fig 2).

And search png, you can find these pictures (see fig 3),

so these files were indexed !

fig 1. Pictures Folder

fig 2 Search with Chinese characters shows nothing

fig 3 Search "png" will show these files


In https://bugs.kde.org/show_bug.cgi?id=333037

Cjacker in comment 25 had some patches for this,

I rebuild baloo5 packages with these patches in my obs home project:

home:swyear:baloo5

before upstream fix this problem,

it's a temporitary workaround for Chinese search in plasma5.

At last, I can search the Chinese characters (see fig 4,5,6).

fig 4. Search in dolphin with Chinese characters


fig 5. Search in start menu


fig 6. Search in krunner


The patched baloo5 packages can be found in

http://download.opensuse.org/repositories/home:/swyear:/baloo5/

After installing these packages, run "balooctl disable" then "balooctl enable"in terminal,

wait some minutes for the file indexing.

When it's done, your baloosearch can use Chinese characters to search.

Baloo also affects Desktop search and Krunner (Alt+F2), you can see in fig 5, 6.

Before patching baloo,

Desktop search and Krunner shows nothing when using Chinese characters to search.



But there's problems when searching Applications.

When search "edit", (see fig 7)

you can see some results in Applications (應用程式)and Desktop search (桌面搜尋),

And some applications are named with "編輯" (that means "edit").

But search "編輯",you can't find these applications,

only Desktop search got the results. (see fig 8)

fig 7. Search "edit"

fig 8. Search "編輯"




2015年12月2日 星期三

KDE 5 中的 Dropbox

0. 環境:

openSUSE Leap 42.1 KDE Plasma 5.4.2


1. Dropbox 安裝

Dropbox 是以 nautilus-plugin 的方式支援 linux

KDE 並不在支援範圍內

若您沒有安裝 nautilus (例如 KDE )

請參考 https://www.dropbox.com/install?os=lnx 透過指令列安裝 Dropbox

若您需要申請 Dropbox 帳號,請按此 -- 介紹人和受邀者都可獲得免費空間獎勵


2. 應用程式圖示

您可以自行建立一個 Dropbox.desktop

[Desktop Entry]
Name=Dropbox
Name[zh_TW]=Dropbox
GenericName=File Synchronizer
GenericName[zh_TW]=檔案同步
Comment=Sync your files across computers and to the web
Comment[zh_TW]=在不同電腦間及網站上同步您的檔案
Categories=Network;FileTransfer;
Exec=$HOME/.dropbox-dist/dropboxd
Icon=dropbox.png
StartupNotify=false
Terminal=false
Type=Application
X-KDE-SubstituteUID=false

將此檔案放在

$HOME/.local/share/applications/

找一個 dropbox.png 放到

$HOME/.local/share/icons/

您就可以在選單中找到 Dropbox















3. 系統匣圖示的問題

請參考 https://www.dropboxforum.com/hc/en-us/community/posts/201908279-Systray-icon-not-showing-in-KDE-Plasma-5-2

openSUSE Leap 42.1 KDE 5 的系統匣已經加入了 xembed-sni-proxy 所以可以顯示舊圖示

但效果不好







注意:如果您使用 fcitx (因為某種不明原因...)

您需要手動執行 xembedsniproxy



您可以用其他的系統匣程式來顯示 dropbox 的圖示

我是使用 trayer-srg

您可以到 http://software.opensuse.org/ 搜尋 trayer-srg 安裝

編輯 $HOME/bin/dropbox.sh 內容為

#!/bin/bash
killall xembedsniproxy
trayer --edge right --align center --width 20 --tint 0xdfdfe0 --transparent false --alpha 0 &
$HOME/.dropbox-dist/dropboxd































效果如上圖










如果有其他不支援新系統匣的圖示也會一併顯示在此



4. Service Menu 修改

Dropbox ServiceMenu 可建立一個 Dolphin 右鍵選單,方便分享

但已經很久沒更新了...

Dropbox 在這段期間也改變了 API 所以有些功能不能運作

要在 KDE 5 上運作需要進行一些修改

(1) 下載 Dropbox ServiceMenu ,解壓縮

(2) 修改目錄中的 dropbox_all.desktop dropbox_directories.desktop dropbox_files.desktop

將此3個檔案中的

`kde4-config --localprefix`/share/kde4/services 改成

$HOME/.local/share/kservices5

(您可以用文字編輯器的"取代"功能輕鬆完成這件事)

(3) 然後將這3個檔案放在 $HOME/.local/share/kservices5/ServiceMenus/

(4) 修改 dropbox-scripts/dropbox_menu.sh

`kde4-config --localprefix`share/kde4/services 改成

$HOME/.local/share/kservices5

(5) 修改 dropbox_menu.sh

revisions() {
    get_uid
    if [ "$is_in_dropbox" != "" ]; then
xdg-open https://www.dropbox.com/revisions/"$relative_path"?_subject_uid="$my_uid"
    else
$python ${SCRIPTS_PATH}dropbox-notify.py --icon dialog-error -t $error_timeout Dropbox "$revisions_error"
    fi
}

get_uid() {
    testurl=`$python ${SCRIPTS_PATH}dropbox.py puburl "$dropbox_path"/Public/index.html`
    my_uid=`set - $(IFS="/"; echo $testurl); echo $4`
}

(6) 修改 dropbox-scripts/get_dropbox_folder.sh



  if [ -f "$HOME/.dropbox/config.db" ]
  then
    local DBFILE="$HOME/.dropbox/config.db"

改成

  if [ -f "$HOME/.dropbox/instance1/config.db" ]
  then
    local DBFILE="$HOME/.dropbox/instance1/config.db"

(7) 將整個 dropbox-scripts 目錄複製到 $HOME/.local/share/kservices5/ServiceMenus/

(8) 大功告成



















Dolphin 的右鍵選單會多出 Dropbox 選項



















因為使用 KDE 4 的 qdbus org.kde.klipper 所以會多出一個剪貼簿圖示





















但兩個都可正常使用

(9) 幾個修改後的檔案您可以由我的 dropbox 資料夾中下載





2015年11月13日 星期五

VLC media player

1. 安裝 vlc

從 Packman 儲存庫中安裝

您只需要點選 vlc 、 vlc-noX-lang 和 vlc-codecs

其他部份 YaST 會幫您處理好


2. intel 顯示卡的問題

用 vlc 開啟您的影音檔案

發現只有聲音沒有影像

用命令行執行看看

$ vlc MOV_0119.mp4  
VLC media player 2.2.1 Terry Pratchett (Weatherwax) (revision 2.2.1-0-ga425c42)
[00000000022060c8] core libvlc: Running vlc with the default interface. Use 'cvlc' t
o use vlc without interface.
[VS] Software VDPAU backend library initialized
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_38
libva info: va_openDriver() returns 0
[00007f5190c10b88] avcodec decoder: Using OpenGL/VAAPI/libswscale backend for VDPAU
for hardware decoding.
[h264 @ 0x7f5190c25be0] hardware accelerator failed to decode picture
[h264 @ 0x7f5190cb1c60] hardware accelerator failed to decode picture            

查詢網路的結果發現 intel 顯示卡不支援 VDPAU

開啟 vlc 由工具-偏好設定-視訊-輸出

選擇 OpenGL

由輸入/編解碼器-硬體加速解碼

選擇 VA-API

vlc MOV_0119.mp4  
VLC media player 2.2.1 Terry Pratchett (Weatherwax) (revision 2.2.1-0-ga425c42)
[000000000242f0c8] core libvlc: 以預設介面執行 VLC。使用「cvlc」指令以無介面方式執行
VLC。
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_38
libva info: va_openDriver() returns 0
[00007fb748c10b88] avcodec decoder: Using Intel i965 driver for Intel(R) Bay Trail - 1.6.0 for hardware decoding.

即可正常播放

3. 播放 samba 分享的影音檔

直接在 Dolphin 中開啟會出現

無法開啟您的輸入:
VLC 無法開啟 MRL 「smb://USER@192.168.XX.XXX/Users/Public/Videos/MOV_0119.mp4」。詳細資訊請閱讀記錄檔。

若在命令行輸入

$ vlc smb://USER:PASSWORD@192.168.XX.XXX/Users/Public/Videos/MOV_0119.mp4

是可以播放的

查詢網路似乎很久前就有這樣的問題...

如果您使用的 smb 分享是固定使用者名稱和密碼的

可以從 vlc 中設定

由工具-偏好設定-介面-顯示設定

修改成『全部』

由輸入/編解碼器-存取模組-SMB

將使用者名稱和密碼輸入在此

就可以直接播放了

晚安,要去晾衣服了,明天還要上班

2015年11月9日 星期一

openSUSE Leap 42.1 part 3

1. 滑鼠雙擊/單擊

看到有人問,就找了一下,由系統設定-輸入裝置-滑鼠來設定

























2. 多媒體播放

多媒體還是需要一些多媒體支援,請造訪

http://opensuse-community.org/ 使用 1-Click Install 安裝多媒體支援

KDE 預設的音樂播放器是 Amarok
















影音播放器則是"神龍播放器"(好威的名字!)


















3. Dophin 影音檔預覽

也是看到網路上有人問

請安裝 ffmpegthumbs (當然是用 YaST2 安裝啦)



















裝好後開啟 Dolphin 檔案管理器

控制-設定 Dolphin























選取影像檔 (ffmpegthumbs)

回到 Dolphin 點選預覽











































大家晚安

2011年11月19日 星期六

openSUSE 12.1 體驗報告(2)

接著上次的 ibus 的問題,
您會不會覺得 ibus 選單的樣式怪怪的

好像是 ~/.gtkrc-2.0-kde4 中的設定沒有套用到 ibus 上
您可以
$ cd$ cat .gtkrc-2.0-kde4 > .gtkrc-2.0

將 KDE 的設定寫入 ~/.gtkrc-2.0
如果您要作全域的設定
在 /etc/gtk-2.0/gtkrc
將 gtk-theme-name = "Adwaita" 改成 gtk-theme-name = "oxygen-gtk"
如下看起來比較正常吧!


無線網路連線需要 root 密碼?
請參考
https://bugzilla.novell.com/show_bug.cgi?id=713639
更新:根據 https://bugzilla.novell.com/show_bug.cgi?id=716291 中的暫時解決方案修改了內容
注意:以下設定雖然避免輸入 root 密碼,但是我不確定會有什麼安全上的問題,自行斟酌
用 root 身份編輯 /etc/polkit-default-privs.local
加上
org.freedesktop.NetworkManager.network-control         auth_admin:auth_admin:yes
org.freedesktop.NetworkManager.settings.modify.own auth_admin:auth_admin:yes
org.freedesktop.NetworkManager.settings.modify.system auth_admin:auth_admin:yes
org.freedesktop.NetworkManager.wifi.share.protected auth_admin:auth_admin:yes
org.freedesktop.NetworkManager.wifi.share.open auth_admin:auth_admin:yes
org.freedesktop.ModemManager.Device.Control auth_admin:auth_admin:yes
org.freedesktop.packagekit.system-network-proxy-configure auth_admin:auth_admin:yes

*更新:根據瑪格麗特蘇的留言,加上了有關 system-network-proxy-configure 的敘述,可以防止 Apper 一直要求 proxy 的驗證。

然後執行
/sbin/set_polkit_default_privs

KDE 選單回到上一層的方式和以前不同
請看圖中的滑鼠位置:


dolphin 預設不顯示選單
如果您需要選單,用滑鼠點選方式可能會失敗


請直接使用鍵盤上的快捷鍵 Ctrl+M 設定

筆記型電腦的觸控版預設沒有啟用在觸控板上點擊(Tapping)
請到系統設定--輸入裝置--Touchpad--Tapping--Tapping with one finger--Left mouse button


家目錄中有些中文目錄,我是十分贊成的,
只是我有時下載檔案後要用終端機執行
如果在 X 中,即使是終端機也是可以打中文,只是比較麻煩
但是有次我下載了 Nvidia 驅動程式...
所以我都會將"下載"這個目錄作一個英文連結
$ ln -s 下載/ Downloads

為了方便起見,您也可以將中文目錄放在前面
由 檢視--排序依據--遞減


然後是 konsole 的萬年問題
我都會將字型選擇"真實的字型名稱"(而非通用名稱 Monospace)
在英文環境時,並不會有這種問題


最後提供一個小訣竅:
剛開始裝機完成時,總會常常要加入套件庫、安裝新軟體之類的
而 KDE 的更新工具(11.2 是 Apper)也開始工作,常常就會衝突
每次問你要不要叫 Packagekit 關閉,但從來沒成功過
這時您可以按 Ctrl+Esc 呼叫系統活動
搜尋 packagekit,然後結束行程


今天報告到此為止, Have a lot of fun !

2010年6月30日 星期三

Dropbox ServiceMenu

寄件者 openSUSE11.3rc

在網路上搜尋了一下
發現了已經有 Dropbox 的愛用者開發了
Dropbox ServiceMenu
就是在 dolphin 右鍵選單中加上 Dropbox 的服務
也寄了繁體中文翻譯給作者,沒想到半小時之後就更新了
在 KDE4 使用 dropbox 更方便了
http://kde-apps.org/content/show.php?content=124416
下載 Dropbox ServiceMenu Source (也就是 tar.gz 的檔案)
解壓縮,您會得到一個 DropboxServiceMenu-[版本] 的目錄
在該目錄中執行
$ sh install-it.sh

就這樣,大功告成了
若是要移除
在該目錄中執行
$ sh deinstall.sh


順便...在 dolphin 右鍵選單中有一項:壓縮->成 ZIP 壓縮檔 會出現2個
寄件者 openSUSE11.3rc

其中一個應該是 成 ZIP/TAR 壓縮檔才對
寄件者 openSUSE11.3rc

請在 /usr/share/kde4/services/ServiceMenus/ 底下找到 ark_addtoservicemenu.desktop
修改成
[Desktop Action compressAsTar]
Name=As ZIP/TAR Archive
Name[zh_TW]=成 ZIP/TAR 壓縮檔

當然您需要 root 權限
或者先將這個檔案複製到 ~/.kde4/share/kde4/services/ServiceMenus/ 底下再用一般用戶修改
這樣作還有個好處 相關 rpm 更新時,並不會影響您所做的修改
不過看起來這個選項和 壓縮->這裡 所做的事情一模一樣
您不妨改
 [Desktop Action compressHere]
Name=Here
Icon=utilities-file-archiver
Exec=ark --changetofirstpath --add --autofilename tar.gz %F

改成
 [Desktop Action compressHere]
Name=Here
Icon=utilities-file-archiver
Exec=ark --changetofirstpath --add --autofilename tar.bz2 %F

那以後 壓縮->這裡 就會壓縮成 tar.bz2 的格式