- Installing printer on FC9
Use 'system-config-printer' command. For more details, refer following link.
http://foo2zjs.rkkda.com/fedora/hp1020.html
Wednesday, June 3, 2009
How to install Flashplayer in Firefox on Linux?
Firefox on Linux needs manual installation of Flash player. Surprisingly it's bit messy, so here are a few steps to accomplish this task:
- Get the rpm/deb package downloaded on your system(typically titled adobe-release-i386-1.0-1.noarch.rpm/ flash-plugin-10.0.22.87-release.i386.rpm).
- Install with YUM/aptget like follows:
$yum install adobe-release-i386-1.0-1.noarch.rpm
- Open Firefox browser, and in the address bar type "about:config".
If you see flash player entry in there, you are fine. Else, go to next step.
- Run $updatedb
It'll update the database for "locate" command.
- Run $locate libflashplayer
Most probably it will tell you the directory, "/usr/lib/flash-plugin" directory. Here you will find libflashplayer.so.
- Copy "libflashplayer.so" to Firefox installation directory (e.g. "/usr/local/bin/firefox/plugins/"). Also copy it to "/usr/lib". This will make this library available to all users.
- Again check your Firefox browser with "about:config". You should see a couple of flash player entries there.
That's all. Try running Youtube for verification:-)
Ref: http://www.linuxquestions.org/questions/linux-software-2/how-to-install-flashplayer-in-firefox-487406/
- Get the rpm/deb package downloaded on your system(typically titled adobe-release-i386-1.0-1.noarch.rpm/ flash-plugin-10.0.22.87-release.i386.rpm).
- Install with YUM/aptget like follows:
$yum install adobe-release-i386-1.0-1.noarch.rpm
- Open Firefox browser, and in the address bar type "about:config".
If you see flash player entry in there, you are fine. Else, go to next step.
- Run $updatedb
It'll update the database for "locate" command.
- Run $locate libflashplayer
Most probably it will tell you the directory, "/usr/lib/flash-plugin" directory. Here you will find libflashplayer.so.
- Copy "libflashplayer.so" to Firefox installation directory (e.g. "/usr/local/bin/firefox/plugins/"). Also copy it to "/usr/lib". This will make this library available to all users.
- Again check your Firefox browser with "about:config". You should see a couple of flash player entries there.
That's all. Try running Youtube for verification:-)
Ref: http://www.linuxquestions.org/questions/linux-software-2/how-to-install-flashplayer-in-firefox-487406/
Friday, May 29, 2009
Windows flavor in Linux, YUM
Linux is bad for naive users especially while installing new software. You always see some dependency missing and all. That's what I used to think. But no more. Linux has given a break from messy-dirty way of installing a software to a very very clean and simple way.
Yes, it's by Fedora 9(New name for good old Redhat), and it's called YUM.
Yum makes installing new RPM(Redhat Packet Manager) butter smooth and a slightly simpler than Windows.
All Yum demands is an Internet connection and lo, you are done.
Just download your desired RPM and specify it to yum like this:
$yum install my.rpm
After asking you for a 'YES', it will take care of everything.
Simple right!
Yes, it's by Fedora 9(New name for good old Redhat), and it's called YUM.
Yum makes installing new RPM(Redhat Packet Manager) butter smooth and a slightly simpler than Windows.
All Yum demands is an Internet connection and lo, you are done.
Just download your desired RPM and specify it to yum like this:
$yum install my.rpm
After asking you for a 'YES', it will take care of everything.
Simple right!
Thursday, May 21, 2009
Idiotic scanf() : Scanning whitespaces in a string
In C, a few functions are real nasty and scanf() is one of them. It's specially bad for inputting strings.
What will happen if you give a string:
-> scanf("%s", string)
-> Input: "C is stupid".
Well, you will have only "C" in the "string".
Reason: It happens because scanf() considers white-spaces as delimiter. So "C" being followed by a white space is considered as the only input. Simple, isn't it?
Remedy: We have something like follows:
int main()
{
char arr[10];
scanf("%*[ \t\n]%s", arr);
puts(arr);
}
IT DOESN'T WORK!!!
Only way is this:
#define SIZE 128
int main() {
char arr[SIZE];
char ch;
int index = 0;
while(ch != '\n' && index < SIZE)
{
ch = getchar();
arr[index] = ch;
index++;
}
arr[index] = '\0';
}
Done!
What will happen if you give a string:
-> scanf("%s", string)
-> Input: "C is stupid".
Well, you will have only "C" in the "string".
Reason: It happens because scanf() considers white-spaces as delimiter. So "C" being followed by a white space is considered as the only input. Simple, isn't it?
Remedy: We have something like follows:
int main()
{
char arr[10];
scanf("%*[ \t\n]%s", arr);
puts(arr);
}
IT DOESN'T WORK!!!
Only way is this:
#define SIZE 128
int main() {
char arr[SIZE];
char ch;
int index = 0;
while(ch != '\n' && index < SIZE)
{
ch = getchar();
arr[index] = ch;
index++;
}
arr[index] = '\0';
}
Done!
Wednesday, April 15, 2009
GNU gdb: The toolbox of commands
Many a times application throws signals during its execution. By default gdb has some setting for all UNIX defined signals. If this default is "stop" the application, it becomes quite irritating.
To handle a signal: (gdb) handle SIGUSR1 nostop
All available options are:
nostop
GDB should not stop your program when this signal happens. It may still print a message telling you that the signal has come in.
stop
GDB should stop your program when this signal happens. This implies the print keyword as well.
pass
noignore
GDB should allow your program to see this signal; your program can handle the signal, or else it may terminate if the signal is fatal and not handled. pass and noignore are synonyms.
nopass
ignore
GDB should not allow your program to see this signal. nopass and ignore are synonyms.
(Ref: http://sources.redhat.com/gdb/current/onlinedocs/gdb_6.html#SEC44)
To handle a signal: (gdb) handle SIGUSR1 nostop
All available options are:
nostop
GDB should not stop your program when this signal happens. It may still print a message telling you that the signal has come in.
stop
GDB should stop your program when this signal happens. This implies the print keyword as well.
pass
noignore
GDB should allow your program to see this signal; your program can handle the signal, or else it may terminate if the signal is fatal and not handled. pass and noignore are synonyms.
nopass
ignore
GDB should not allow your program to see this signal. nopass and ignore are synonyms.
(Ref: http://sources.redhat.com/gdb/current/onlinedocs/gdb_6.html#SEC44)
Subscribe to:
Posts (Atom)