Ubuntu Networking :: Sample 'c' Code For Browser Basic Function / Get Address And Display Contents?
Oct 5, 2010
I am needing help with two things:
Does anyone have sample 'c' code for a browser basic function, get an address and display the contents? Want to learn bout how it's done.
Second, can anyone point me to the source for "webcam", a webcam capture program? I spent a day on the internet trying to find a home page or source listing.
Sorry if these are "dumbassed" questions, but I am new back to Linux. Been out of the Unix world since 1989.
The issue I'm having is that browsers in Ubuntu 10.04 stall at the part of the process for loading web pages that is noted by the "Looking Up (website address)...". The page eventually continues to load, but it takes a long time. This problem effects all browsers on the machine (tried Firefox and Chromium). It is not a problem with the connection, because a Windows 7 laptop and even the Windows XP partition on the Ubuntu machine function as they should.
I have succesflly installed OpenVPN server and clients(followed tuts). Everything is great, however when I have openvpn connection established on the clients I loose the basic internet connection in the browser, but my clients can see the vpn server(even I can ssh to the server via the openvpn client ip). I am guessing that all the traffic is routed through the server. I am just not knowledgable enough with routing , iptables and internet sharing. I am using tun based setup on OpenVPN. I am just not even sure if this is a server or a client issue, sorry for ignorance and illeteracy.
I have been playing with Linux consistently for a couple of months now. I've been a Windows sys. admin for most of my career, so Linux is pretty strange for me. I started off with computers way back with the TRS-80 and then eventually moved to DOS systems. So the command line interface (CLI) of Linux was not completely alien to me, yet my lack of knowledge on the syntax and commands is holding me back. I have come a long way.
Recently I needed to play around with some DNS settings and one of the commands I used frequently in Windows, IPCONFIG /ALL, doesn't have a direct relative that displayed the same information. If you run ifconfig, it doesn't return the DNS servers you are currently using. You have to run a separate command to retrieve that information.
What I have done is created a super simple script that displays the network information for my primary LAN adapter, which is ETH0 in my case. After that, it shows the domain and name server information. Then it pauses for 20 seconds before closing the terminal window.
Here are the contents of the script file:
ifconfig -a eth0 cat /etc/resolv.conf sleep 20
I simply right-clicked the Linux desktop, choose Create Document, Empty File. I named it something like Network Info. Then I opened it and put this information in it, saved it, and closed it. I renamed the file and added a .sh extension to the end which makes it into a script file. Next, right-click the script and go to properties. In the Permissions tab, check the box next to Execute: Allow executing file as a program. Then click close.
To run the script, just double-click the icon and then click Run In Terminal at the prompt. The terminal window opens, displays the information, and exits after 20 seconds. If you need it longer than that or need a different interface (such as wlan0 for your wireless), you can change or even add that in.
This was all done in Ubuntu 10.10. I know it is very simple and very straight forward and welcome thoughts and feedback about simpler ways to do this. For me, the old-school Windows admin, it's a baby step in the right direction. I am really enjoying learning the Linux OS.
I have a script that will change my desktop image to display all of my network IP address. I need to call this script whenever a change in the network occurs. Example, if I disconnect from one network and then connect to another network and get a new IP address.
I downloaded a FLAC album from a band's label.The weird thing is that I cannot see the folder contents using the standard file browser interface.However, VLC can see and play the files without problem.I don't believe the files have any sort of DRM, but they are legal, FWIW.
I've read through tutorials on xrg.conf and xrandr but I have a hard time sorting it all out.I have two questions:You have installed a distro and you're looking at a desktop, but its off center on the monitor and its in low graphics mode, and possibly the wrong refresh rate. [ I've been in this situation with multiple distros, but lets use Ubuntu for the example.]1) How do you determine the actual current resolution?2) What are the steps -in order- to configure the (single) (desktop computer) display?
I have installed XAMPP on my system and started it just fine, but for some reason when I type "http://localhost/myDirectory/index.php" into the address bar of a browser, I get a 404 error. I followed the instructions hereand after creating test.php, I was still not able to view it. Can someone please tell me what I am doing wrong?
I am just coming to GNOME from KDE where I used the folder view desktop widget to display the contents of ~ directory (/home/<user>) rather than the "Desktop" directory itself, as that's where all the stuff I wanted to access from the desktop was. Is there any way I can do this in GNOME with the actual desktop (as opposed to a widget)?
What is the install code for one another browser? either ie (for linux), opeara, or netscape? I want to run this. [URL]It requires the add-in Grease Monkey, which is not compatible with the new FireFox.And why can't I unzip in Linux. Every time i try to open a zip or tarbal, it just errors out. Do I have to run code? What am i missing?
I have an ubuntu 8.04 server running a couple of web sites using virtual hosts , apache2, mysql and php. I have noticed that by default php sessions are created in /var/lib/php5 and all stored in plain text.
I have quickly created a php script in a separate virtual host to list and display all contents in /var/lib/php5 , and it seems incredibly easy to see what details the other accounts are storing in sessions.
What I want to do is to write a script that gathers some information (like cpu temperature and bandwidth usage) and logs it into a file. I can't figure out how to get a single sample of the current used bandwidth: I've found that there's plenty of tools to get this information from command line, but the majority of them are curses based, so I can't take their output to put it into a file. Among these I've found bmon, that has a nice ascii output. The problem is that this output is updated constantly, while what I want is a single "sample" per program call.
Is there a way to get this done with bmon or someone knows another program to accomplish this task?
Consider a situation in which you want to display only specific lines of contents from a file or of a command's output. Yes, we have head and tail commands. But, how to view all the lines of a file except the last one or vise versa when we don't know the count of lines in advance?
Here, I don't want the last line (in italic) to be included in the result since the last line is due to "grep bash" in the devised command "ps au | grep bash". Well, we can rewrite the devised command:
Quote:
"ps au | grep bash | head -n 2"
But, again, here we are specifying the count of lines to be included. But, in the presented problem we don't know any count in advance!
When I try to write email, and enter the first few letters of the recipient in the "to:" box, it sometimes but not always autocompletes. i.e., let's say my contact's name is Frederick, his address is e.g. robertsharry@snotmail.com. I enter Fred or fred or fre, a couple of addresses come in to the autocomplete drop-down, but not his. After searching all over over to find his address by other means, I start to write it in manually only to find that he IS in my address book (and also in recent addresses), listed under Freddie. I know that the word Freddie is not in his actual address, but what is the point of having a search function if you have to remember the address yourself? In other words surely the drop down search should show display names (as well as any other fields)?
I am writing a game in C with SDL. I can successfully display one image on the screen and animate it. However, I am having a lot of issues getting the background to display using the same method. I was asking for help on SDL related forums, but I determined that the issue is not SDL related, and it is actually a pointer issue. However, I can't find where I'm going wrong.
I am running Fedora 9 in virtual box on laptop. Want to set Fedora display size so that I will not have to scroll up or down or sideways to view screen contents. Have tried a couple of options such a resize box and change from full size but these do not help reduce size of Fedora display. Am wondering if it as something to do with the rectangular size of laptop monitor???
I have been using an XFX 5770 with Windows 7 in EyeFinity and running a 5760x1080 resolution. My setup is as follows for Windows
x3 Viewsonic VA2223WM monitors (vga/dvi only)
I have two monitors connected connected with DVI and my 3rd monitor is connected with a DVI to Active Display port adapter, bizlink brand. This works wonderfully in Windows 7.
I cannot get my 3 displays to function properly in Ubuntu. I have tried removing the display port adapter and connecting my 3rd monitor with a DVI to HDMI cable and still no success. I can only use any of my 3 monitors in a dual configuration...how do I get the 3rd extended? Using the ATI driver that was auto downloaded for me...
I'm running 9.10. I was installing ALSA so that I could run my EMU 1616, and when I tried to go through the steps to install, I'm running into two errors that I've noticed so far. I think. Anyway, the first is that is states that the panelw library isn't there, and that alsamixer: function snd_ctl_open failed for default: No such device or address. The alsamixer one is really odd, since it's there, but I don't know why it won't run.
I initially had it running, and now it isn't. I've yet to get sound out of my EMU. the terminal window also tells me that it can't find the snd_emu file, even though it exists on the computer as well. I need an answer for a dummy.
I have read a couple of articles on how dynamic linking works (those stuff about got, plt and lazy binding), and I am still not sure why you need to do dynamic linking in such a complicated way.Suppose your program uses a function in a shared library that needs to be linked dynamically at run time (like a printf). Why can't you statically decide the virtual address of the function at compile time? After all, all you need to do is to enter the page table entry corresponding to the address of the function if the library has been already loaded to a physical page frame.
Download firefox 4 from Index of /pub/mozilla.org/firefox/nightly/latest-trunk Unpack with ark to your home directry folder firefoxIn the folder firefox creat a new folder pluginscopy the contents from /usr/lib64/browser-plugins to the plugins folderStart firefox and there you go
I'm looking for any snippet to manage MAC address via C code in Linux. I tried to write some code to change eth0 mac address writing it in smc911xx eeprom. What I did is the following..
#... some includes... ... int skfd; struct ifreq ifr;