ubuntu

Thursday, January 03, 2008

xwindow

方式有4種:
1.第1種在X window 底下設定
在GDM的畫面下
系統\管理\服務>GDM 不要打勾
這樣就會開機用文字登入
文字登入後 以後如果想要用GDM登入的話
打下面這些指令
sudo /etc/init.d/gdm start

2.透過修改(這是偷吃步 不過以後也方便改回來)
ubuntu的設定不像redhat
各個runlevel預設執行的service,都寫在/etc/rcX.d/ 裡面
將底下一個link檔 S13gdm 更名為_S13gdm
Reboot 就會在文字登入
要進入在輸入startx 即可

3.正規改法是刪除Rc2.x 底下的S13gdm(gdm開機執行程式.
) link 檔
然而ubuntu 預設的runlevel 是runlevel 2
sudo rm -rf /etc/rc2.d/S13gdm
sudo ln -s /etc/rc2.d/S13gdm ../init.d/gdm 要恢復請打這行

4.
以文字模式啟動 Ubuntu
$echo “false” | sudo tee /etc/X11/default-display-manager
變回啟動 x window,可以輸入:
$echo “/usr/sbin/gdm” | sudo tee /etc/X11/default-display-manager
ps: 如果不是用 gdm 作為,以上指令需要根據你的環境作出更改,例如 kdm 或 xdm。

Labels:

Friday, November 23, 2007

destop

http://hialan.blogspot.com/2007/09/ubuntu-704.html
我終於有一台 Notebook 可以拿來跑 Ubuntu 了。
當然作為一台 Linux-Desktop 必須要有能力去播放各種電影才行,其中最機車的就是 rmvb 這種封閉格式了。他一

定要用 Realplayer 才能正常播放,我用別家的程式,雖然可以正常播放,但就是不能拖曳影片軸。

除了 rmvb 以外,其他都用 MPlayer 來解決問題。
當然其中也要設定一些東西,才能有最好的效果。

首先我們要增加套件來源,讓我們的來源更豐富:

* 備份舊檔案

sudo cp -p /etc/apt/sources.list /etc/apt/sources.list_backup
sudo gedit /etc/apt/sources.list

* 在最後面加上

## PLF REPOSITORY (Unsupported. May contain illegal packages. Use at own risk.)
deb http://medibuntu.sos-sts.com/repo/ feisty free
deb http://medibuntu.sos-sts.com/repo/ feisty non-free
deb-src http://medibuntu.sos-sts.com/repo/ feisty free
deb-src http://medibuntu.sos-sts.com/repo/ feisty non-free

## CANONICAL COMMERCIAL REPOSITORY (Hosted on Canonical servers, not Ubuntu
## servers. RealPlayer10, Opera, DesktopSecure and more to come.)
deb http://archive.canonical.com/ubuntu feisty-commercial main

* 安裝 key


wget -q http://medibuntu.sos-sts.com/repo/medibuntu-key.gpg -O- | sudo apt-key add -

* 更新套件資料庫並升級

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dselect-upgrade

* 安裝 code

sudo apt-get install gstreamer0.10-ffmpeg gstreamer0.10-gl \
gstreamer0.10-plugins-base gstreamer0.10-plugins-good \
gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse \
gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse \
libxine-extracodecs w32codecs ffmpeg lame gstreamer0.10-pitfdll

sudo apt-get install ubuntu-restricted-extras

* 安裝 realplayer

sudo apt-get install realplay

* 設定 realplayer。因為 realplayer 和 SCIM 相衝,所以如果你要使用 realplayer 的話,請加入下一行。

sudo gedit /usr/bin/realplay

在 #!/bin/sh 下面加入
export GTK_IM_MODULE=xim

* 安裝 mplayer

sudo apt-get install mplayer

* 設定 mplayer

應用程式->影音->Mplayer Movie Player->在畫面上按右鍵->Preferences
->Video Tab->請選 x11 ->「Enable double buffering」「Enable direct rendering」「Enable frame dropping

」打勾
->Subtitles & OSD Tab-> Encoding 請選 Big5 (簡體選 CP936)
->Font Tab-> Font: /usr/share/fonts/truetype/arphic/uming.ttf -> Encoding : Unicode

* 一開始原始設定是無論視窗放多大,畫面永遠是 1:1 不會自己放大縮小。我們要讓他隨著視窗大小縮放

sudo gedit /etc/mplayer/mplayer.conf

找到 #zoom=yes 把 # 刪掉變成
zoom=yes

* 一切搞定。

然後你就可以試試看可不可以正常播放影片啦 !

