Showing posts with label 8.04. Show all posts
Showing posts with label 8.04. Show all posts

Saturday, September 19, 2009

Remote Applications via X11 - Easy Way (over ssh)

Here I will show you how to interact with applications remotely. This is quite useful when you have for example an Ubuntu Server that doesn't have a graphical environment (Gnome or KDE) and a Desktop that has and you need to use some graphical applications on the Ubuntu Server but you can't because you don't have a graphical environment.

So whit this you can show and interact with the graphical applications on the Ubuntu Server, using your Desktop's, graphical environment. So in the X11 world you have the following:

Ubuntu Server - X11 Client --> Application is executed
Ubuntu Desktop - X11 Server --> Application is shown

It's a bit confusing at first, that your Ubuntu Server is your X11 Client, and you Desktop is the X11 Server.

Note: this was tested on Ubuntu 8.04 and 9.04.

X11 Server - Where the remote apps will be shown
===================================

my_user@my_desktop:~$ ssh -X root@remote_server
root@remote_server:~$

Now you have a what looks like a normal ssh remote terminal on the "remote_server". But when you execute an graphical apps on the remote server it will be displayed on your desktop, for example:

root@remote_server:~$ gedit

With this you can make a text file on your machine tha will be saved on the remote server.

If you want ssh to always act like this, have the following line in your /etc/ssh/ssh_config:

ForwardX11 yes

With this method all the data over the network will be encrypted, because of ssh, but if you want to kick it old school, whit no encryption an a lot more complicated using X11 directly, you can check the post "Run Applications Remotely via X11 - Hard Way"

Based on: http://wiki.linuxquestions.org/wiki/X11_forwarding_with_OpenSSH

Remote Applications via X11 - Hard Way

Here I will show you how to interact with applications remotely. This is quite useful when you have for example an Ubuntu Server that doesn't have a graphical environment (Gnome or KDE) and a Desktop that has and you need to use some graphical applications on the Ubuntu Server but you cant because you don't have a graphical environment.

So whit this you can show and interact with the graphical applications on the Ubuntu Server, using your Desktop's, graphical environment. So in the X11 world you have the following:

Ubuntu Server - X11 Client --> Application is executed
Ubuntu Desktop - X11 Server --> Application is shown

It's a bit confusing at first, that your Ubuntu Server is you X11 Client, and you Desktop is the X11 Server.

Note: this was tested on Ubuntu 8.04 and 9.04.

X Server - 192.168.1.68 (Where the remote apps will be shown)
=======================================
## Allow that the remote applicatilõns to be show on the X11 Server #####
$ sudo gedit /etc/gdm/gdm.conf

DisallowTCP=true
change it to
DisallowTCP=false


## Reboot to load the new gdm.conf file #####
$ sudo reboot


## Check if the X Server TCP Connections ######
$ netstat -natp |grep :6000

