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
GringoGrande
Jul 27, 2001
Nah...
When I'm chatting with gaim and use an emoticon, they never show up for my friends. Any suggestions on what might be wrong, or is it just that gaim can't handle the SA emoticon pack properly?

Adbot
ADBOT LOVES YOU

GringoGrande
Jul 27, 2001
Nah...
I'm running Ubuntu 6.10 and I got two soundcards. One is connected to a set of speakers and one is connected to a pair of headphones. I like the setup and things were good. Then all of a sudden the hw assignments for the cards seems to have gotten swapped and everything went weird for a while and I had to change some config files around to accomodate the situation. Fast forward a few weeks and everything has swapped back and forth, every now and then, for like the third time, and I'm beginning to get fed up.

How do I go about changing the hw assignments and make them stick? I've tried using alsactl to restore an edited /etc/asound.names but that doesn't seem to do anything.

Edit: I guess another alternative would be to split up my SB! Live into two virtual cards, although all attempts at configuring my .asoundrc have been for naught. Can't seem to wrap my head around how alsa works.

GringoGrande fucked around with this message at 13:26 on Apr 17, 2007

GringoGrande
Jul 27, 2001
Nah...

minute posted:

Awesome, thanks.

A couple more quick questions. Right now, I have WinXP installed on partition, Xubuntu on a partition and a shared FAT32 partition. I have all my music on the FAT partition. I tried adding a symbolic link to my music folder in /var/lib/mpd/music. It seems to work, I can cd into it, etc. But when I try to run sudo mpd --create-db, it won't add anything to the database. I think it has something to do with the permissions. Right now, the permissions for that partition are: drwxrwx---. I tried doing sudo chmod a+rwx, and that didn't do anything. I tried actually changing into the superuser and running chmod and still didn't do anything. Also, all the files in that partition are listed in green in terminal. I have an external harddisk also formatted as FAT32 which seems to work fine. The permissions for that are: drwxr-xr-x. I can add a symbolic link to my music directory on there and mpd adds it to the database with no problem.
I ran into this problem aswell, mpd:audio has to be the owner of the symlink (assuming you are using the default configuration).
If it looks something like this, mpd won't access the music symlink.
code:
scj@ghidora:~%> ls -l /var/lib/mpd
total 1608
lrwxrwxrwx 1 scj scj        17 2007-04-21 00:55 music -> /media/sdb1/Music
drwxr-xr-x 2 mpd audio    4096 2007-04-06 20:40 playlists
-rw-r--r-- 1 mpd audio     350 2007-04-23 23:23 state
-rw-r--r-- 1 mpd audio 1632511 2007-04-23 00:21 tag_cache
You can fix it with
code:
sudo chown -h mpd:audio /var/lib/mpd/music
Note the -h switch which de-references the symlink, otherwise you'd be changing the ownership of the folder the symlink is pointing to, not the symlink itself.

GringoGrande fucked around with this message at 07:29 on Apr 24, 2007

GringoGrande
Jul 27, 2001
Nah...
I was toying around with bluetooth today, and I got my Sony Ericsson phone to act as a input device. Now I'm curious if there are any linux equivalent to Apples Front Row?

Edit: what the hell is up with mythtv? It's slow as molasses and keeps crashing my computer? :saddowns:
Edit 2: what the hell is up with My Media System? Hard coded font sizes? I'll have to sit right infront of the monitor to be able to read it on my Dell 2005FPW :saddowns:

GringoGrande fucked around with this message at 08:26 on Apr 26, 2007

GringoGrande
Jul 27, 2001
Nah...

indigoe posted:

automatically mirror files to another server via FTP as they change.
You could check out inotify-tools, which should be able to take care of that. (If your kernel is >=2.6.13)

GringoGrande
Jul 27, 2001
Nah...
I'm having some trouble getting joy2key to work properly.

Using the following rc-file
code:
START test
-X
-buttons a A b B
and sending the key events to a gedit window will not produce any lowercase letters at all. Testing them in xev shows that the 'a' and 'A' have the same keycode. What am I doing wrong? I'm using Ubuntu 7.04 and joy2key 1.6.1

GringoGrande
Jul 27, 2001
Nah...
I'm running rtorrent and dtach on a remote computer and I'm trying to figure out a way to create an alias that logs in and brings up the session straight away, instead of logging in and manually bringing it up. Has anyone had any luck with this?

