Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
RiSK
Dec 9, 2006

The Red Rocket Rifle

sund posted:

lsusb provides USB related information, dmesg will probably tell you what tty it's attaching to.

Awesome! Thanks a bunch. :)

# lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 002: ID 051d:0002 American Power Conversion Back-UPS Pro 500/1000/1500
Bus 001 Device 001: ID 0000:0000

Ok, cool. It's there.

# dmesg | grep USB
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
ICHB UAR1 USB1 USB2
USB Universal Host Controller Interface driver v2.2
uhci_hcd 0000:00:1f.2: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
uhci_hcd 0000:00:1f.4: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
usb 1-1: new low speed USB device using address 2
hiddev96: USB HID v1.10 Device [APC Back-UPS ES 350 FW:823.B1.D USB FW:B1] on usb-0000:00:1f.2-1

From that, can you determine the tty it's attached to?

Adbot
ADBOT LOVES YOU

yippee cahier
Mar 28, 2005

RiSK posted:

hiddev96: USB HID v1.10 Device [APC Back-UPS ES 350 FW:823.B1.D USB FW:B1] on usb-0000:00:1f.2-1

From that, can you determine the tty it's attached to?
Ok the hiddev driver is claiming it and assigning it to hiddev96. Your UPS is not connected to a tty, it's accessed directly through the usb hid layer. A command like this should give you the path to the device node:

ls -lR /dev | grep hiddev96

But after doing a little more searching, this information seems unnecessary. This site should be useful to you:
http://www.apcupsd.org/manual/Configuration_Examples.html#SECTION000131000000000000000

quote:

If you have a USB UPS, and you have apcupsd version 3.10.7 (3.10.17a for *BSD) or higher, the essential elements of your apcupsd.conf file should look like the following:
code:
     ## apcupsd.conf v1.1 ##
     UPSCABLE usb
     UPSTYPE usb
     DEVICE
     LOCKFILE /var/lock
     UPSCLASS standalone
     UPSMODE disable
Notice that we have not specified a device. In doing so, apcupsd will try all the well known USB ports. We strongly recommend you use this (empty device address) form unless you have a good reason to do otherwise.

Please use the explicit specifications of a device only if you know exactly what you are doing. In general, it is much easier to let apcupsd find the device itself.
Since it autodetects the device node, if something goes wrong with udev one day and your UPC gets assigned to hiddev97 it should still work.

yippee cahier fucked around with this message at 01:45 on May 21, 2007

RiSK
Dec 9, 2006

The Red Rocket Rifle

sund posted:

Ok the hiddev driver is claiming it and assigning it to hiddev96. Your UPS is not connected to a tty, it's accessed directly through the usb hid layer. A command like this should give you the path to the device node:

ls -lR /dev | grep hiddev96

But after doing a little more searching, this information seems unnecessary. This site should be useful to you:
http://www.apcupsd.org/manual/Configuration_Examples.html#SECTION000131000000000000000

Since it autodetects the device node, if something goes wrong with udev one day and your UPC gets assigned to hiddev97 it should still work.

Ahhhh! You're a lifesaver.

I was using some crap APC software that really didn't work well at all. Thanks for showing me apcupsd. Works like a charm!

Had to test, of course.

code:
# tail -f apcupsd.events
Mon May 21 00:34:34 EDT 2007  Power failure.
Mon May 21 00:34:40 EDT 2007  Running on UPS batteries.
Mon May 21 00:34:41 EDT 2007  Mains returned. No longer on UPS batteries.
Mon May 21 00:34:41 EDT 2007  Power is back. UPS running on mains.
The config did indeed autodetect the device after ./config'ing with --enable-usb.

hey mom its 420
May 12, 2007

