linux.ubuntu

A trail of 88 pages, marked with comments, by enjoylife
About this trail:

sudo apt-get install openssh-server

*Remember: You can open a terminal by pressing Alt+F2, typing gnome-terminal and pressing enter

88 marks in this trail
2

Creating Additional Desktops

In the examples so far we have only covered remote access to the primary desktop. By primary desktop we mean the desktop you see when you sit at your computer and turn on the monitor. While this is fine for a single user system we should not lose sight of the fact that Linux is a multi-user operating system and it will often be necessary for more than one person to have remote desktop access at a time. While it might be fun to watch everyone fight over the mouse point as they share the same desktop it is clear that not much work will get done. The solution to this is to run multiple desktops for the users to connect to.

New desktop environments are created using the vncserver utility. The first step is to assign a password to protect these desktops. THis can be achieved using the vncpasswd tool. Run this tool from the command-line prompt in a terminal window and enter the password of your choice.

The desktop we have used so far in this chapter is desktop :0. New desktops must be assigned different numbers. For example to launch desktop 1: run the following command from a terminal window command-line prompt:


sudo apt-get install vnc4server xinetd

vncserver :1 -extension XFIXES

http://www.movingtofreedom.org/2007/02/16/howto-remote-desktop-with-vnc-in-ubuntu-edgy-gnu-linux/
3
  • Download the following three files:
"NX Desktop Server DEB for Linux" from [3]
"NX Node DEB for Linux" from [4]
"NX Client DEB for Linux" from [5]
  • Install the files in the order shown below by right clicking on them and installing them, or using a package manager, or from the command line you could do sudo dpkg -i file/path/filename.deb for each file. Install them in this order:
4

To reemphasize what hhcv said: I also needed to do
sudo adduser SomeNewUserName

(and give this new user a password)

before I could successfully run

sudo smbpasswd -a SomeNewUserName

The first creates a UNIX user, the second creates an SMB user. I don't know if the two passwords need to be the same, but I made them the same just in case.


===================================

1) create unix user (e.g. wsuser)
2) sudo apt-get install samba smbfs
3) sudo smbpasswd -a wsuser
4) sudo gedit /etc/samba/smbusers
#add this line
wsuser = "wsuser"
5) sudo gedit /etc/samba/smb.conf
# add two lines after "####### Authentication #######"
security = user
username map = /etc/samba/smbusers

# Uncomment below three lines
[homes]
comment = Home Directories
browseable = yes
# add line
writable = yes


access windows shared directory from Linux samba

sudo mkdir /mnt/l-sjn-xxx.corp.yyy.com

sudo smbmount //l-sjn-xxx.corp.yyy.com/public_share /mnt/l-sjn-xxx.corp.yyy.com -o user=xxx,gid=users


5

Installing apxs2 on Ubuntu Warty

I need to install an apache module from source, but apxs2 is nowhere to be seen on the system.

apt-cache search apxs2 doesn’t help, where can it be?

A quick question on irc.freenode.net #ubuntu, and the answer is there: install apache2-prefork-dev.


Use “apt-file” to look for specific files to be installed.

$ apt-file search apxs

May need to do this if you have never used apt-file:
$ sudo apt-file update


6

How To Configure Remote Access To Your Ubuntu Desktop

Version 1.0
Author: Falko Timme
Last edited 01/23/2008

This guide explains how you can enable a remote desktop on an Ubuntu desktop so that you can access and control it remotely. This makes sense for example if you have customers that are not very tech-savvy. If they have a problem, you can log in to their desktops without the need to drive to their location. I will also show how to access the remote Ubuntu desktop from a Windows XP client and an Ubuntu client.

I do not issue any guarantee that this will work for you!

7

I've created a package to be used with NX Free edition.

But you have to edit /usr/NX/etc/node.cfg and change:
 - CommandStartGnome="/usr/bin/dbus-launch --exit-with-session gnome-session"
to
 - CommandStartGnome="/usr/bin/nx-session-launcher-suid gnome-session"

The package is in the building queue, once it finish I will post the location here.

 volksman wrote on 2008-06-26: (permalink)

After installing the above package and making the change to /usr/NX/etc/node.cfg I am able to use PolicyKit remotely.

Nicely done Marcelo!

8
According to other posts I added ServerName "localhost" to the .etc/apache2/apache2.conf and restarting apache2 made the error about qualified domain name vanish.
9
This tutorial describes how to set up an Apache 2 webserver as proxy with disk caching and deflating (compressing like mod_gzip) for Zope under Debian Testing. It may or may not be working with other distributions. Please send me feedback.

Christian 'Tiran' Heimes

How to set up an Apache 2 web server as proxy with disk caching and deflating.
Page 1 of 7.

Prerequisites

  • Apache 2 installed and running
  • The following Apache 2 modules installed (they should be shipped with Apache 2)
10

How to mount a remote ssh filesystem using sshfs October 28, 2005

Posted by Carthik in ubuntu.
trackback

SSH is protocol to transfer files securely. Like FTP, but more secure. Many hosting services offer their client the ability to remotely login to their hosting account using ssh. Transferring files to an from an ssh account can be done using the scp command. However, it would be neat if you could mount a remote folder that you can access using ssh on your local computer, so that you can access files on an ssh account just like they were local files on your pc, right? Well now you can! Mount a folder in an ssh account, edit the files locally and save the files, and the fi

11
OSX Leopard 今天才刚刚出炉,就已经把 Leopard 的风格移植到 Linux 上了 [via CB],与过去 Nicky 介绍过的非完美 OSX 风格改造方案不同的是,我们不再需要到处寻找一大堆的零部件,只需要去 Mac4Lin 下载 3 个包含主题、图标、光标、壁纸等等内容的压缩包外加 1 个说明文档,它们的体积也确实够大,加起来足足有 60M 之巨!看在能给自己的 Ubuntu 穿上美丽的新衣裳 Leopard,下载时付出一点点耐心也是非常值得的。
改造的方法那份 PDF 文档已经说得非常详细了,不过是英文的,有朋友需要中文版教程吗?
目前我还没有完全达到效果图的程度,已经很接近了,仍在努力中!心动的朋友请赶快:
12
Update: 找到了更好的办法,直接 sudo apt-get install sun-java6-jre sun-java6-jdk 就搞定了 JRE 和 JDK 了。省去了以下的麻烦,不过安装之后建议使用 sudo update-alternatives –config java 将 JVM 切换至最新安装的 Sun JVM。
首先下载 JRE 二进制自解压包,目前最新版本为 JRE 6 Update 2,文件名 jre-6u2-linux-i586.bin,大小约 18.22M。
13

如何为 Ubuntu 7.04 (Feisty Fawn) 安装中文输入法。(这篇文章的标题之所以用英文写,是为了方便大家在没有中文输入法的情况下也能找到此文。)

选择之一:安装 SCIM

其实即使是在不能进行中文输入的 Ubuntu 中,默认也有 SCIM 这个输入法的,我们只需要用下面的命令为其添加中文输入支持和智能拼音输入法就可以了。

sudo apt-get install im-switch scim-chinese scim-pinyin
# 如需安装五笔输入法,安装 scim-tables-zh 即可
im-switch -s scim

按下 Ctrl + Alt + BackSpace 重启 X 就可以看到它了。

选择之二:fcitx 小企鹅输入法

我个人是不太习惯 SCIM 的五笔输入,感觉做的非常别扭,并且词组库也不全,所以在从 fcitx 改向 SCIM 没两钟头后又立刻转回 fcitx。

安装步骤如下:

sudo apt-get install fcitx im-switch
im-switch -s fcitx
# 如果你的系统的 locale 是英文,还需要让 fcitx 支持英文系统的自动启动:
sudo gedit /etc/gtk-2.0/gtk.immodules

找到 “X Input Method” 那一行,把 “ko:ja:th:zh” 替换为 “en:ko:ja:th:zh”。

同样,按下 Ctrl + Alt + BackSpace 重启 X 后就可以看到它了。

14

看了 Nicky 的 Eva 不能登录的解决办法,我心想今儿个再试试看 Eva 能不能用,其实压根没报什么希望,孰料居然可以上了。

Eva 0.4.9

我用的 Eva 版本是 0.4.9,之前死活登录不了,提示“密码错误”,今天又好端端地可以用了,不知道是马腾讯斩了珊瑚虫乐得屁颠了,还是之前我 RP 太低。

PS: 我什么方法也没用,只是试了试就登录成功了,如果非要说我做了什么,那就是正在升级到 Ubuntu 7.10 Gutsy Gibbon,应该没什么必然联系吧?

15

一般安装

1、下载ubuntu-6.10-alternate-i386.iso  ,一定要是alternate版,而不是desktop版

2、下载引导文件 (这个其实不是这么用的,你当然可以去下个grub for dos,不过这里有我就懒得找了)
解压后把 boot 文件夹、grldr文件移到 C:\
在 c:\boot.ini 文件后面添加
c:\grldr="Ubuntu Linux "
把 timeout=0 改成 timeout=3

3、在任意盘找根目录中建一个 edgy 文件夹,把下载的桌面版光盘(*.iso)文件放到此目录中

4、下载引导文件initrd.gz , vmlinuz

5、修改c:\boot\grub\menu.lst 加入如下内容

代码:
16
Install 7z file archive support from the package p7zip (click the link to install), or by running the command below in your terminal:
sudo apt-get install p7zip
17

How To Install VMware Server (Version 1.0.6) On An Ubuntu 8.04 Desktop

This tutorial provides step-by-step instructions on how to install VMware Server (version 1.0.6) on an Ubuntu 8.04 desktop system. With VMware Server you can create and run guest operating systems ("virtual machines") such as Linux, Windows, FreeBSD, etc. under a host operating system. This has the benefit that you can run multiple operating systems on the same hardware which saves a lot of money, and you can move virtual machines from one VMware Server to the next one (or to a system that has the VMware Player which is also free).

18

Ubuntu Linux Install Sun Java Development Kit ( JDK ) and Java Runtime Environment ( JRE )

Posted by Vivek Gite [Last updated: July 1, 2008]

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

Q. How do I install Sun Java Development Kit (JDK) and Java Runtime Environment (JRE) under Ubuntu Linux? It appears that there are multiple JRE installed by default under Ubuntu. How do I select and use Sun JRE only? Can you explain steps required to set the environment to run java programs or apps?

A. Ubuntu Linux 7.10 has following packages from Sun:
=> sun-java6-bin : Sun Java Runtime Environment (JRE) 6

=> sun-java6-demo : Sun Java Development Kit (JDK) 6 demos

=> sun-java6-jdk : Sun Java Development Kit (JDK) 6

=> sun-java6-jre : Sun Java Runtime Environment (JRE) 6

19
  1. Download and install JDK 5+ (make sure your JAVA_HOME environment variable points to the JDK, not a JRE).
  2. Download and install MySQL 5.x.
  3. Setup a local SMTP server or change mail.properties (in src/main/resources) to use a different host name - it defaults to "localhost".
  4. Download and install Maven 2.0.9+.
  • From the command line, cd into your "Source" directory (c:\Source on Windows, ~/dev on Unix) and run one of the mvn archetype:create commands from the table below.  

  • export JAVA_HOME=/usr/lib/jvm/java-6-sun
    export M2_HOME=/usr/lib/apache-maven/apache-maven-2.0.9
    export M2=$M2_HOME/bin
    export MAVEN_OPTS="-Xms256m -Xmx512m"
    export PATH=$PATH:$JAVA_HOME/bin:$M2

20

9. Compiling from source

Ubuntu's package repository is huge, particularly when you factor in packages in the Universe and Multiverse repositories. However, many users find themselves needing to install packages from source, either because they want to use a newer package than is available in the repository, or they want to try something that's not in the Ubuntu repository at all.

If you want to install packages from source, you can use a few shortcuts to make life easier. First, you'll probably want to get the build-essential meta-package if you haven't installed any developer tools. Run sudo apt-get install build-essential; it will grab GCC, the Linux kernel headers, GNU Make, and some other packages that you'll probably need.