edit: goddamnit. As soon as I posted this, I got it working :( I had overlooked ssh's -t switch.

GringoGrande fucked around with this message at 16:00 on Sep 10, 2007

GringoGrande
Jul 27, 2001
Nah...

cheesypeanut posted:

Would you care to share the solution? I've had an alias set up for a while however when I log back in all of rtorrent's keybindings are messed up. Have you experienced this?
This is the alias that gets the job done:
code:
alias remotetorrent='ssh -t $remote_box "dtach -A /home/$USER/.dtach/rtorrent rtorrent -e \$"'
ssh's -t switch forces a pseudo-tty which is handy for ncurses programs.
With dtach's -A switch, it will try connecting to the socket and create it if it doesn't exist. The -e switch is just the key to detach from the socket.

The only weird thing I have noticed is that the arrow keys are all screwed up for navigation, they are adjusting the throttles instead. You can still navigate with ^P (up), ^N (down), ^B (back/left) and ^F (forward/right). A bit awkward at first, but it's not that big of a deal once you get used to it.

GringoGrande
Jul 27, 2001
Nah...

Obsolete posted:

I have a quick grep question.
grep probably isn't what you are looking for, you should try sed instead.
code:
sed -r -e 's/0*([0-9])-0*([0-9])/\1\.\2/' <file>

GringoGrande fucked around with this message at 18:53 on Sep 20, 2007

GringoGrande
Jul 27, 2001
Nah...

teapot posted:

code:
sed -e 's/^.* language: //' -e 's/^.*: //' -e 's/\. *$//'
Or he could use gawk:
code:
gawk -F'[ \.]' '{print $(NF-1)}'

GringoGrande
Jul 27, 2001
Nah...

Magicmat posted:

Quick question: Is there an easy way to send an AOL IM from a script? I'm looking for something like "echo 'Hewo new yorku!' | sendim -u username -p password -d 1337Hiro". The closest I've found is a bare-bones stateful script, which requires me to log in, send the IM and then log out (though, come to think of it, I don't know if it even provides a log out command.)
You should be able to do that with pidgin via it's dbus interface. It's kind of under documented, but it shouldn't be that hard to write up something in python or a shell script using purple-send.

edit: purple-remote seems to be what you are looking for.

code:
#!/bin/bash
#send-im <name> <message>
purple-send 'icq:goim?screenname=$1&message=$2

GringoGrande fucked around with this message at 03:43 on Sep 27, 2007

GringoGrande
Jul 27, 2001
Nah...

Grigori Rasputin posted:

I'm sure this has been addressed in the thread somewhere, but does anyone know how to get all the mouse buttons working for my logitech MX518 mouse? Bonus question: so that backspace navigates back for firefox? tHanks!

edit: ubuntu
I'm using a MX518. Here is the relevant snippet from my /etc/X11/xorg.conf
code:
Section "InputDevice"
    Identifier     "Configured Mouse"
    Driver         "mouse"
    Option         "CorePointer"
    Option         "Device" "/dev/input/mice"
    Option         "ZAxisMapping" "4 5"
    Option         "Buttons" "10"
EndSection
Now all the buttons are working, although they do not work as they are supposed to and need to be remapped. This can be achieved by adding the following line to your .Xmodmap
code:
pointer = 1 2 3 4 5 8 9 6 7 10 11 12 13 14

GringoGrande
Jul 27, 2001
Nah...
I have this old laptop that I'm trying to coax into doing some tv-out for me. After some research it seems like the gfx card (ATI Radeon Mobility M6 LY) is <9500 and therefor not supported by fglrx, so I'm forced to use the open source drivers. Problem is that I can't seem to get PAL to work. NTSC works but it's only B/W. Am I poo poo out of luck or does anyone know of some patch I could use?
Using Arch, Xorg 1.4.9.90, xf86-video-ati 6.7.197.

GringoGrande
Jul 27, 2001
Nah...

nbv4 posted:

I have a question regarding urxvt. First off, how do I change the hue to each of the colors the program uses? I use a black background, so the default shade of blue, red, green, etc. do not look right. Here is a screenshot to illustrate:

http://xs.to/xs.php?h=xs227&d=08214&f=screenshot-sh686.png

In gnome-terminal, it was easy to do this, all you had to do was click on the color palette in the prefrences manu, and edit away.


Also, for some reason, irssi tab completion doesn't work in urxvt. I'll type the first letter of a username, press tab, and nothing happens. How do I fix this?
You have to add some stuff to ~/.Xdefaults. This is the colors I am using, that I got from the gentoo wiki and are described as 'gentler':
code:
Rxvt*background:  #000000
Rxvt*foreground:  #7f7f7f
Rxvt*color0:      #000000
Rxvt*color1:      #9e1828
Rxvt*color2:      #aece92
Rxvt*color3:      #968a38
Rxvt*color4:      #414171
Rxvt*color5:      #963c59
Rxvt*color6:      #418179
Rxvt*color7:      #bebebe
Rxvt*color8:      #666666
Rxvt*color9:      #cf6171
Rxvt*color10:     #c5f779
Rxvt*color11:     #fff796
Rxvt*color12:     #4186be
Rxvt*color13:     #cf9ebe
Rxvt*color14:     #71bebe
Rxvt*color15:     #ffffff
After that, run 'xrdb -load ~/.Xdefaults' to enable the changes to take effect next time you start urxvt.

GringoGrande
Jul 27, 2001
Nah...
Is it possible to "intercept" file access in linux? Most programs usually dumps the config files in $HOME and to avoid having to recompile every program to put it somewhere else, would it be possible to write a daemon that automatically maps access of the file $HOME/.foo to $HOME/.config/.foo? I was casually looking into inotify, but I don't know enough about kernel hacking to know if that is up the wrong tree, since it might not be fast enough.

GringoGrande
Jul 27, 2001
Nah...

Peanutmonger posted:

What about the easiest way, symlinking ~/.original to ~/.config/.original? Those other options seem likely to break other things...

edit: However, I guess that still leaves a file in your home directory. But that's what hidden files are for, anyway.
That pretty much misses the point entirely.

But thanks, JoeNotCharles, your answer lead me to searching around that someone has already done it the LD_PRELOAD route and it's called libetc.

GringoGrande
Jul 27, 2001
Nah...

Heran Bago posted:

What I really need to get used to is the directory structure. It's a mystery to me if I should look for program data in usr, bin, sys, etc. They all sound so good.


If you are on a debian based distro, to see what files a package contains, you can always use 'dpkg -L <package>' which gives the full path of all the files installed. This is handy in alot of ways, especially in the beginning when you are unsure of the directory structure and what is supposed to be where.

For instance, you just installed a new package and you want to know what executable files it contained, you could do 'dpkg -L <package> | grep /usr/bin'

GringoGrande
Jul 27, 2001
Nah...

Twlight posted:

This is a question i've had mulling over my head for some time and wanted to know what everyone else thought:

I would like to start keeping track of where/what/how our server config files are managed. I was looking into subversion, and was liking what I was seeing. However are there any things that I should know before using subversion for configuration file control, instead of it's "normal" use as for developing applications?

There are newer and better SCM's than subversion. Here's a blog entry on how to use git and a apt hook to keep track of /etc.

GringoGrande
Jul 27, 2001
Nah...

chryst posted:

Hey, can someone help me with some text manipulation?

I've got a documentum script that is supposed to add users to a group. The problem is that the username is formatted incorrectly.

The file is a series of blocks like this:

retrieve,c,dm_group where group_name='group'
append,c,l,users_names
Doe, John
append,c,l,users_names
Smith, Todd
save,c,l


I need to change "Doe, John" to "John.Doe" and "Smith, Todd" to "Todd.Smith".

Something like this should work:
code:
sed -re 's|^(\w+), (\w+)$|\2.\1|' $filename > newfile
e: less backspaces
e2: by backspaces, I mean backslashes.

GringoGrande fucked around with this message at 16:50 on Oct 7, 2008

GringoGrande
Jul 27, 2001
Nah...

Gumball Dad posted:

Is the only way to solve dependencies without YUM to just manually resolve each one be installing each individual rpm? I'm setting up this box, but I'm not allowed to use YUM as part of the "learning experience". Every RPM I try to install has at least 2 dependencies and all those dependencies have dependencies.
Yes. Congratulations, you've learned why linux isn't really worth the effort unless you have a good package manager.

GringoGrande
Jul 27, 2001
Nah...

Pavol Paska posted:

I assume they broke stuff less often than Gentoo?
I've been using Arch for a little more than 2 years now and I've never had any real problems with it. Whenever something has stopped working, it's always been a matter of minutes to fix. All in all, it's a pretty great distro, especially if you like tinkering.

GringoGrande
Jul 27, 2001
Nah...
My update went smooth, just needed a few minor edits in xorg.conf.
But to ignore updating xorg, add "IgnorePkg = xorg-server" to /etc/pacman.conf.

GringoGrande
Jul 27, 2001
Nah...

Dobermaniac posted:

Is there a program similar to Juice (in windows) for command line linux? I'm setting up a home server using clarkconnect 4.3 and wanted to be able to download my podcasts automatically using rss, but couldn't find anything that works with just command line.

I'm using castget.

GringoGrande
Jul 27, 2001
Nah...
This page explains where to get and how to add stuff to DOS boot disks in Linux

GringoGrande
Jul 27, 2001
Nah...
Just wanted to suggest that everyone who uses GNU screen should give tmux a try. It is basically a rewrite with some nice features, like vertical split windows.

GringoGrande
Jul 27, 2001
Nah...

nbv4 posted:

come again?

You'd put this in your ~/.ssh/config
code:
Host wf
  User nbv4
  HostName webfactional.com
On the remote machine, make the bash alias into a executable shell script in HOME.
Then you can do:
code:
ssh wf ./what-used-to-be-an-alias
Using ~/.ssh/config for ssh 'bookmarks' is pretty handy, since then you can easily do stuff like
code:
ssh -t wf vim
to run vim on the remote machine (the -t switch is used to force a pseudo-tty which is needed for screen based CLI tools)

GringoGrande
Jul 27, 2001
Nah...
You don't actually need sed, bash's string substitution works well enough.
code:
for file in *; do mv "$file" "${file// /.}; done"

GringoGrande
Jul 27, 2001
Nah...

Heavy Weapons Guy posted:

And now, for a question of my own: I've been using Uzbl off-and-on (neat little browser) and any time I try to view a gif I can only view the first frame properly, while either all the other frames are a garbled mess or the image doesn't animate at all. Would anyone happen to know what's up with that? Is it a webkit thing, or an Uzbl thing...?

It's faily easy to tell if it's webkit or uzbl: try another webkit browser (like midori or arora) and see if you get the same glitches.

GringoGrande
Jul 27, 2001
Nah...

Ziir posted:

I've tried scp user@ip.address:/home/user/test/* C:\Users\User\Desktop, but it gives me some kind of error about not being able to find the C:\ directory or something.
Try
code:
scp -r user@ip.address:/home/user/test C:\Users\User\Desktop
Or you could use FileZilla or WinSCP

GringoGrande
Jul 27, 2001
Nah...

Weatherman posted:

Is anyone using or aware of some software package that I can use on my server as an alternative to RapidShare and the like?
I haven't tried it, but maybe quickserve might work?

GringoGrande
Jul 27, 2001
Nah...

inignot posted:


sed s/(BDR||DR||DROTH)/./ scrape.txt>scrape-parsed.txt

This may or may not be what you are trying to achieve:
code:
sed -E 's/(BDR|DR|DROTH)/\./g' scrape.txt > parsed.txt
Some examples on what the input and output will look like is helpful.

GringoGrande
Jul 27, 2001
Nah...
Second attempt:
code:
$> cat cisco
cisco#show ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State  Nbrs
Se6/0        1     0               1.1.1.1/30           100   P2P   1/1
Gi0/2        1     0               2.2.2.2/30           20    BDR   1/1
Lo31753      1     0               3.3.3.3/32           1     LOOP  0/0
Lo31753      1     0               3.3.3.3/32           1     DROTH 0/0
Lo31753      1     0               3.3.3.3/32           1     DR    0/0
cisco#

$> cat cisco | sed -e '1,2d' -e '$d' | sed 's/\(BDR\|DR\|DROTH\)\s\+/-     /'
Se6/0        1     0               1.1.1.1/30           100   P2P   1/1
Gi0/2        1     0               2.2.2.2/30           20    -     1/1
Lo31753      1     0               3.3.3.3/32           1     LOOP  0/0
Lo31753      1     0               3.3.3.3/32           1     -     0/0
Lo31753      1     0               3.3.3.3/32           1     -     0/0

GringoGrande
Jul 27, 2001
Nah...
Any time spent using any editor other than vim is a colossal waste of time. If you are inclined to use emacs, you are better off using vim at a weird angle, that way you get the RSI and a usable editor.

Adbot
ADBOT LOVES YOU

GringoGrande
Jul 27, 2001
Nah...

ToxicFrog posted:

I hear that a lot, but I never hear why. What makes it so much better than every editor out there? What does it have that they don't? Granted I haven't used it a great deal, but from my limited use the answer appears to be "nothing apart from a really annoying interface".

What am I missing?
The more time you spend with the interface, the better it gets. You pick up tips and tricks on how to do stuff quickly and efficiently, and after a while you're editing your files with muscle memory alone. That is why time spent using other editors is a waste of time.

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