Reference:

* http://54061.blogspot.com/2007/03/ubuntu-704-codec-rmvb.html
* http://ubuntuguide.org/wiki/Ubuntu:Feisty

====================================================================
http://www.wmfield.idv.tw/424
http://54061.blogspot.com/2007/03/ubuntu-704-codec-rmvb.html

sudo apt-get install beep-media-player
sudo apt-get install bmp-mp4

語言資源檔可將已安裝的英文版轉換為中文,請將下載後的 en-US.jar 拿去蓋掉已安裝 NVU 目錄下 chrome 子目

錄內的 en-US.jar 即可。

http://ubuntusoftware.info/
Quanta
Bluefish
Ginf
Screem
Nvu
Mozilla Composer
sudo aptitude install w32codecs
sudo aptitude install libxine-extracodecs xine-ui mplayer mplayer-skins vlc vlc-plugin-* mozilla-

plugin-vlc
sudo aptitude install sun-java6-jre sun-java6-plugin sun-java6-fonts

sudo aptitude install googleearth

http://wiki.debian.org.hk/w/Add_Google_Linux_repository
sudo aptitude install d4x
sudo aptitude install msttcorefonts

Labels:

Monday, July 02, 2007

套件指令

察看所有安裝套件指令與 debian 一樣
dpkg -l

察看 ubuntu 版本指令

lsb_release -a
/etc/issue

Sunday, February 04, 2007

flash 9

1. 16bit -> 24bit
2. unset XMODIFIERS
export LC_ALL=en_US.UTF-8
export XLIB_SKIP_ARGB_VISUALS=1

ttf-xfree86-nonfree

Labels:

Sunday, January 14, 2007

gconf-editor

desktop->gnome->volume_manger

Friday, January 12, 2007

download dll

http://www.dlldump.com/dll-files/

Ubuntu 6.10 Edgy - 看影片聽音樂

sudo aptitude install gstreamer0.10-plugins-ugly


裝上這個後就可以用 "影片播放器(Totem)" 看 DVD/VCD 了


sudo aptitude install gstreamer0.10-plugins-ugly-multiverse


裝上這個後就可以用 Rhythmbox(iTunes like) 來聽 mp3 了,當然用 Totem 也可以聽 mp3 啦~

hinet radio

http://www.ubuntu.org.tw/modules/newbb/viewtopic.php?topic_id=1532&forum=7#forumpost6352

Hinet Radio http://radio.hinet.net/ 上面有不少網路電台可以聽
但因為是 IE only,使得 linux 使用者難以利用
而電台的網址經過重重轉址,還會經常變更,無法直接抓出網址
之前有些前輩寫出方便自動抓網址呼叫 mplayer 播放的 script
可以用,但是使用上總還是有些不便,於是
小弟我就用 gtk+ 2 寫了個非常小的程式,常駐在系統列
按下圖示就拉出選單,裡面是各種可選的 hinet 電台
點選就直接呼叫 mplayer 播放,不聽的時候也隨時可以停止或換台
這樣就可以輕鬆的在 linux 下聽 hinet radio 的各個電台了

程式下載網址:
http://pcman.sayya.org/hinet_radio.tar.bz2
以 root 權限執行 make install 就可以安裝完成
編譯本程式需要 libgtk2-dev 和 mplayer套件

執行 hinet_radio 後,可以看到系統列多出一個三角形圖示
用滑鼠點下去即可拉出選單,選擇想要的電台播放

Tuesday, December 26, 2006

skype

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

Introduction

Skype is proprietary software that allows you to make calls over the Internet using your computer. Skype uses decentralized peer-to-peer technologies, so your calls do not go through a central server, but through distributed servers and other users. It uses its own proprietary communication protocol to achieve this. In addition, all communications are encrypted from end to end so that others cannot listen in. The Skype software is free to use, but it is not free software; the source code is proprietary and not available for modification.

General information about Skype is on [WWW] Wikipedia. The official Skype website is [WWW] http://www.skype.com.

[WWW] SkypeEthics gives information on why some users choose not to use Skype

Open alternative SoftPhone's using open protocols include Ekiga, Twinkle and [WWW] Wengophone.
The Problem

There are a few different aspects to the problem:

1.

Skype is not available in any Ubuntu software repository, and therefore cannot be installed with Ubuntu's package management software such as Synaptic or apt-get without adding the Skype repostory.
2.

On some systems, the Skype application can only be used for one call each time it is run due to an issue with GNOME's Enlightened Sound Daemon (ESD).

The Solution