Next, if you're going to compile a package such as Gaim because a new version is out, you might be able to satisfy the new version's dependencies with the old version's dependencies. To do this, grab the package's build dependencies with sudo apt-get build-dep packagename . That will grab all of the development packages you need to build the package that's currently available in Ubuntu, and will probably satisfy dependencies for the new version you're compiling.

Finally, don't make install when you compile from source -- use CheckInstall instead. CheckInstall will create a Debian package and install it for you, so you can remove or upgrade the software more easily later on.

Grab CheckInstall with apt-get install checkinstall. After you've run ./configure ; make, just run sudo checkinstall and answer a few simple questions. Note that if you compile packages on AMD64, CheckInstall will select X86_64 as the architecture rather than amd64 -- which will cause the package install to fail, since Ubuntu expects amd64 as the architecture rather than X86_64.

By the way, the packages created by CheckInstall also make it easier to deploy the same package on several machines, if you happen to have several systems running Ubuntu. See Joe Barr's excellent CLI Magic feature on CheckInstall too.

22
This command fixed my problem... I read it somewhere else.



vsr@localhost:~$ sudo cp /usr/lib/libpng12.so.0 /usr/lib/vmware/lib/libpng12.so.0/

vsr@localhost:~$ sudo cp /usr/lib/gcc/i486-linux-gnu/4.2.3/libgcc_s.so /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1
24

How to enable the universe and multiverse repositories in Ubuntu 8.04 (Hardy)

Posted by admin on June 4th, 2008 Email This Post Email This Post

<!-- google_ad_client = "pub-3561711309083119"; //Ubuntu Rectangle google_ad_slot = "1464388544"; google_ad_width = 300; google_ad_height = 250; //-->
There are thousands of programs available to install on Ubuntu. These programs are stored in software archives (repositories) and are available for installation over the Internet. This makes it very easy to install new programs. It is also very secure, because each program you install is thoroughly tested and built specifically for Ubuntu.

The universe and multiverse repositories are official Ubuntu repositories, with safe, well-tested programs. The only difference between them and the repositories enabled by default is that the universe and multiverse repositories are maintained by the Ubuntu community rather than by paid Ubuntu developers.

There are three ways to enable the universe and multiverse repositories in Ubuntu 8.04 (Hardy Heron): via the graphical Software Sources tool,via the Synaptic Package Manager or via the command line.

Using Software Sources

To enable the universe and multiverse repositories using the Software Sources tool, you need to follow this procedure

Go to System->Administration->Software Sources


deb http://wine.budgetdedicated.com/apt hardy main


25
All the programs which you install using Synapatic package manger,apt-get,aptitude have a .Deb file in the following folder

/var/cache/apt/archives

This is very useful when you want to check which version of package is installed on your system and you can take backup of this folder and install all the packages in another machine

If you want to use GUI Program for this check here

addthis_url = 'http%3A%2F%2Fwww.ubuntugeek.com%2Fbackup-installed-packages-on-ubuntu.html'; addthis_title = 'Backup+installed+packages+on+ubuntu'; addthis_pub = 'david23';
26

hough there are many alternatives for MS Office, no doubt MS Office 2007 is a winner. If you want to install MS 2007 in Linux follow these steps:
<!-- google_ad_client = "pub-0816309066023726"; google_ad_slot = "7783831711"; google_ad_width = 468; google_ad_height = 60; //-->

  1. Install Wine
  2. Select Applications>Wine>Configure Wine to bring the Wine Configuration dialog box.
  3. Select Windows Version as Windows Vista from the Applications Tab
  4. Override two dll files rpcrt4.dll and msxml3.dll from Libraries tab. Override them to be Native (Windows)
  5. Download rpcrt4.dll file. Click here and save it on your desktop.
  6. Open the c_drive from Wine menu
  7. Delete rpcrt4.dll and msxml3.dll files from Windows/System32 directory.
  8. Copy the downloaded rpcrt4.dll file into Windows/System32 directory
  9. Download msxml3.msi file from Microsoft download site (here is the direct link for your convenience).
  10. Install msxml3.msi file from the Terminal window by issuing msiexec /i msxml3.msi
  11. Double click on setup.exe file from your MS Office 2007 installation CD. If it doesn’t work just type wine setup.exe from the Terminal window.
  12. Follow the normal installation procedures.