(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN -
tcp6 0 0 :::6000 :::* LISTEN -


## Add permission for the remote X Client applications #####
## to be shown locally this is temporary, when you #####
## reboot, you must do this again #####
$ sudo xhost 192.168.1.71

## Find the id of the display you are in currently, #####
## and were we see the remote apps, from the X Clinet #####
$ echo $DISPLAY
:0.0


X client - 192.168.1.71 (Where the remote apps will be executed)
========================================

In order to show an application remotely you should use one of the options bellow, where 192.168.1.68 is the IP of the remote computer were the applications will be shown and 0.0 is the id of the graphical terminal on that computer, found earlier, were the remote applications will be displayed.

In this example we execute the application "nautilus", you should change it to the application you want to see remotely.
$ sudo DISPLAY=192.168.1.68:0.0 nautilus
or
$ sudo export DISPLAY=192.168.1.68:0.0
$ nautilus

some applications will not work with the first option so try the second.

After executing one of the two options above, the applications
will be running locally on the X Client (192.168.1.71) but displayed remotely on X Server (192.168.1.68), the applications will not be able to see or use anything on the X Server, there you can only interact with it, and all the resources it may use are from the X Client (local machine).

For example if you replace "nautilus" with "gedit", write something on it and save it the file will be saved on the X Client and not on the X Server were you are interacting with it.


With this method all the data over the network will not be encrypted, if you want a method with encription and a lot easyer using X11 over ssh, you can check the post "Run Applications Remotely via X11 - Easy Way (over ssh)"


Inspired on:

http://ubuntuforums.org/showthread.php?t=162566
http://www.cisl.ucar.edu/docs/ssh/guide/node29.html
http://www.hackinglinuxexposed.com/articles/20040513.html
http://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-restart-x-without-rebooting-418785/
http://www.linuxplanet.com/linuxplanet/tutorials/857/3/
http://www.codingdomain.com/linux/remote/x11/

Sunday, June 15, 2008

gXine Error - No demuxer found - stream format not recognized

Just installed Ubuntu 8.04 LTS - Hardy Heron and tried to watch a movie on DVD with gxine (libdvdcss2 is installed). This is the resulting error message:

The xine engine failed to start.
No demuxer found - stream format not recognized.


I fixed it by installing the following in the Synaptic Package Manager: -

libxine1-ffmpeg

or just type on the bash shell:

$ apt-get install libxine1-ffmpeg


And thats it.




Taken from: http://ubuntuforums.org/showthread.php?t=461442

Monday, June 2, 2008

Build Essentials - Develop C/C++ in Ubuntu

If you want to develop in C or C++ you have to install the basic packages that include among other things the C/C++ standard libraries, otherwise you migth have the C/C++ compiler (gcc/g++) and you are getting compile errors.


To install these basic C/C++ developement packages just do:

$ sudo apt-get install build-essential


To test it, just save the C code below in a file like "hello.c"


#include

main()
{
printf ("Hello World!\n");
}


now then compile it:

$ gcc hello.c


and run it:

$ ./a.out

it shoul print "Hello World!"


And thats it you are ready to start developing C/C++ in Ubuntu.

Wednesday, May 21, 2008

VTiger CRM 5.0.4 on Ubuntu 8.04 (Hardy Heron)

VTiger CRM 5.0.4 HOWTO


# Install Apache with its Documentation #####
$ sudo apt-get install apache2 apache2-doc



# Start Apache (which probably is already installed) #####
$ sudo /etc/init.d/apache2 start



# Test Apache #####

Type on Mozilla Firefox: http://127.0.0.1/
It should show: It works!
It may show something else, like something saying apache and
with the apache logo.

Note: The web page with the message "Iy works!" is in the
"/var/www" directorie, which is apaches root directory, and
is the directory where we will put VTiger CRM



# Download and Extract the VTiger CRM source #####

Download the VTiger CRM source at: http://heanet.dl.sourceforge.net/sourceforge/vtigercrm/vtigercrm-5.0.4.tar.gz

$ cd /path_were_the_vtiguer_source_is

$ tar zxvf vtigercrm-5.0.4.tar.gz



# Install the MySQL, PHP and Apache needed dependencies #####

$ sudo apt-get install mysql-server mysql-client
# Type in the MySQL password in the text box bash that will apear on the bash shell

$ sudo apt-get install libapache2-mod-php5 libapache2-mod-perl2

$ sudo apt-get install php5 php5-cli php5-common php5-curl php5-dev php5-gd php5-imap php5-ldap

$ sudo apt-get install php5-mhash php5-mysql php5-odbc curl libwww-perl imagemagick



# Install VTiger on Apache #####

$ cd vtigercrm/

# Copy VTiger CRM to the /var/www dir (apache root dir) #####
$ sudo cp -vr * /var/www


# Change the VTiger CRM owner to the Apache owner so that #####
# Apache, can modify these when needed #####

$ sudo chown www-data -vR /var/www



# Delete the Apache test page #####

$ sudo rm -rf /var/www/index.html



# Restart Apache #####

$ sudo /etc/init.d/apache2 restart



# Configurar o Vtiger #####

Open Mozilla Firefox:
http://127.0.0.1/ or http://127.0.0.1/install.php
Now folow the instructions shown on the open page,
and configure the VTiguer CRM, and thats it.

Saturday, May 17, 2008

No sound on ASUS F3SC laptop with Ubuntu 7.04 or 8.04

Hi, thought I should share my problem - and the solution with the forum.

I assume, that you have checked that the speakers are not muted- OK - read on:


WARNING:
I'm a low-tech no-good son-of-a-newbie (have been for 7 years - the learning curve is steeeeeep) ... so please don't ask me a lot of hard questions: I got sound -> I'm happy!


PROBLEM:
No sound after installing Ubuntu 7.10 (Gutsy Gibbon) on new ASUS F3SC laptop.

HARDWARE AND SOFTWARE DETAILS:

Kernel version:
Code:
jospan@discworld:~$ uname -r
2.6.22-14-generic
ALSA version:
Code:
jospan@discworld:~$ cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.14 (Thu May 31 09:03:25 2007 UTC).
The sound card:
Code:
jospan@discworld:~$ lspci -v | grep Audio
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
The chipset on the sound card:
Code:
jospan@discworld:~$ cat /proc/asound/card0/codec#0 | grep Codec
Codec: Realtek ALC660-VD
Loaded sound driver:
Code:
jospan@discworld:~$ cat /proc/asound/modules
0 snd_hda_intel

SOLUTION:

Add the following line:
Code:
options snd-hda-intel model=lenovo
to the file /etc/modprobe.d/alsa-base (create the file if it does not exist)
..and yes: I know it says 'lenovo' and yes: I know my laptop is an ASUS!

Reboot and rejoice to the sound of the Ubuntu opening fanfare

Still no sound? - have you checked again that the speakers aren't muted? - Yes? - sorry, can't help you then...I'm the low-tech no-good son-of-newbie, remember?

By the way: I have also confirmed this solution when using Ubuntu 8.04 LTS (Hardy Heron) (ALSA driver 1.0.16) on the ASUS F3SC.



Taken From: http://ubuntuforums.org/showthread.php?t=728497