Several workarounds exist, but the easiest way to get Skype running on Ubuntu is to use the Debian .deb package available from [WWW] Skype. As of October 2006, version 1.3 is available. It supports alsa and therefore should ease many problems with Skype.

Links to detailed information about Skype issues on Ubuntu can be found in the Resources section below.
Installing Skype

There are a few different ways to install Skype. The recommended way is using the Skype repository as you will automatically receive future updates to the software. Perhaps the easiest way to install is from the Debian package available from the Skype website. The downside of this is that you won't automatically get future updates, you will have to download the new versions as they become available.
Skype Repository

1.

Add the Skype repository*: deb http://download.skype.com/linux/repos/debian/ stable non-free
2.

Reload or update the package information
3.

Install the skype package.

*

Refer to Repositories/Ubuntu for information on adding, removing and modifying repositories

Debian Package

1.

Download Debian package from [WWW] http://skype.com/go/getskype-linux-deb
2.

Open the file(will open with the default GDebi Package Installer).
3.

Click on install button.

AMD64

1.

Download the debian package ([WWW] http://skype.com/download/skype/linux/)
2.

Install skype: sudo dpkg -i --force-all
3.

Determine missing 32bit libs: ldd /usr/bin/skype | grep not
4.

Download the libs (the i386 version of course, hint: the pacakge is named libqt3-mt): [WWW] http://packages.ubuntu.com/
5.

mkdir ~/.32bitLibs (or use /lib32 and change last step to this directory)
6.

extract the *.deb files (dpkg-deb --extract )
7.

copy the necessary library files from the extracted packages to ~/.32bitLibs
8.

create a wrapper script: export LD_LIBRARY_PATH="/home//.32bitLibs/";skype

Running Skype

To start Skype, choose Applications->Internet->Skype. It usually takes a minute or two for Skype to get started, and you may think that nothing is happening, so be patient.

When the Skype window finally opens, sign up (if necessary) and log in to your Skype account. Test your configuration by selecting the Echo / Sound Test Service contact (if not there already, add contact echo123) and clicking on the large green button at the bottom of the Skype window. If the connection is made and you hear a voice, your sound configuration is fine. If you cannot hear a voice, see the troubleshooting section below.
Troubleshooting Skype

If you are having audio problems, first check to make sure that sound is working on your system and that your microphone and speaker volume levels are high enough. If that does not work, then try changing the Skype audio device, and finally, if all else fails, modify your ESD configuration.
Audio Problems
1. Volume Levels

1.

Test that output is working with the Sound Preferences dialog. Choose System->Preferences->Sound.
2.

Test that microphone input is working with the Sound Recorder application. Choose Applications->Sound & Video->Sound Recorder.
3.

Ensure that your audio output and microphone input channels are not muted by choosing Applications->Sound & Video->Volume Control.

2. Skype Audio Device

If your audio levels are properly configured and you can hear audio in Skype but your contacts cannot hear your input, you may need to change Skype's input device. From the Skype menu, choose Tools->Options and select Hand/Headsets in the dialog that opens. Experiment with different Calls selections, if they are available.
3. ESD Configuration

Note: for Ubuntu 5.10 (Breezy) only. This is the already the default configuration in Ubuntu 6.06 (Dapper). A problem with the GNOME ESD (Enlightened Sound Daemon) server may cause issues with Skype for some users. If Skype is unable to make or receive calls and continuously crashes, then a small change to the ESD configuration may help. Run:

sudo gedit /etc/esound/esd.conf

and change the line:

auto_spawn=0

to:

auto_spawn=1

Log out and back in to restart ESD, and test Skype again as above. It is likely that this solution will only work if Skype is the only application using audio. You will not be able to play music while using Skype, and you will not be able to use Skype while playing music.

For more setup information, see the Skype website article [WWW] Skype Sound and Audio Set-Up - PC Running Linux.
4. ALSA Configuration

Enabling ALSA gives you the choice to workaround some Skype issues: The present Skype Linux release (1.2.0.18) uses OSS sound, which means it allows only one application to access sound device. On some systems, OSS is not even used by default, which means you won't be able to select the OSS sound device (/dev/dsp) at all, because it does not exist. Worse off, it has a bug that makes Skype unusable after a call. Sometimes a few calls can be made, before it happens, but later only solution is to restart Skype. Technically it seems that Skype "forgets" to close the sound device before trying to open it again and therefore locks up. This seems to happen when you are the first to hang up and not when the other party hangs up first, so a workaround is to just wait at the end of a call and let the other party finish first.

To avoid these issues, you can use ALSA instead of ESD. First, follow the guidelines found in [WWW] http://www.ubuntuforums.org/showthread.php?t=32063. Then follow up with [WWW] http://juljas.net/linux/skype/. Good luck!

Note that the above forum post howto is for Hoary/Breezy. This should, according to [WWW] mdz's post, not be an issue in Ubuntu 6.06 (Dapper).
4.1 Another possible solution for software mixing

If none of the other options works, try this one (it's working on a HP Pavilion dv1000). Taken from [WWW] http://forum.skype.com/viewtopic.php?t=48195

Create or add the following to your .asoundrc file:

gedit ~.asoundrc

Add the following text to it

pcm.skype {
type asym
playback.pcm "skypeout"
capture.pcm "skypein"
}

pcm.skypein {
# Convert from 8-bit unsigned mono (default format set by aoss when
# /dev/dsp is opened) to 16-bit signed stereo (expected by dsnoop)
#
# We can't just use a "plug" plugin because although the open will
# succeed, the buffer sizes will be wrong and we'll hear no sound at
# all.
type route
slave {
pcm "skypedsnoop"
format S16_LE
}
ttable {
0 {0 0.5}
1 {0 0.5}
}
}

pcm.skypeout {
# Just pass this on to the system dmix
type plug
slave {
pcm "dmix"
}
}

pcm.skypedsnoop {
type dsnoop
ipc_key 1133
slave {
# "Magic" buffer values to get skype audio to work
# If these are not set, opening /dev/dsp succeeds but no sound
# will be heard. According to the alsa developers this is due
# to skype abusing the OSS API.
pcm "hw:0,0"
period_size 256
periods 16
buffer_size 16384
}
bindings {
0 0
}
}

Create a skype launcher (in this example is going to be at your home directory).

gedit ~/skype.sh

add the following text

#/usr/bin/sh

ALSA_OSS_PCM_DEVICE="skype" aoss /usr/bin/skype --disable-dbus

Give skype.sh execution rights by browsing with Nautilus over there, right click on the file, go to Properties, go to Permissions tab, and select "Execute" for the user.

Double click on the file and you should be done.
Port use

Skype uses port 80 by default, and thus, may block some other applications that use the same port such as Apache. The solution is to change the port in one of the applications. Usually, port 81 is free and works fine. To change the port number in Skype go to menu Tools > Options, then click on the Advanced tab, then in the 'port' box, change to your preference.
Invalid Pointer

Some very few users have experienced the inability to normally start Skype 1.3 under Dapper, receiving the following error:

*** glibc detected *** free(): invalid pointer: 0x08aab8a0 ***

The pointer's address might vary on install or version, the only common factor exhibited by all people receiving the error is that all of them use SCIM to be able to input in one of various asian languages (some users exhibit this while using scim for Chinese, others when using it to input in Japanese so the language itself seems not to be important, only the presence of scim is). A few of these same persons report success in running a statically compiled version of the Skype 1.3 client. Others have shown success in changing the XIM input preferences during Skype launch by launching Skype (from either the command line or Gnome's/Kde's menu) with this command:

XMODIFIERS=@im=none QT_IM_MODULE=xim skype

This will hinder (read, remove) your ability to use scim to type in a foreign language inside Skype itself, but it will also most probably permit you to run Skype normally.

If you use SCIM as your default input method, and you are unable to run Skype you could try these solutions and see if they solve the problem.
Display configuration

*

Because Skype is a KDE application, Skype's typeface will appear very large on GNOME desktops. You can use either the kcontrol or the qt3-qtconfig package to configure the appearance of Skype and other KDE/QT applications. Of these two, the QT Configurator (qt3-qtconfig) has far fewer dependencies than kcontrol and may therefore be more convenient for people who mostly use non-KDE software. See also QtGnome for how to make Skype (and other Qt applications) look more like Gnome.

*

A quick fix, without installing any configuration packages at all, is to make a file qtrc in your $HOME/.qt directory, and put these two lines in it:
o

[General]
font=Bitstream Vera Sans Mono,9,-1,5,50,0,0,0,0,0


*

You can start QT Configurator with the "qtconfig" command. On the "Fonts" tab, choosing Font Family Sans Serif and Point Size 10 will give something that resembles Ubuntu's GNOME desktop.
*

If you install the kcontrol package, you may run it by entering kcontrol into the Applications/Run Application... prompt. Expand the Appearance & Themes menu and select Fonts. Press Adjust All Fonts and select Size. Lower this value to your preference (size 10 or 11 is usually satisfactory). Press OK and Apply and exit the KDE Control Center.