Watch the step-by-step video:

28
How can you make your Ubuntu desktop look beautiful and be productive at the same time? With these three things:

<!-- google_ad_client = "pub-0816309066023726"; google_ad_slot = "7783831711"; google_ad_width = 468; google_ad_height = 60; //-->
I. Avant Window Navigator:
Avant Window Navigator (AWN) is a Mac like dock-bar which (as of now) sits horizontally on the bottom of your screen (development is on the way for vertical support) helping you to launch programs and locations. You can install applets to make it more productive such as checking email, reporting local weather, showing time and calendar etc. Let’s get our hands dirty (to make the desktop beautiful)
29

Skype and aMSN

On Hardy Heron (and possibly earlier versions as well) SCIM will not work on applications compiled with their own version of QT such as Skype or aMSN. To resolve this do the following in addition to the guide above:

  • Edit /etc/profile
    sudo gedit /etc/profile
  • And add the following lines
    # SCIM
    export XMODIFIERS='@im=SCIM'
    export GTK_IM_MODULE="scim"
    export XIM_PROGRAM="scim -d"
    export QT_IM_MODULE="scim"
    scim -d

If you haven't already added your locale to /etc/scim/global do that now.

  • Run the command 'locale' in your terminal, and copy the locale name after LANG=
  • Edit the file /etc/scim/global:
30

I’m Using Ubuntu 8.04 final, and it didnt work out in the first place.

after installing libstdc++5 from synaptic
and copying the codecs to /usr/lib/codecs

everything worked fine!
(dont know which one of them made the difference, it probably has been only be the directory change)

31
Xterm from Ubuntu (version 209) supports 256 colours.

So, I checked on my system, but vim inside screen does not show the colours properly.

So then I did a google search and came accross this:  http://frexx.de/xterm-256-notes/
bartman, August 24, 2006 21:02 Update on vim/screen/xterm using 256 colours:

vim shows 256 colours inside screen, but if that screen is configured with 256 colour support and if your screenrc contains:

    attrcolor b ".I"
    termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
    defbce "on"

... as the previous link suggested.

My notes: http://www.jukie.net/~bart/blog/256-colour-xterm
Anonymous, August 25, 2006 8:31 Thanks bartman,
now I have got 256 colors in vim!
But I had to put these lines into my ~/.vimrc:
set t_AB=^[[48;5;%dm
set t_AF=^[[38;5;%dm
Did you succeed without them?
32
fixed it...here was the solution....

adding to /etc/modprobe.d/alsa-base

options snd-hda-intel model=3stack
34
这个问题是在Ubuntu8.04里的(不是windows下的问题,用windows的没有必要看)。

解决方法很简单

其实就一条命令:sudo apt-get install libflashsupport
35
原理我一向糊涂,还是不要写了。
配置,简单
http://www.ccs.neu.edu/home/flan/
到这里下载字体和fonts.tar.bz2整个覆盖你的/etc/fonts目录,记住先删了真个目录
永无后患,呵呵。
字体需要拷到哪我忘了,大概也就是/usr/share/fonts就行了
37
To re-order the list, the file vm-list file needs to be edited. 1 - Close the VMWare Server Console 2 - In Windows open a command prompt (Start \ Run…) and enter the following command: NOTE: (virtual machines do not need to be stopped) net stop "VMware Registration Service" Linux systems do not need to stop any deamons. 3 - Make a backup copy of the vm-list file, before editing (Windows users can use Notepad and Linux users can use VI or any editor of your choice). In Windows Vista the file can be found in the following folder location: C:\Users\All Users\VMware\VMware Server In all other versions of Windows (XP/2000/2003): C:\Documents and Settings\All Users\VMware\VMware Server In Linux: etc/vmware/vm-list NOTE: if you can not find the file, search for vm-list to locate it. When editing the file, order the VM's to your preference and make sure there is a carriage return after each VM entry (otherwise the VM will not appear in the inventory list). 4 - In Windows restart the VMware Registration Service: net start "VMware Registration Service"
38
关于用realplayer播放rmvb文件偏色的问题
我找到解决的办法了,在realplayer的菜单里找到:工具-->首选项-->硬件
将XVdieo前的勾去掉就可以了。
39
改叫数据空间了,好像以前版本就叫文件共享,现在1.6.2版本改为数据空间了。但你必须安装VirtualBox Guest Addition包。

1.启动虚拟windows xp,安装VirtualBox Guest Addition。进入虚拟机系统去把光驱里面的软件安装好。

2.关掉xp,点击设备菜单下面的分配数据空间,添加你需要共享的文件夹路径。最好是选默认固定分配,这样就不用每次都从新选。

3.重新进入你的虚拟机系统,右击我的电脑-》映射网络驱动器。选vitualbox shared folders下的你刚刚选择的文件夹。

4.o(∩_∩)o...哈哈,大功告成了。
40
刚才看了一下,进入X以后,ficitx的进程没有自动启动呢。在对话里面手动添加了fcitx,现在是可以了。但是不知道是原因造成的问题。。 Question


我也是天津的哦……

哈哈

fcitx加入会话然后修改一下~/.fcitx/config即可

感觉fcitx比scim省事多了(scimer别**)

虽然scim权威强大,但是经常出现莫名又奇妙的错误……

fcitx省心,什么时候fcitx能重新开发啊?

它啥时候能和搜狗词库同步,那么就统领中文输入法了!
41

Ubuntu 8.04 中开启3D桌面特效与设置方法

Ubuntu 8.04 (Hardy Heron) 中集成了强大3D交互界面,Ubuntu 的 3D 桌面特效给用户带来了一种全新的视觉用户。想必有很多朋友也因为看到了 Ubuntu 8.04 那炫目的 3D 桌面特效才开始慢慢地了解 Ubuntu 8.04 (Hardy Heron) 的。虽然在这之前也不少的朋友写过设置 Ubuntu  Linux 3D 桌面特效的文章,但新发行版的发布也会有新的朋友看到了 Ubuntu 3D 桌面特效而接触 Ubuntu  Linux 。因此,我觉得有必要把在 Ubuntu 8.04 (Hardy Heron) 开启 3D 桌面特效的方法给新手们再详细的介绍一下。

本文采用图文并茂的方式给新们讲解,几乎每一步骤都有配图片和文字说明,通过本文的介绍了后,没有多少 Ubuntu Linux 基础的新手们也应该能轻松地在 Ubuntu 8.04 (Hardy Heron) 中开启3D 桌面特效。

42
英文Locale下使用中文输入法

如果你在英文locale下,正确安装scim或fcitx后仍无法正常使用输入法,解决的方法如下:


sudo aptitude install im-switch

如果你用scim,运行

sudo im-switch -s scim -z all_ALL
im-switch -s scim -z all_ALL
43
我最初的笔记,希望能给初学的你带来些方便

新手常用命令:

查看版本
cat /etc/issue or cat /etc/lsb-release

查看内核
uname -a (显示全部信息).
uname -r (显示内核信息)
44
Ubuntu 8.04 中开启3D桌面特效与设置方法 (2008-05-24 14:02:04)
本文系转载,特此注明,对于UBUNTU的新用户大都是被它的特效所吸引,本文就是教你怎么开启特效。

Ubuntu 8.04 (Hardy Heron) 中集成了强大3D交互界面,Ubuntu 的 3D 桌面特效给用户带来了一种全新的视觉用户。想必有很多朋友也因为看到了 Ubuntu 8.04 那炫目的 3D 桌面特效才开始慢慢地了解 Ubuntu 8.04 (Hardy Heron) 的。虽然在这之前也不少的朋友写过设置 Ubuntu Linux 3D 桌面特效的文章,但新发行版的发布也会有新的朋友看到了 Ubuntu 3D 桌面特效而接触 Ubuntu Linux 。因此,我觉得有必要把在 Ubuntu 8.04 (Hardy Heron) 开启 3D 桌面特效的方法给新手们再详细的介绍一下。