Help with VirtualBox??????
by DB
Hi All,
Just loaded VirtualBox on my antique system - very pleasantly surprised
how easily eveything (almost!) seems to have gone.... must be a problem
waiting to bite me!
Anyway, reason for going down this path is to be able to use Photbook
software which runs on everything - so long as it's called Winderz!
Having got it running, I now need to be able to move photos from my
Fedora 12 external USB harddrive & there comes Problemo Uno - my virtual
machine can't see any USB ports. During installation it kept bubling on
aabout how I'd got USBFS set up & should change it, but no idea how.
So, question to you smart folks out there.... HOW do I change the USB
file system to something it might like? Or is there a different way to
share data between the Fedora host & the XP guest machines?????
As ever, many thanks fr all the time you spend helping me out of my "Tar
Baby" situation(s)!
Greetings
Dave
13 years, 7 months
Video in a small window -
by Bob Goodwin
This computer runs F-13 and XFCE.
I have two "IP cameras" that provide video streams that I would like
to make available in one corner of this wide screen monitor. I can
view both cameras using either Firefox or VLC, I normally just click
on an icon that brings up the desired camera in VLC but it would be
convenient if I could elect to put a small image in one corner and
keep it there when required, as when waiting for someone to come in
the driveway, e.g.
Can anyone suggest a means of doing that?
Thanks.
Bob
13 years, 7 months
apache 2.2.16 and directory
by Rafnews
Hi,
when i use apache httpd under windows i have no problem to setup it, however
under fedora 13 i have some little problems.
I guess it is due to my limited knowledge of Fedora 13 and apache
collaboration.
like under Windows OS, i would like to have different directories under
fedora which will represent my different tools.
for example if my fedora server address is 192.168.1.2 and i have a tool
named 'tool1' URL should look like:
192.168.1.2/tools1/
where 'tool1' should be be found in /var/www/html/tool1/ directory.
how can i do that under fedora ?
Should the directory have particular rights ?
--
Alain
-----------------------------------------------------------
Windows 7 x64 / Fedora 13
PostgreSQL 8.3.5 / MySQL 5
Apache 2.2.16
PHP 5.3.1
C# 2005-2008
13 years, 7 months
Getting printer information failed
by Michael Hennebry
"Getting printer information failed" is
what firefox tells me when I try to print.
Other image viewers go through the motions,
but nothing prints.
I can print a test page and I can use lpr to print text from stdin.
I'm running Fedora 13 and Firefox 3.6.7 .
In my effort to find a CUPS version, I came across
system-config-printer 1.2.3 .
What should I look for?
--
Michael hennebry(a)web.cs.ndsu.NoDak.edu
"Pessimist: The glass is half empty.
Optimist: The glass is half full.
Engineer: The glass is twice as big as it needs to be."
13 years, 7 months
nouveau with two GPUs... anyone?
by DJ Delorie
I tried F14 alpha today, yum updated it, wanted to get all four
monitors on two Nvidia GeForce 9800 cards working as a single desktop.
Had partial success.
The default no-conf setup activated the first two monitors (first card
only), put them next to each other.
With many hours of fiddling, I got a xorg.conf that activated all four
monitors, but cloned 0 onto 1 and 2 onto 3, and put the 0/1 clone next
to the 2/3 clone. I couldn't move anything to the "right" virtual
locations.
All I want is a desktop with all four monitors arranged my way, I
don't need the XRandR extensions (although that would be nice to
silence all those warnings about it missing), I don't need to ever
move, resize, or enable/disable the monitors - they're fixed.
Is there *some* way to tell nouveau to use two GPU cards, without also
having to manually fiddle with every other configuration option there
is?
And *no* I don't want to use the nvidia driver - I have that now, that
requires Xinerama, which kills performance for the apps I use most.
My current layout:
Card2/Monitor1 C1/M1 C2/M2 C1/M2
Rotated CW normal CW normal
(although I'd rather have C1/M2 *above* C1/M1)
13 years, 7 months
Problem with chrt
by JD
I am trying to run a command in realtime mode just to see
if it behaves any different as far as timings are concerned.
Man page says:
CHRT(1) Linux User’s Manual CHRT(1)
NAME
chrt - manipulate real-time attributes of a process
SYNOPSIS
chrt [options] prio command [arg]...
chrt [options] -p [prio] pid
So, I tried the first example instance above:
$ sudo chrt 0 ./freq -s120 -u0 -r
chrt: failed to set pid 0's policy: Invalid argument
Hmmm. I thought the arg after chrt should be the value of the priority,
since options to chrt are optional!!!
Another broken utility???
Soo I tried:
$ sudo chrt ./freq -s120 -u0 -r # i.e. no value for priority
chrt: failed to set pid 0's policy: Invalid argument
Anyone tried this before? Any clues?
13 years, 7 months
How to stop NetworkManager from frobbing my /etc/resolv.conf
by Sam Varshavchik
After copiously scouring links all over the place, I think that I've
succesfully managed to set up a bridge between my real network interface and
the virtual network interface used by virtmanager-hosted virtual machines. I
now have F13 hosting a virtualized machine with full network connectivity.
Yay.
One glitch remains that I can't fix. After a reboot, /etc/resolv.conf has
nothing useful, even though dhclient came up fine on the bridge.
Experimentation uncovered NetworkManager as the guilty party.
NetworkManager, AFAIK, doesn't know anything about virtual bridges. I had to
set it up by hand:
[root@monster network-scripts]# cat ifcfg-vnet0
DEVICE=vnet0
TYPE=Bridge
BOOTPROTO=dhcp
ONBOOT=yes
eth0 is bridged:
[root@monster network-scripts]# cat ifcfg-eth0
# Intel Corporation 82573E Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BRIDGE=vnet0
#BOOTPROTO=dhcp
HWADDR=00:30:48:FC:83:FA
ONBOOT=yes
OPTIONS=layer2=1
TYPE=Ethernet
NM_CONTROLLED=no
[ bunch more stuff snipped ]
I also have eth1, which I would like to be owned by NetworkManager:
[root@monster network-scripts]# cat ifcfg-eth1
# Intel Corporation 82573L Gigabit Ethernet Controller
DEVICE=eth1
HWADDR=00:30:48:FC:83:FB
ONBOOT=no
BOOTPROTO=dhcp
TYPE=Ethernet
IPV6INIT=no
USERCTL=no
NM_CONTROLLED=yes
PEERDNS=yes
What's happening is this. The S10network script runs first, and brings up
eth0 than vnet0; and configures the interface and /etc/resolv.conf from
DHCP. Later S23NetworkManager runs, and removes my DNS server from
resolv.conf, because none of the NetworkManager-owned network interfaces are
up.
I want to use NetworkManager for eth1, but I'll have to either disable it,
or bounce the network initscript after NetworkManager, which might cause
some confusion elsewhere.
Is there a way to force NetworkManager not to touch /etc/resolv.conf.
13 years, 7 months
Computing cpu's clock in cycles per second
by JD
Since I have not been successful to determine the runtime
cpu frequency using the fedora tools:
$ sudo /usr/bin/cpufreq-info -f
$ sudo /usr/bin/cpufreq-info -w
$
They come up empty.
So, I wrote a simple program to determine an approximate
value for the number of cycles per second.
The algorithm is simple.
Start an one shot interval timer for N seconds (can be an arg to the
program), and M microseconds (can be an arg to the program).
The interval timer can be virtual (-v arg to the program) or realtime
(-r arg to the program).
be sure to set up a proper handler routine for the SIGALRM or SIGVTALRM,
depending on -v or -r.
More on this later....
then simply run a loop that increments count (type unsigned long,
initialized to 0) until
the global var intr becomes none zero.
Now, how many instructions were executed just for the loop.
When I compiled the program with -S to see the assembler output,
it turns out to be a total of 7 instructions for the loop.
Now, let's assume each of the 7 instructions takes 2 or 3 cpu cycles.
Lets say N cycles average per instruction.
so now you have count * 7 * N total cycles in the loop.
Divide that by the total number of seconds you set the timer for, and you
will get a pretty close approximation of the actual runtime cpu clock
(per second).
Now, about the type of the interval timer.
1. I found that using the virtual interval timer yielded wrong values
for count. Every time and each time it varies by thousand and sometimes
millions.
2. That leaves the realtime interval timer.
3. In order to get a very close approximation to a realtime interval
timer AND have a much more realistic value for the "count", the program
must be run as root, and niced to --20, like so:
sudo nice --20 ./freq -s120 -u0 -r
says run the program at the highest nice value, for 120 seconds and 0
microseconds with realtime interval timer.
In my program I do not bother to do the division, because I have no
idea what each different cpu's
instructions cycles are for the specific 6 instruction in the loop.
I use bc after the program prints the count to do the math with long
precision (scale=20)
The loop looks like this:
while (intr == 0) count++;
In assembly, it looks like this:
jmp .L25 ---------------------+
.L26: |
movl count, %eax |
addl $1, %eax |
movl %eax, count |
.L25: |
movl intr, %eax |
testl %eax, %eax |
je .L26 ---------------------+
Here's the program. I hope some folks on this list more familiar with
realtime programming
can enhance it and share it with the rest of us.
/* Program to compute the approximate cycles per second of a cpu clock */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <getopt.h>
#include <sys/time.h>
#include <sys/timeb.h>
#define TWO_MINUTES (120) // seconds
extern char *optarg;
extern int optind, opterr, optopt;
struct itimerval itv0;
struct timeb t0, t1;
long tv_sec = -1, tv_usec = -1;
struct sigaction doit;
unsigned count = 0;
int intr = 0;
void
alarm_handler(int sig)
{
intr = 1;
}
void error(char *s)
{
fprintf(stderr, "illegal option %s\n", (s == NULL) ? "unknown" : s);
_exit(-1);
}
prt(int c)
{
fprintf(stderr, "saw option %c\n", c);
}
main(int ac, char *av[])
{
int opt;
unsigned ms;
unsigned itimer = -1;
sleep(60);
while ((opt = getopt(ac, av, "rs:u:v")) != -1) {
switch(opt) {
case 's': prt('s'); tv_sec = atol(optarg); break;
case 'u': prt('u'); tv_usec = atol(optarg); break;
case 'r': prt('r'); itimer = ITIMER_REAL; break;
case 'v': prt('v'); itimer = ITIMER_VIRTUAL; break;
default: prt('?'); break; //error(optarg);
}
}
if (tv_sec == -1) tv_sec = TWO_MINUTES; // 120 seconds.
if (tv_usec == -1) tv_usec = 0;
if (itimer == -1) itimer = ITIMER_REAL;
itv0.it_value.tv_sec = tv_sec;
itv0.it_value.tv_usec = tv_usec;
itv0.it_interval.tv_sec = (long)0;
itv0.it_interval.tv_usec = (long)0;
doit.sa_handler = alarm_handler;
if (itimer == ITIMER_VIRTUAL)
sigaction(SIGVTALRM, &doit, (struct sigaction *)NULL);
else sigaction(SIGALRM, &doit, (struct sigaction *)NULL);
ftime(&t0);
if (itimer == ITIMER_VIRTUAL)
setitimer(ITIMER_VIRTUAL, &itv0, (struct itimerval *)NULL);
else setitimer(ITIMER_REAL, &itv0, (struct itimerval *)NULL);
while(intr == 0) count++;
ftime(&t1);
ms = ((unsigned)t1.time * 1000 + (unsigned)t1.millitm) -
((unsigned)t0.time * 1000 + (unsigned)t0.millitm);
fprintf(stderr, "alarm after %u milliseconds \n", ms);
// Above fprintf is just to show that the timer indeed ran for the
specified
// number of seconds.
printf("count = %u\n", count);
}
13 years, 7 months