This blog is about: Open Source, Operating Systems (mainly linux), Networking and Electronics The information here is presented in the form of howtos. Sometimes the information migth be in portuguese! As vezes a informação pode estar em portugues!
Sunday, June 15, 2008
gXine Error - No demuxer found - stream format not recognized
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
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)
# 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
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:
jospan@discworld:~$ uname -r
2.6.22-14-generic
jospan@discworld:~$ cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.14 (Thu May 31 09:03:25 2007 UTC).
jospan@discworld:~$ lspci -v | grep Audio
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
jospan@discworld:~$ cat /proc/asound/card0/codec#0 | grep Codec
Codec: Realtek ALC660-VD
jospan@discworld:~$ cat /proc/asound/modules
0 snd_hda_intel
SOLUTION:
Add the following line:
options snd-hda-intel model=lenovo
..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
Tuesday, February 5, 2008
Environment Variables
LINUX BASICS
How Do I Set and Use Linux Environment Variables?
Environment VariablesEnvironment variables in the bash shell help you in several ways. Certain built-in variables change the shell in ways that make your life a little easier, and you can define other variables to suit your own purposes. Here are some examples of built-in s hell variables:
· HOME defines the home directory for a user.
· PATH defines a list of directories to search through when looking for a command to execute.
To list the current values of all environment variables, issue the command
env
or list a specific variable with the echo command, prefixing the variable n ame with a dollar sign (the second line shows the result of the echo command):
echo $HOME
/home/hermie
You've already learned how to customize your shell prompt with the PS1 variable. The HOME variable is one you shouldn't mess with, because lots of programs count on it to create or find files in your personal home directory.
Understanding the Path Variable
As in DOS, the shell uses the PATH variable to locate a command. PATH contains a list of dir ectories separated by colons:
echo $PATH
/bin:/usr/bin:/usr/local/bin
When you enter a command, the shell looks in each of the directories specified in PATH to try to find it. If it can't find the command in any of those directories, you'll see a "Command not found" message.
If you decide to put your own programs in a bin directory under your home directory, you'll have to modify the path to include that directory, or the system will never find your programs (unless you happen to be in that directory when you enter the command). Here's how to change your PATH variable so it includes your personal bin directory:
PATH=$PATH:$HOME/bin
So if PATH was set to /bin:/usr/bin:/usr/local/bin beforehand, it would now have the value /bin:/usr/bin:/usr/local/bin:/home/hermie/bin.
Creating Your Own Shell Variables
If you are a programmer, you'll find it handy to create your own shell variables. First issue the command
code=$HOME/projects/src/spew
and then, regardless of what directory you are in, you can issue
cd $code
to pop over quickly to the directory containing the source code for that way-cool spew program you're developing. (The cd command means "change directory.")
A variable assignment like this will work just fine, but its scope (visibility) is limited to the current shell. If you launch a program or enter another shell, that child task will not know about your environment variables unless you export them first.
Unless you know for sure that an environment variable will have meaning only in the current shell, it's a good idea to always use export when creating variables to ensure they will be global in scope--for example,
export PS1="\u \$ "
export code=$HOME/projects/src/spew
And be sure to add these commands to your .profile file so you won't have to retype them eac h time you log in.
Taken from: http://lowfatlinux.com/linux-environment-variables.html
Instead of using export to define the variables and to make them permanent, i think you can define these in the file /etc/environment.
Wednesday, November 28, 2007
How To Play RMVB (Real Media) in Mplayer
Basically in this "how to" we are going to show how to add a additional pack of codecs (Windows codecs), in which the RMVB codec is included.
First off all, let's start by installing the Mplayer, using apt-get:
$ sudo apt-get install mplayer
Now that the mplayer is installed let's download the the pack, at:
ftp://opensys.linuxpackages.net/pub/Slackware-10.1/jay/mplayer/MPlayer_codecs-20050412-i686-1jto.tgz
Extract the MPlayer_codecs-20050412-i686-1jto.tgz like this:
$ mkdir /tmp/codecs
$ cd /tmp/codecs
$ tar -zxvf /.../MPlayer_codecs-20050412-i686-1jto.tgz
Now we have all the extracted content of MPlayer_codecs-20050412-i686-1jto.tgz in /tmp/codecs.
The next step is to copy the codecs to the rigth place, so that Mplayer can use them,
that place is the directory /usr/lib/win32 (which probably doesn't exist). To do that just do like this:
$ sudo mkdir /usr/lib/win32
$ sudo cp /tmp/codecs/usr/lib/codecs/* /usr/lib/win32
And that's it, now you can play RMVB files along with many others.
Just one more thing, cleaning up the extracted codecs:
$ sudo rm -rf /tmp/codecs
All set! Enjoy :)
Thursday, August 2, 2007
Tunelling P2P (Bitorrent) Over SSH
Have you ever been on a network somewhere where Bittorrent simply doesn’t work? The ports might be blocked, the packets are inspected, etc…? Well, after a little research and a buck i’ve managed to come up with a pretty good solution. I’d heard about tunneling content through SSH, but never really figured out how to get it working. That is, until now.
I was really excited my first day at Blue Lava when I heard that they had a 20mbps connection. I was told I could download full Linux ISO’s in ten minutes. Pretty quick. Sadly the ports for Bittorrent were blocked and my downloading spree never began.
Right now I am sitting in a Starbucks right near the south shore of Oahu, Hawaii. I’ve got Azureus open and its downloading at a steady pace of 170kbps, I’ve pretty much maxxed out the connection over here. The funny (or cool) thing is, the ports are blocked! So how can you bypass your corporate firewall or public hotspot (like Starbucks T-Mobile WiFi) and work out your download muscle? Read on!
First of all, you are going to need some sort of shell account to tunnel everything through. I’ve already tried using my Silenceisdefeat account, but their SSH server is not configured the way that we want it, so that won’t work. A friend of mine told me about Disflux, a service almost exactly like Silenceisdefeat. Disflux has their SSH servers configured the way we want em though, so that is what we are going to use.
UPDATE: Turns out that Disflux died or something. But! Don’t flip out! As it turns out (Thanks Chris! - #19) Silenceisdefeat.org, which is my choice of shell anyway, does work with this guide. However, it will only work if you connect to ssh.silenceisdefeat.org!
So I shelled out the $1 for my disflux Silenceisdefeat.org shell account (I actually already had one, best thing ever), and went on my merry way figuring out how to configure everything else. Some may think that paying for something like this is nuts, but honestly, Bittorrent has become a part of my everyday life, I depend on it like a crack addict depends on his crack. One buck is totally worth the hours of glee BitTorrent has to offer.
First thing you need to do after buying your shell account is open up a terminal (in OSX its in the Utilities folder), or download putty if you’re on Windows. If you are on Linux and don’t know how to open a terminal I feel sorry for you.
In the terminal type “ssh username@domain -D portnumber”, this goes for OSX and Linux. Now, with PuTTY on Windows I am not quite sure how to go about doing this. I am pretty sure you would just type “-D portnumber” into a extra flags option box or something, but I am really not quite sure. Edit: Scroll down for Eberth’s Windows guide! Or you lazy people can clicky.
For example, I use: “ssh whalesalad@ssh.silenceisdefeat.org -D 7777″. You can use any port you want, but make sure it isn’t being used by anything else. I happen to like the number 7777 so thats what I chose.
NOTE: In the screenshots Disflux is used, simply replace shelly.disflux.com with ssh.silenceisdefeat.org after creating an account and you will have no problems!
Now, what does this do? This has your open SSH session act as a SOCKS proxy. This is what we are going to have Azureus or any other bittorrent client of choice use.
-----------------------------------------------------------------------------------------------------------------------In detail the -D [bind_address:]port option does the following:
Specifies a local “dynamic” application-level port forwarding.
This works by allocating a socket to listen to port on the local
side, optionally bound to the specified bind_address. Whenever a
connection is made to this port, the connection is forwarded over
the secure channel, and the application protocol is then used to
determine where to connect to from the remote machine. Currently
the SOCKS4 and SOCKS5 protocols are supported, and ssh will act
as a SOCKS server. Only root can forward privileged ports.
Dynamic port forwardings can also be specified in the configura‐
tion file.
----------------------------------------------------------------------------------------------------------------------------
Once that terminal is open, just minimize or hide it, but leave it open. The proxy will only work if that terminal is open and connected, so try not to fiddle with it.
Now we have to configure our BitTorrent client of choice. I recently “switched” to OSX and am using Azureus, but if I had my way I would be using the greatest client ever: uTorrent. Because I can’t get the internet working in Paralells at the moment I can’t help explain how to configure uTorrent, but here is what you need to do to get Azureus up and running with our newly created SOCKS proxy.
First of all you need to enable the Advanced options area of Azureus. You can do this by re-running (or running if this is your first time using Azureus) the configuration wizard. On OSX this is under the Azureus menu, I’m not quite sure where it is on Windows (=P). Choose the advanced user option, this will let us configure Azureus to use proxies. Once this is done, open up the preferences area of Azureus.
From there open up the “Connection” sub items and then the “Proxy Options”. From there, check the “Enable proxying of tracker communications” and “I have a SOCKS proxy”. In the host field enter “localhost” and in the port field enter whatever number you used to start the proxy, for me thats “7777″.
Save your options and thats it! Now you should be able to head to any one of the online tracker websites and download away! Legal files of course, we don’t encourage piracy or stealing here at the salad. Make sure to leave comments if it works for you, and any other tips or tidbits you’d like to share!
Edit: For all you windows users out there, Eberth made a comment below on how to get this working. He did such a good job, I’m going to include it right here in my guide.
First you need to get PuTTY. It’s a great client, back when I used Windows it was my SSH client of choice. You can find a direct link to PuTTy here.
Open up PuTTY and enter shelly.disflux.com into the host field.
Go to Connection > SSH > Tunnels, and write your port on the source port field (in this case i’m using the same as Michael, 7777) and select the “Dynamic” checkbox, click the add button.
I’d reccomend what Eberth explains in his comment, which would be to save your session so that next time you can just fire up PuTTY and double click your saved session to reload the same settings. Enter a name for the saved session and click save, its as easy as pie!
Now you’ve got your SOCKS proxy running, time to fire up your favorite BitTorrent client. Azureus users can use the same configuration that I have above, but if you’re smart you’re going to be using uTorrent. Here is a screenshot of the way Eberth configured his client:
Thanks Eberth!
Based on: http://www.whalesalad.com/2006/08/27/tunneling-bittorrent-over-ssh/