I work in a web development company and we'll soon be getting actual offices. Because we make extensive use of adobe apps, the work machines will run mainly windows, but I was thinking of setting up a central office server that would run linux. Do you think that's a good idea, even though most of the machines will be running windows?
I was thinking of using it as a SVN server, file server (so I'd probably have to install samba or something, how complicated is that?) and maybe web server.

coconono
Aug 11, 2004

KISS ME KRIS

Bonus posted:

I work in a web development company and we'll soon be getting actual offices. Because we make extensive use of adobe apps, the work machines will run mainly windows, but I was thinking of setting up a central office server that would run linux. Do you think that's a good idea, even though most of the machines will be running windows?
I was thinking of using it as a SVN server, file server (so I'd probably have to install samba or something, how complicated is that?) and maybe web server.

XandrOS is pretty good about acting as a file server for windows machines. Samba is pretty straight forward for it too. I've never had much luck with other distros, however I never spent too much time fiddling with them.

Leathal
Oct 29, 2004

wanna be like gucci?
lil buddy eat your vegetables
I'm running uTorrent under WINE since I couldn't find a Linux torrent program with comparable features that wasn't Azureus.

It worked great for about a week. Recently, for some reason, uTorrent has started acting as if the main program window has been dragged offscreen somewhere. There's no icon in the Gnome taskbar and I can't get to the program at all. It's definitely still running though, it shows up in System Monitor and I can open new torrents from Firefox and the Add New Torrent dialog box pops up.

Is there any way I can have WINE reset window positions or something like that?

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior
Fun Shoe
I've been bash scripting (go easy my first attempt) And after editing out the portion of code that I've gotten to work, I've discovered a new problem. I would like the text file that I've created to be emailed to myself, but I get:

code:
 U  5 MAILER-DAEMON@magni.  Fri Aug 25 12:59  31/1048  "Postfix SMTP server: errors from mailserver"
 U  6 MAILER-DAEMON@magni.  Fri Aug 25 13:01  66/2237  "Undelivered Mail Returned to Sender"
Here is the function for mailing.
code:

#mail function, really becuase i wanted to make a function.
function mail {
	/bin/mail -s "$EMAIL_SUBJECT" "$ADDRESS" < $MESSAGE;
	echo "Message Sent!";
}

Twlight fucked around with this message at 16:55 on May 21, 2007

Bonch
Jul 27, 2004

Leathal posted:

I'm running uTorrent under WINE since I couldn't find a Linux torrent program with comparable features that wasn't Azureus.

It worked great for about a week. Recently, for some reason, uTorrent has started acting as if the main program window has been dragged offscreen somewhere. There's no icon in the Gnome taskbar and I can't get to the program at all. It's definitely still running though, it shows up in System Monitor and I can open new torrents from Firefox and the Add New Torrent dialog box pops up.

Is there any way I can have WINE reset window positions or something like that?
Not really the answer you're looking for, but qBittorrent is pretty good.

Any one know of any application that will enable window snapping? I know Beryl will do it, but sadly I'm a dual monitor ATI user and Beryl won't run with my monitors at their native resolution. Any others?

Bonch fucked around with this message at 05:04 on May 22, 2007

dfn_doe
Apr 12, 2005
I FOR ONE WELCOME OUR NEW STUPID FUCKING CATCHPHRASE OVERLORDS

Twlight posted:

I've been bash scripting (go easy my first attempt) And after editing out the portion of code that I've gotten to work, I've discovered a new problem. I would like the text file that I've created to be emailed to myself, but I get:

code:
 U  5 MAILER-DAEMON@magni.  Fri Aug 25 12:59  31/1048  "Postfix SMTP server: errors from mailserver"
 U  6 MAILER-DAEMON@magni.  Fri Aug 25 13:01  66/2237  "Undelivered Mail Returned to Sender"
Here is the function for mailing.
code:

#mail function, really becuase i wanted to make a function.
function mail {
	/bin/mail -s "$EMAIL_SUBJECT" "$ADDRESS" < $MESSAGE;
	echo "Message Sent!";
}

Seeing the headers and bounce messages would probably be more helpful than just the subjects...

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior
Fun Shoe

dfn_doe posted:

Seeing the headers and bounce messages would probably be more helpful than just the subjects...

Sorry here is the maillog, log:

May 22 10:24:06 XXXXX postfix/postfix-script: fatal: the Postfix mail system is already running
May 22 10:25:10 XXXXX postfix/pickup[12562]: A35414A00F1: uid=0 from=<root>
May 22 10:25:10 XXXXX postfix/cleanup[17395]: A35414A00F1: message-id=<20070522152510.A35414A00F1@XXXXX.coolsavings.com>
May 22 10:25:10 magni postfix/qmgr[12563]: A35414A00F1: from=<root@magni.coolsavings.com>, size=799, nrcpt=1 (queue active)
May 22 10:25:10 magni postfix/qmgr[12563]: A35414A00F1: to=<root@magni.coolsavings.com>, orig_to=<root>, relay=none, delay=0, status=deferred (delivery temporarily suspended: address resolver failure)

What else should i be looking for, or really where are the bounce messages.

Pididdle27
Mar 22, 2003
GoldenCalf
Real easy question here, Im at work and I use Debian Linux. I am trying to get the names of some devices. When I use dmesg it spits out a long rear end list. I tried using the more but it does not work. How do I get it to pause the info so I can read it one page at a time. Please PM me the answer.

yippee cahier
Mar 28, 2005

Pididdle27 posted:

Real easy question here, Im at work and I use Debian Linux. I am trying to get the names of some devices. When I use dmesg it spits out a long rear end list. I tried using the more but it does not work. How do I get it to pause the info so I can read it one page at a time. Please PM me the answer.

If it's real easy, we should post it in here so others can learn too. I think "dmesg | less" is what you're looking for because lol less is more. I always forget about this stuff and hold shift to scroll up through the buffer with the arrows or pageup.

Pididdle27
Mar 22, 2003
GoldenCalf

sund posted:

If it's real easy, we should post it in here so others can learn too. I think "dmesg | less" is what you're looking for because lol less is more. I always forget about this stuff and hold shift to scroll up through the buffer with the arrows or pageup.

Thank you for all of that information!!

meatpath
Feb 13, 2003

This isn't a question, but rather something neat you can do which I just learned of today...

Watch a(ny) movie file in real-time ASCII by using this command:

mplayer -vo aa video_file.xxx

Accipiter
Jan 24, 2004

SINATRA.

68k posted:

Watch a(ny) movie file in real-time ASCII by using this command:

This is dependent on quite a few things, such as having mplayer installed, having aalib installed, and having mplayer compiled with aalib support.

If you want to do the same thing simpler, aaxine is yet another option.

Spudalicious
Dec 24, 2003

I <3 Alton Brown.
I did a cursory inspection of this thread and didn't see it mentioned, so here goes:
I'm running Red Hat Enterprise 4.3, and Gnome 2.8 (at least thats what it says in the about gnome screen). I've successfully figured out how to effect changes to the Applications menu globally, but all of my efforts on removing certain parts of the Actions menu have failed.

My objective is to get rid of Run Application, Search for Files, and Recent Documents. I found a key in gconf-editor in /desktop/gnome/lockdown called disable_command_line which seems to work for the Run Application menu item, but I don't know if that affects anything else besides the Run Application item. Docs imply that other things will be affected as well, such as global terminal access. Besides that I can remove logout and lock screen through gconf-editor, but the recent documents and search for files options seem to be stuck there forever. Anyone have experience with the Actions menu and how to change it around for all users?

Stevor
Feb 18, 2004

THIS IS VERY BIZARRE
I'm trying to get the intel chipset drivers working on my laptop and I'm following the guide at intellinuxgraphics.org. I'm having trouble understanding how to install agpgart. Apparently I have to patch the kernel. I've downloaded the latest source for the linux kernel and I plan to recompile and reinstall agpgart and the new kernel source to have agpgart and the 2.6.something kernel. I have the source for the patch, but I can't copy it into /usr/src. It comes as a bzip, but I I'm denied permission to copy it into that folder. I know this has something to do with admin privlidges but I can't get it working right...

Ferg
May 6, 2007

Lipstick Apathy

Stevor posted:

I'm trying to get the intel chipset drivers working on my laptop and I'm following the guide at intellinuxgraphics.org. I'm having trouble understanding how to install agpgart. Apparently I have to patch the kernel. I've downloaded the latest source for the linux kernel and I plan to recompile and reinstall agpgart and the new kernel source to have agpgart and the 2.6.something kernel. I have the source for the patch, but I can't copy it into /usr/src. It comes as a bzip, but I I'm denied permission to copy it into that folder. I know this has something to do with admin privlidges but I can't get it working right...

First off, which distro are you using? I'd be surprised if any up-to-date distro didn't include this module by default, or at least in an easily accessible package.

Regardless, you can only write to /usr/src as root, and as you're building a kernel I assume that you do have root priveleges. Either way, it's not necessary to put the kernel source in /usr/src, just customary. You can build straight out of your home directory if you'd like.

Pididdle27
Mar 22, 2003
GoldenCalf
Another quick question:

Still Trying to install Debian, I am trying to unmount something and I get this weird error. It looks something like this:
code:
debian:/mnt# umount new_boot
error writing /etc/mtab.tmp: Not enough disk space
Thanks again

Ferg
May 6, 2007

Lipstick Apathy

Pididdle27 posted:

Another quick question:

Still Trying to install Debian, I am trying to unmount something and I get this weird error. It looks something like this:
code:
debian:/mnt# umount new_boot
error writing /etc/mtab.tmp: Not enough disk space
Thanks again

Try this:

code:
$ df -h
What's your local disk space look like for /?

Pididdle27
Mar 22, 2003
GoldenCalf

Twiggy794 posted:

What's your local disk space look like for /?

100% is used! How do I correct that without loving things up?

Edit: There are other directories that are only like 7% if that helps. And I have 2 drives hooked up to it.

Pididdle27 fucked around with this message at 21:02 on May 22, 2007

Ferg
May 6, 2007

Lipstick Apathy

Pididdle27 posted:

100% is used! How do I correct that without loving things up?

Edit: There are other directories that are only like 7% if that helps. And I have 2 drives hooked up to it.

Delete stuff. You're out of harddrive space, so however you decide to fix that is up to you really. If your /home is mounted on the same partition as / then go ahead and remove some stuff from there for starters.

Pididdle27
Mar 22, 2003
GoldenCalf

Twiggy794 posted:

Delete stuff. You're out of harddrive space, so however you decide to fix that is up to you really. If your /home is mounted on the same partition as / then go ahead and remove some stuff from there for starters.

Yeah, I found that turning the loving computer off then on worked just as well, but thanks anyways! On to LILO!!

Edit: Actually, gently caress that. I have a master of debian on a small laptop harddrive. What is the easiest way to put that on the computers onboard flash drive. This is all for robots by the way. I know I can easily find that information so if you just want to throw me a good link that will work!

Pididdle27 fucked around with this message at 22:10 on May 22, 2007

Stevor
Feb 18, 2004

THIS IS VERY BIZARRE

Twiggy794 posted:

First off, which distro are you using? I'd be surprised if any up-to-date distro didn't include this module by default, or at least in an easily accessible package.

Regardless, you can only write to /usr/src as root, and as you're building a kernel I assume that you do have root priveleges. Either way, it's not necessary to put the kernel source in /usr/src, just customary. You can build straight out of your home directory if you'd like.

Simple answer to a stupid question... thank you. I really have got alot to learn. I'm using Ubuntu by the way. Does that include agpgart?

Ferg
May 6, 2007

Lipstick Apathy

Stevor posted:

Simple answer to a stupid question... thank you. I really have got alot to learn. I'm using Ubuntu by the way. Does that include agpgart?

It should. Just do a
code:
modprobe agpgart
as root. Though what I would suggest is you add the correct driver you're looking for your your Xorg.conf, then reboot. That should load up agpgart automatically if it isn't already (type lsmod and see if it's listed there).

Vivian Darkbloom
Jul 14, 2004


Twiggy794 posted:

It should. Just do a
code:
modprobe agpgart
as root. Though what I would suggest is you add the correct driver you're looking for your your Xorg.conf, then reboot. That should load up agpgart automatically if it isn't already (type lsmod and see if it's listed there).

Incidentally, it's included with Ubuntu's kernel, like most other widely-used modules.

Ferg
May 6, 2007

Lipstick Apathy

Twinxor posted:

Incidentally, it's included with Ubuntu's kernel, like most other widely-used modules.

Aye, and given Ubuntu's hardware detection I'd be surprised if it wasn't loaded already. Can't hurt to try manually though.

Leathal
Oct 29, 2004

wanna be like gucci?
lil buddy eat your vegetables

Bonch posted:

Not really the answer you're looking for, but qBittorrent is pretty good.

Any one know of any application that will enable window snapping? I know Beryl will do it, but sadly I'm a dual monitor ATI user and Beryl won't run with my monitors at their native resolution. Any others?

I actually tried qBittorrent before I moved back to uTorrent. For some reason it never seeds, which is obviously a dealbreaker for me. It seeds while I'm downloading, but once I hit 100% it never starts again. uTorrent worked as expected.

I'm going to try kTorrent on the new WoW patch, but I'd really like to get my uTorrent back. :(

mo-
Apr 21, 2007

by Fistgrrl

Zakalwe posted:

In ubuntu choose WPA and use PEAP IIRC in network manager. For other systems edit wpa_supplicant.conf. Plenty of examples. Supply ESSID user and pass and


wpa_supplicant -Dwext -ieth1 -c /etc/wpa/wpa_suplliant.conf where eth1 is wireless card.

Im using WPA and not getting a connection just this in my logs:

May 23 09:45:41 localhost kernel: ADDRCONF(NETDEV_UP): eth1: link is not ready
May 23 09:45:41 localhost kernel: bcm43xx: set security called, .level = 0, .enabled = 0, .encrypt = 0

Alfajor
Jun 10, 2005

The delicious snack cake.
I'm trying to figure out some C code (basically a if (chmod (file,mode)) ). What is the return type of chmod, and more importantly, what's what? 1 true? or 0 is true?

Alfajor fucked around with this message at 18:40 on May 23, 2007

JoeNotCharles
Mar 3, 2005

Yet beyond each tree there are only more trees.

Alfajor posted:

I'm trying to figure out some C code (basically a if (chmod (file,mode)) ). What is the return type of chmod, and more importantly, what's what? 1 true? or 0 is true?

For most Unix system functions, 0 or higher means success and -1 means failure. It puts the precise error code in the "errno" variable.

For chmod, it's always either 0 or -1, but some others have meaningful return values (like getpid(), where the return value is the pid or -1 on failure.)

You can find the answers to questions like this by typing "man 2 chmod" (if you just type "man chmod" it gives you the first one it finds, which happens to by the shell command. The C system function calls are in section 2, so "man 2".) If you don't have the manpages installed on your system, google for "man chmod" will find online copies.

KaeseEs
Feb 23, 2007

by Fragmaster

Alfajor posted:

I'm trying to figure out some C code (basically a if (chmod (file,mode)) ). What is the return type of chmod, and more importantly, what's what? 1 true? or 0 is true?

The manual is your friend here. Sections 2 and 3 cover system calls and standard library functions, respectively. Thus:

man 2 chmod posted:

CHMOD(2) Linux Programmer’s Manual CHMOD(2)

NAME
chmod, fchmod - change permissions of a file

SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>

int chmod(const char *path, mode_t mode);
int fchmod(int fildes, mode_t mode);

...

RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is
set appropriately.

...

KaeseEs
Feb 23, 2007

by Fragmaster

JoeNotCharles posted:

If you don't have the manpages installed on your system, google for "man chmod" will find online copies.

This is true. Another trick is to note that the user command chmod is found in section 1, and thus referred to within documentation as chmod(1), whereas the function is a system call and in section 2 and thus referred to as chmod(2). So, when you go off and google, you can get more useful results by googling chmod(2) or whatever. Any functions you'd be looking up will be in section 2 or 3, which makes it relatively easy to avoid ambiguous cases (such as printf(1) vs printf(3) &c.) . And, as noted before, when using man, you specify the section before the command.

derdewey
Dec 3, 2004
I've been running ubuntu for 2 years now and I'd like to know why it always feels faster when I go back to windows. Minimizing, unminimizing, moving windows, switching tabs in firefox, all 'feels' better in windows. It always feels like there's some kind of lag.

Is this because of X? The nvidia binary drivers? Gnome?

My computer parts:
AMD Athlon64, S939 3200+
Fast (ricer) overpriced memory, 1 gig
MSI k8n Neo2 platinum mobo (neforce3, I think)
nVidia 6600GT AGP, 128mb

I love linux, I'm attached to my terminal, gnu utilities, and all the great tools built in to gnome, but I really like the responsiveness of windows. Any tips?

Ferg
May 6, 2007

Lipstick Apathy

derdewey posted:

I've been running ubuntu for 2 years now and I'd like to know why it always feels faster when I go back to windows. Minimizing, unminimizing, moving windows, switching tabs in firefox, all 'feels' better in windows. It always feels like there's some kind of lag.

Is this because of X? The nvidia binary drivers? Gnome?

My computer parts:
AMD Athlon64, S939 3200+
Fast (ricer) overpriced memory, 1 gig
MSI k8n Neo2 platinum mobo (neforce3, I think)
nVidia 6600GT AGP, 128mb

I love linux, I'm attached to my terminal, gnu utilities, and all the great tools built in to gnome, but I really like the responsiveness of windows. Any tips?

You're not alone here, I've always felt the same way. I guess it's the consistency of Ubuntu (Linux) being slightly lagged as compared to Windows getting laggier over time that makes it easier to keep running. If you were using something like Slackware or Gentoo where you had more control over your libraries I'd say maybe you have something you could improve on, but in my experience, you're stuck in the same spot I am.

derdewey
Dec 3, 2004
I don't like that answer :argh:

I am very happy with ubuntu on the terminal side of things, the scriptability, ease of use with remote servers, and default toolset are far beyond what I could imagine on windows. But still, it'd be nice to have a responsive gnome desktop.

AIGLX does make things faster (must faster, even) but I don't like the way it changes the windowing behavior. I've tried just turning off all the effects but it's still flakey (title bar acting screwey when maximized, etc).

Ferg
May 6, 2007

Lipstick Apathy

derdewey posted:

I don't like that answer :argh:

I am very happy with ubuntu on the terminal side of things, the scriptability, ease of use with remote servers, and default toolset are far beyond what I could imagine on windows. But still, it'd be nice to have a responsive gnome desktop.

AIGLX does make things faster (must faster, even) but I don't like the way it changes the windowing behavior. I've tried just turning off all the effects but it's still flakey (title bar acting screwey when maximized, etc).

Yeah I don't like my answer much either ;)

One thing you could try is rolling your own kernel. Customize it a bit, and see if you can configure it to be a bit more snappy. I used to do this regularly, but I found it just gets tedious. A good friend of mine is a total kernel guru, I'll try and get a hold of him today after work and see if he has any tips on making the desktop feel more "snappy."

Zakalwe
May 12, 2002

Wanted For:
  • Terrorism
  • Kidnapping
  • Poor Taste
  • Unlawful Carnal Gopher Knowledge

mo- posted:

Im using WPA and not getting a connection just this in my logs:

May 23 09:45:41 localhost kernel: ADDRCONF(NETDEV_UP): eth1: link is not ready
May 23 09:45:41 localhost kernel: bcm43xx: set security called, .level = 0, .enabled = 0, .encrypt = 0

try ifconfig eth1 up first.

derdewey
Dec 3, 2004

Twiggy794 posted:

A good friend of mine is a total kernel guru, I'll try and get a hold of him today after work and see if he has any tips on making the desktop feel more "snappy."

The idea of rolling my own kernel does seem interesting. And from what I understand, Ubuntu doesn't hack the kernel to get things like the boot-status screen working, which makes it easy to put in your own kernel without losing some 'schnazzy' features.

Adbot
ADBOT LOVES YOU

meatpath
Feb 13, 2003

This may be a stupid question, but would it be possible to install XP inside of Ubuntu via VMWare with a restore disk (that has XP on it), and not a plain XP disk?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply