linux

A trail of 44 pages, marked with comments, by enjoylife
About this trail:
The C-shell offers a number of special commands known as control codes. Control codes define commands specific to the operating system. To issue a control code, hold down and press the corresponding letter key. The following summarizes some of the most commonly used control codes:
 d Signals the end of a file you are entering from the terminal if typed at the beginning of a line or if typed twice elsewhere in a line.
 c Cancels a command or interrupts a running program.
 z Suspends a process or job but does not terminate it: use fg to restart suspended process or job.
common_alias myscreen '~/bin/screen'
common_alias ls   'ls --color=auto'


common_alias findfile    'find . -follow -type f | grep $*'
common_alias findtext 'find . -not -name "*.d" -not -name "*.o" -not -name "*.a" -follow -type f -print0 | xargs --null grep $*'
#common_alias findcode    "find -follow -type f -name '*.cpp' -o -name '*.h' -o -name '*.java' -o -name '*.const' -print0| xargs --null grep $*"
common_alias findcode 'find . -name "*.cpp" -name "*.h" -name "*.java" -name "*.c" -name "*.hpp" -follow -type f -print0 | xargs --null grep $*'
common_alias findcdb 'find . -name "*.layout" -name "*.def" -name "*.cdb" -follow -type f -print0 | xargs --null grep $*'
common_alias findweb 'find . -name "*.aml" -name "*.xml" -name "*.xsd" -name "*.mdl" -name "*.sml" -follow -type f -print0 | xargs --null grep $*'
common_alias findany 'find . -follow -type f -print0 | xargs --null grep $*'

 

export PS1="\h@\u:\w% "
export DISPLAY=l-sjn-jezhao:0.0
export LS_COLORS='di=01;33'

function cleanup(){
        echo "Removing $1 files..."
        find \. -follow -name "$1" | xargs rm
u Clears the command line.




44 marks in this trail
1
The C-shell offers a number of special commands known as control codes. Control codes define commands specific to the operating system. To issue a control code, hold down and press the corresponding letter key. The following summarizes some of the most commonly used control codes:
 d Signals the end of a file you are entering from the terminal if typed at the beginning of a line or if typed twice elsewhere in a line.
 c Cancels a command or interrupts a running program.
 z Suspends a process or job but does not terminate it: use fg to restart suspended process or job.

u Clears the command line.





common_alias myscreen '~/bin/screen'
common_alias ls   'ls --color=auto'


common_alias findfile    'find . -follow -type f | grep $*'
common_alias findtext 'find . -not -name "*.d" -not -name "*.o" -not -name "*.a" -follow -type f -print0 | xargs --null grep $*'
#common_alias findcode    "find -follow -type f -name '*.cpp' -o -name '*.h' -o -name '*.java' -o -name '*.const' -print0| xargs --null grep $*"
common_alias findcode 'find . -name "*.cpp" -name "*.h" -name "*.java" -name "*.c" -name "*.hpp" -follow -type f -print0 | xargs --null grep $*'
common_alias findcdb 'find . -name "*.layout" -name "*.def" -name "*.cdb" -follow -type f -print0 | xargs --null grep $*'
common_alias findweb 'find . -name "*.aml" -name "*.xml" -name "*.xsd" -name "*.mdl" -name "*.sml" -follow -type f -print0 | xargs --null grep $*'
common_alias findany 'find . -follow -type f -print0 | xargs --null grep $*'



export PS1="\h@\u:\w% "
export DISPLAY=l-sjn-jezhao:0.0
export LS_COLORS='di=01;33'

function cleanup(){
        echo "Removing $1 files..."
        find \. -follow -name "$1" | xargs rm
}
2
How about searchin for all the mp3 files with excluding all those who are starting by alphabet "A" ?

Or Even how about searchin for all the mp3 files with excluding all those who are smaller than 3 MB of size ?

With both of the two of above queries we can use the same method of excluding particular criteria.

find /mp3 -not -iname "A*" -iname "*.mp3"
& find /mp3 -not -size -3M -iname "*.mp3"
3
Thanks a lot guys--with those changes this is working fine now:

#!/bin/bash

find . -name "*.mp3" | while read FILENAME;
do

ARTIST="`exiftool -Artist "$FILENAME" -p '$Artist'`"
TITLE="`exiftool -Title "$FILENAME" -p '$Title'`"
ALBUM="`exiftool -Album "$FILENAME" -p '$Album'`"
YEAR="`exiftool -Year "$FILENAME" -p '$Year'`"
DIRECTORY="`exiftool -Directory "$FILENAME" -p '$Directory'`"

ruby /home/pimeson/.kde/share/apps/amarok/scripts/wiki_lyrics/cli/wikilyrics.rb -a $ARTIST -t $TITLE -l $ALBUM -y $YEAR --sites cs,P3,yan,o,rics,iki,Download,Mania,ular,rics,5,etras > "$DIRECTORY/$TITLE.txt"

done

BostonWatcher, I agree my script should, to all appearances, have been working, but I tried it with other files too and had the same problem.
4

ClearCase Version Tree

The ClearCase Version Tree view displays the ClearCase version history of a resource.

The ClearCase Version Tree view displays a graphical view of the version history for a ClearCase element. To open the ClearCase Version Tree, right-click a resource in a ClearCase view and then select Tools > Show Version Tree on the context menu.

The ClearCase Version Tree view opens and displays a partial tree for the resource, which includes only the contributing versions for the version currently selected by your ClearCase view. For example, only the versions and branches that are directly connected to the view-selected version are shown. Click the fetch branches icon icon to fetch the missing versions and complete the version tree.

In the ClearCase Version Tree view, each version of a resource is displayed as a node on the tree, and the version currently selected by your view is marked with the vtree view-selected icon icon. You can use the ClearCase Version Tree view to perform ClearCase operations on resources by right-clicking on a version node, a branch, or a merge arrow and then selecting a ClearCase operation.
Note: You can also navigate the ClearCase Version Tree and perform operations on resources by using the keyboard. For more information, see ClearCase Version Tree shortcut keys.
5
Grep a string with a quote in it
Say you're trying use UNIX commands to find a string like "don't stop grepping". For strings without a quote, the format of the command is 'grep -l -r 'dont stop grepping' *
But if you're plagued by that pesky single quote, what do you do, since the string goes inside a single quote?
Here's how to format your grep to accomodate that pesky quote:
grep -l -r "don\'t stop grepping" *
Simply replace the single quotes in the command line with a double quote, then use a \ before the single quote in your string and the kingdom of search results shall be yours!
6

Xming 免費的X-Win32

1. 安裝系統及字型
2. 記得到C:\Program Files\Xming, 改X0.host檔, 把遠端linux系統ip加入, 不然無法redirect screen.
3. 連到linux, export DISPLAY="192.168.0.yourip:0.0"

8
我一直是用FreeNX(一个类似VNC的东东,比VNC好)来连接我的ubuntu linux 6.06的系统的。最近因为想用emacs的gud集成调试系统,所以试着装了个emacs 22.1。在本机X环境中使用正常,但当我用FreeNX连接后,远程打开emacs的话,emacs报告“No fonts found.”并直接退出。但gvim却能正常启动。
   在网上找了很多参考资料,说是要修改/etc/X11/xorg.conf的FontPath.但修改了以后启动也没有效果。束手无策了。

   今天早上突然想到会不会因为我的FreeNX客户端字体装的不全引起的。去www.nomachine.com一看,果然说有些老软件(hehe,emacs不幸就是非常老的软件了。gvim看来还是很与时俱进的。)不能用X Server的字体,而是会要求使用client端字体。下载了FreeNX的4个字体文件安装后,果然上面的错误不报了。

   但现在的错误变成了"Undefined color "black""。这个错误我用gvim时也经常碰到,但一般也没事情。gvim只是报个warning而已,还是可以正常工作的。但emacs就比较娇气了,报了这个错,就立马退出。faint。

   在ubuntu论坛一篇关于emacs和FreeNX的文章中找到了解决方法:运行以下命令:
sudo ln -s /etc/X11/rgb.txt /usr/X11R6/lib
sudo ln -s /etc/X11/rgb.txt /usr/lib/X11/rgb.txt
sudo ln -s /etc/X11/rgb.txt /usr/share/X11/rgb.txt
sudo ln -s /etc/X11/rgb.txt /usr/X11R6/lib/X11/rgb.txt

emacs就可以在FreeNX中正常打开了。
9

FreeNX很赞啊

FreeNX是一个*nix的远程图形登录软件。优点就是速度快,比vnc快多了,用我的iBook作客户端的时候对比尤其明显。缺点就是实现机制比较复杂,文档也不全,配置起来有点难度。所以趁现在刚配好,赶快记录一下,免得忘了:

  1. 在服务器端用RPM装了nx和freenx两个包以后,把/var/lib/nxserver/home/.ssh/client.id_dsa.key复制到客户端。
  2. 启动客户端界面,找到配置画面,有个“Key”的按钮,点击之后出现目前使用的key。选择import,选择刚才复制过来的文件。就可以了。
服务器在Redhat WS 4和Fedora Core 2上均测试通过。客户端用的是MacOSX10.3。
10
在fedora下安装freenx


作者: zbatecn 出自: http://www.linuxdiyf.com
1. 需要先安装expect ,nc包, (yum -y install expect nc)
2. 安装freenx server. (yum -y install freenx nx), nxclient不能yum安装,需要下载后再安装.
3.将原有的/var/lib/nxserver/home/.ssh 改名或者备份.从其它nxserver机子上rsync一个old .ssh来.
$ nxserver --status #检查nxserver是否在己经启动.
这里的从client login到server有时会产生以下错误:Server not installed or nx access disabled,就是由以第三部做错后产生的(请注意).
4.完成上面,有时会产生弹出窗口让你查看: /root/.nx/temp/31175/sshlog.
在sshlog中出现:/usr/libexec/nx/nxagent: error while loading shared libraries: /usr/lib/nx/libXcomp.so.2: cannot restore segment prot after reloc: Permission denied
/usr/libexec/nx/nxserver: line 1283: 5192 Terminated sleep $AGENT_STARTUP_TIMEOUT
Can't open /var/lib/nxserver/db/running/sessionId{B4A50EE6610A45F321F7D771073AB3D7}: No such file or directory.
mv: cannot stat `/var/lib/nxserver/db/running/sessionId{B4A50EE6610A45F321F7D771073AB3D7}': No such file or directory
Killed by signal 15.
等错误时,原因是由于打开了selinux,关闭selinux policy可解决这个问题便可正常login.

[b]本文来自ChinaUnix博客,如果查看原文请点:[/b][url]http://blog.chinaunix.net/u/31/showart_573425.html[/url]
11

Development with GNU Tools

11:24, 12/06,2006

在 Tasuka blog 的这篇文章中,发布了一个 XUL 格式制作的线上 PPT,在线阅读的地址是:Development with GNU Tools (需要使用 Firefox 1.5 以上的版本浏览),内容包括 UNIX/BSD/Linux 的发展历史及简介、GNU 开发平台及常用开发工具介绍、常见应用程序及支撑库等。

这个用 XUL 制作的 PPT,浏览的时候操作非常方便,可以快速在页面间切换、自动列出章节列表、设置自动播放等,看样子用 XUL 来制作这种在线阅读的东西是个不错的选择,有时间研究一下。

Update: google 了一下,这个 XUL 是用高橋流簡報器制作的,对岸的兄弟将其中文化了,可以看这页:高橋流簡報器中文版,里面有操作说明和编辑制作方法的介绍,下载地址

13

Re: block commenting?

Thu, July 22, 2004 - 12:26 AM
v
Then highlight, then hit
:
you will get:
:'<,'>
Add to it:
s/^/#
Hit return and you are in business
16
Technical Bulletin [Return to bulletin list]
Date: 2004-06-24

Description: ssh uses fake authentication data for X11 forwarding.

Affects: OpenSSH

Summary: When ssh is unable to get Xauthority information for the
display, it makes up some fake authentication data and prints a
warning.

Symptoms: ssh prints "Warning: No xauth data; using fake
authentication data for X11 forwarding."

When ssh is unable to get Xauthority information for the display, it
makes up some fake authentication data and prints:

Warning: No xauth data; using fake authentication data for X11
forwarding.

This happens in particular if there is no entry for the local display
(of the form :D.S or of the form $HOTSNAME/unix:D.S) in ~/.Xauthority on
local host (the host where you issued ssh). To see the list of display
names, run:

$ xauth list

To fix this problem, run the following command on the local host:

$ xauth add `echo "${DISPLAY}" | sed 's/.*\(:.*\)/\1/'` . `mcookie`

Make sure that the command xauth and mcookie on your PATH, otherwise
use the absolute pathname for these commands.

xauth is the program to manage the authorization information used in
connecting to the X server.

echo "${DISPLAY}" | sed 's/.*\(:.*\)/\1/' extracts the display and
screen numbers in the form :D.S (e.g., :10) from DISPLAY environment
variable of the form HOSTNAME:D.S (e.g., localhost:10).

. is an abbreviation for MIT-MAGIC-COOKIE-1 protocol name.

mcookie generates magic cookies for xauth.
17

<!-- google_ad_client = "pub-7825705102693166"; google_ad_slot = "1901335248"; google_ad_width = 300; google_ad_height = 250; //-->

Q. While using mv or rm command I get command line length error (Argument list too long error). How do I find out current running shell command line length limitations? How do I overcomes these limitations while writing UNIX / BSD / Linux shell utilities?

A. All shell have / has a limit for the command line length. UNIX / Linux / BSD system has a limit on how many bytes can be used for the command line argument and environment variables. When you start a new process or type a command these limitations are applied and you will see an error message as follows on screen:

19

Capturing STDERR only

]$ cmd 2>&1 1>/dev/null

You may be thinking, that if I am redirectin

20
#!/bin/sh
f=0
while IFS= read -r line
do
    case $line in
        *pattern* ) f=1; continue ;;
    esac
    if [ "$f" -eq 1 ]; then
          f=0
         continue
    else
         echo $line
    fi
done <"file"
21
This is for the gnome trash, I'm not sure where KDEs trash is located... But put this somewhere in your users ~/.bashrc:
Code:
alias rm='mv --target-directory ~/.Trash'
If you now rm a file or directory as that user, it should go to trash. Beware that you have to re-login first!
22

Table 8-2. Options to the read built-in

OptionMeaning
-a ANAMEThe words are assigned to sequential indexes of the array variable ANAME, starting at 0. All elements are removed from ANAME before the assignment. Other NAME arguments are ignored.
-d DELIMThe first character of DELIM is used to terminate the input line, rather than newline.
-ereadline is used to obtain the line.
-n NCHARSread returns after reading NCHARS characters rather than waiting for a complete line of input.
-p PROMPTDisplay PROMPT, without a trailing newline, before attempting to read any input. The prompt is displayed only if input is coming from a terminal.
-rIf this option is given, backslash does not act as an escape character. The backslash is considered to be part of the line. In particular, a backslash-newline pair may not be used as a line continuation.
-sSilent mode. If input is coming from a terminal, characters are not echoed.
-t TIMEOUTCause read to time out and return failure if a complete line of input is not read within TIMEOUT seconds. This option has no effect if read is not reading input from the terminal or from a pipe.
-u FDRead input from file descriptor FD.

This is a straightforward example, improving on the leap

23
REMOTE_HOST=`set | grep SSH_CLIENT | cut -f2 -d"'" | cut -f1 -d" "`

# If connecting, via SSH, from home machine:
# --- IP address removed for privacy ---
if [ "$REMOTE_HOST" == "xxx.xxx.xxx.xxx" ]
then
        DISPLAY="$REMOTE_HOST:10"
# Otherwise, just set to the standard :0
else
        DISPLAY=":0"
fi
24
Try "grep -P '\t'" to use perl-compatible regexps. Note that this is a specific capability of GNU grep, so it will not be portable to systems that use a different grep. It might be more portable to use "awk '/\t/'". Or to insert a literal tab as others said. Brian


or

grep  '123[[:space:]]'  ./a.txt
grep -P '123\t'  ./a.txt

stty -a
25
Installing vim-full did not work for me. Here's the problem as I see it.

(Go to bottom of this post to see how I fixed this.)

I run vim, which actually calls /usr/bin/vim.full
I open up vim by typing vim (or /usr/bin/vim.full) and I type ":set all". This shows my runtimepath set as follows:
runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim64,
/usr/share/vim/vimfiles/after,~/.vim/after

That runtime path is wrong for the version of vim I have installed.(version 7.0.35, 1:7.0-035+1ubuntu5(edgy)) It should be set as I describe below.

I don't have any ~/.vim* entries, so I know I'm not setting the runtimepath elsewhere.

My "/etc/vim/vimrc" file should be getting referenced and then issuing this command:
runtime! debian.vim

I find debian.vim in /usr/share/vim/vim70/debian.vim, and it says the runtimepath is:
set runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/addons,
/usr/share/vim/vimfiles,/usr/share/vim/vim70,/usr/share/vim/vimfiles/after,
/usr/share/vim/addons/after,/var/lib/vim/addons/after,~/.vim/after

STOP!

I found the problem as I was writing this. I found that my VIMRUNTIME environment variable was being set in my .bashrc file.
export VIMRUNTIME=/usr/share/vim/vim64

I changed it to
export VIMRUNTIME=/usr/share/vim/vim70

and now it sets the runtimepath correctly.

Phew!
26
   

Your serial number(s):

90H2W-Y4ZA0-13P5H-4UJVW
900AW-Y4Y2M-13QEJ-4R1L1
92M29-Y6V8M-11L5N-4K1HH
92H2W-Y4CA5-1C2EH-4R0RE
9A508-YDZ2J-117EN-4H68H
27

Removing /manual/, /icon/, and /cgi-bin/ aliases

The Apache web server comes default with three aliases defined, which also show up for each virtual host. Moreover, they can mask a directory in your document root if it has the same name.

You might want to comment out line 477-484 ( Alias /icons/ up until and including ), line 491-505 (AliasMatch ^/manual... up until and including ), and line 515-526 (ScriptAlias /cgi-bin/ up until and including ).

29
You might find it helpful to configure your guest operating system so VMware Tools starts when you start your X server. The steps for doing so vary depending on your Linux distribution and your desktop environment. Check your operating system documentation for the appropriate steps to take.
Main Menu (click the foot icon in the lower left corner of the screen) > Programs > Settings > Session > Startup Programs
2
Click Add.
3
In the Startup Command field, enter vmware-toolbox.
4
Click OK, click OK again, and close the GNOME Control Center.
30
install yum:

  1. wget ftp://rpmfind.net/linux/PLD/dists/ac/ready/i386/libsqlite-2.8.15-1.i386.rpm
  2. wget ftp://rpmfind.net/linux/dag/redhat/el4/en/i386/dag/RPMS/python-sqlite-1.0.1-1.2.el4.rf.i386.rpm
  3. wget ftp://rpmfind.net/linux/dag/redhat/el4/en/i386/dag/RPMS/python-elementtree-1.2.6-7.el4.rf.i386.rpm
  4. wget ftp://rpmfind.net/linux/dag/redhat/el4/en/i386/dag/RPMS/python-urlgrabber-2.9.6-1.2.el4.rf.noarch.rpm
  5. wget ftp://rpmfind.net/linux/dag/redhat/el4/en/i386/dag/RPMS/yum-2.4.2-0.4.el4.rf.noarch.rpm
  6. rpm -Uvh libsqlite-2.8.15-1.i386.rpm
  7. rpm -Uvh python-elementtree-1.2.6-7.el4.rf.i386.rpm
  8. rpm -Uvh python-sqlite-1.0.1-1.2.el4.rf.i386.rpm
  9. rpm -Uvh python-urlgrabber-2.9.6-1.2.el4.rf.noarch.rpm
  10. rpm -Uvh yum-2.4.2-0.4.el4.rf.noarch.rpm



Argh! Still foiled! But reading the man page for yum tells us to look at http://linux.duke.edu/yum/, which tells us... that there are simply too many repositories to list any more, so ask a mailing list or a friend. In this case, we will copy my list of repositories, which I got from people in LinuxChix.
# cd /
# tar xzvf yum_repos.tar.gz
Try again:
$ yum install xsnow
Now run it:
$ xsnow
And let it snow!

install httpd-devel

then yum update && yum install httpd-devel
31

Finding stuff in files

How many times have you used the Windows "Find Files" thingy and then typed in some words you know are somewhere in the file you want to find, how does one do this from a command line in bash? I hope to tell you :-).

find . -name *.txt | xargs -I {} grep -n -H -e pattern '{}'
find . -name *.txt | xargs -replace={} grep -n -H -e pattern '{}'

This is a nice thing to know, it will find all the files in the current directory (.) and all sub-directories that end with .txt, then will search inside them for pattern. This command also works when directories and file names have spaces in them. Just as a little note: personally I think that spaces have no place in filenames and, under penalty of death, you should not put spaces in any of your filenames.

grep is a very useful tool and works with something called a regular expression I also found a really nice tool, written in C, for compiling and using Regular Expressions in your programmes Programming.RegularExpressons.

32

Recover From Crashed X Window Session

Posted by Tips on December 25th, 2006

Since having google start to spy on the website I’ve noticed a trend with viewers.  I’m going to assume that the #2 spot of firefox users on Windows are people who’ve hosed their systems in some manner and are looking for help.

First tip with X-Windows or X for short is to remember to make a backup of your original /etc/X11/xorg.conf file.

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.orig.bak

That way if there is any time that you end up at the command prompt and cant get X up you dont have to reboot into Windows or jump on the other machine to see what went wrong.

Once you have copied the original back to /etc/X11/xorg.conf issue the following commands to restart X.

sudo /etc/init.d/gdm restart

or for KDE users

sudo /etc/init.d/kdm restart

You should see a bit of flashing screen and then be welcomed back by a graphical login prompt!

What if that does not work?

Lets consider you just added a new video card.

If the first was a ATI card and the new one is a Nvidia card you have to do two things.

ATI cards typically use the Driver    “radeon” setting in the xorg.conf file under Section     “Device”.  You will have to edit the file.

After backing up your original of course!

sudo vi /etc/X11/xorg.conf

hit the backslash / key

type in the string you wish to find in this case radeon and hit enter

you should get to a uncommented line that looks like this

Driver   “Radeon”

hit escape move to the R in radeon and hit the x key until radeon is gone and you have “” left.

hit the right key to put the cursor under the second ” and then type i for insert then type in nv so it looks like

Driver     “nv”

once that’s done hit escape again.  then type a colon : and then type wq for write quit.

If you screw up just type q! after hitting escape and then colon to quit without saving.  Vi is a bit scary at first but recovery is easy if you remember to save a copy before and also to save only when satisified with your changes.  q! will be your best friend!

Once that’s done follow the above instructions for restarting GDM or KDM and hopefully you’ll be greeted with your X login screen again.

If you’re going the other way from Nvidia to ATI (I really pity you since driver support is still pretty crappy) just reverse the driver strings.

Enjoy and Merry Christmas!

33

This tutorial explains How To Run Ubuntu 7.10 from a portable USB device or from a folder within Windows. As noted before, the advantage to using Qemu hardware emulation as opposed to a native USB boot is that you can to plug your USB stick or portable hard drive into any available Windows PC and run a completely separate Linux operating system without rebooting the Windows Host PC. In addition, by utilizing the casper persistent feature, you can save your personal settings and changes back to the img located in the installation directory and then restore those saved settings on each boot.

Using this tutorial, Ubuntu 7.10 can be run from within Windows 98, NT, 2000, XP or Vista without rebooting. Ubuntu 7.10 runs from it's own directory either on a portable USB device or directly from a folder on your Windows computer.


http://lifehacker.com/5042630/unetbootin-creates-usb+bootable-linux-the-easy-way


37

Install windows Application using wine-doors (single Click)

digg_url = 'http://linuxpoison.blogspot.com/2008/08/install-windows-application-using-wine.html';
Wine-doors is an application designed to make installing windows software on Linux, Solaris or other Unix systems easier. Wine-doors is essentially a package management tool for windows software on Linux systems. Most Linux desktop users are familiar with package management style application delivery, so it made sense to apply this model to windows software.
38

Wine Quickstart Guide

This Quickstart Guide will help you to get Wine running. Make sure you have Wine installed. If you don't check this page on installing Wine: http://winehq.org/site/docs/wineusr-guide/getting-wine

Installing an application

In this guide I will show you how to install MS Office 97.
In order to install an application you must know the name of the file to run and the location of the file.
In this example I must run setup.exe which is loacted in /media/cdrom.
To install Office I must run the following command:
40
Installing Windows Applications Using Wine

To install Windows applications using Wine, follow these instructions:

1.

Download the Windows application from any source (e.g. download.com). Download the .EXE (executable).
2.

Place it in a convenient directory (e.g. the desktop, or home folder).
3.

Open the terminal, and cd into the directory where the .EXE is located.
4.

Type wine the-name-of-the-application.extension (e.g. wine realplayer.exe).

This will start the .EXE using Wine. If it is an installer, it should then run as it would in Windows. If the application asks for a directory to install the application to, select put it under C:\Program Files.

To start/run Windows programs using Wine

After installing an application using the directions above, those applications can be started and used by entering wine programname.exe (e.g. wine realplayer.exe). When done, close the application as one would normally. You must run the installed executable, which will by default be in the virtual Windows drive created by Wine, at ~/.wine/drive_c. Generally programs will install themselves somewhere under Program Files inside the virtual Windows drive, following Windows conventions.

You can also use the Wine file browser, by running winefile in a terminal. Clicking the C:\ button in the toolbar will open a window where you can browse the virtual Windows drive created in .wine. Doubleclicking an executable in the Wine file browser will run it in Wine.

Instead of having to always enter the terminal or use the Wine file browser, you may also create a, for example, desktop icon, and start a Wine application using that icon. To do this, right click on the desktop and select "Create a launcher." If you wish, select an icon from the list of available icons (or browse to an icon you would like to use), fill out other information that is requested (Name, generic name, etc.). For the command, type in wine the-location-of-the-program.exe (e.g. wine /home/john/.wine/realplayer.exe). The most important part of creating a launcher is the command, and a few other pieces of information are not necessary (e.g. generic name). Make sure not to select "Run in terminal." This completes the process.

In some cases the application requires to be running from particular location. In this case create launcher with command sh -c "cd '/home/USER/.wine/drive_c/Program Files/Appdir/'; wine '/home/USER/.wine/drive_c/Program Files/Appdir/game.exe'" Of course you need to replace USER and Appdir with proper data.

If you desire to have an icon on a panel, create a launcher on the panel of choice. Do this by right-clicking the panel, selecting "Add to Panel," and selecting "Custom Application Launcher." This will ask you for the same information as before.

Alternatively, to make life easier, you can set it so wine will automatically open .exe files files for you - instead of using Wine File to locate the file each time. To do so, right click on the .exe file, select Properties, and then select the Open With tab. Click the 'Add' button, and then click on 'Use a custom command'. In the line that appears, type in wine, then click Add, and Close. Now all .exe files will be automatically opened by Wine, so you can use Nautilus to browse and open them instead of the Wine File.

Uninstalling Wine Applications

Open up a terminal window and type "uninstaller" - this will open up a program similar to Windows' "add/remove programs" control panel, allowing you to uninstall applications from a Wine installation. Running uninstall programs directly via Wine should also work normally. Alternatively, you could also simply delete the folder of the application. However, as when done in Windows, this method will be "unclean" and will not remove the program's configuration from the Wine registry like using an uninstaller will.
Configuring Wine

On the command line or in Run Application, type winecfg.
Adding CD and DVD drives to Wine
43

To change the MTU of an interface on GNU/Linux, you just need to use ifconfig command to do so, like this for example

sudo ifconfig eth0 mtu 1492

To change it permanently on Debian, put it in the /etc/network/interfaces file .where almost all network parameters are found. To do this, just add a line mtu to the definition of your interface and save the file.

sudo gedit /etc/network/interfaces

Example

iface eth0 inet static
address 192.168.0.1
network 192.168.0.0
gateway 192.168.0.254
netmask 255.255.255.0
mtu 1492

Daiup Users

For dialup users: the Maximum Transmission Unit (MTU) value can be changed within the file
/etc/ppp/options

44

ou can find the emacs lisp file here. Below is the line you need to add to your .bashrc file (if your using bash as your shell) if you want to be able to open *.dot files from Emacs.

(load-file "PATH_TO_FILE/graphviz-dot-mode.el")

http://www.linux.com/articles/49655

Add your comment: