Re: vlc broken by redirect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2010-01-13 at 11:56 -0500, Christian Langer wrote:
> 
> 
> 
> ______________________________________________________________________
> Hi, I seem to have lost vlc. It was working ok til I tried the
> following from http://www.tuxfiles.org/linuxhelp/iodirection.html. 
> 
> "Like I told you before, files aren't the only places where you can
> redirect the standard output. You can redirect it to devices, too:
> $ cat sound.wav > /dev/audio
> 
> As you saw, in the above example the cat command concatenates a file
> named sound.wav and the results are sent to a device
> called /dev/audio. What's the fun here, then? /dev/audio is the audio
> device, and when you send there the contents of a sound file, that
> file is played. So if your sound is properly configured, the above
> command plays the file sound.wav!"
> 
> I thought that if I sent a music file to vlc in this way, vlc would
> play it. So I did cat song.mp3 > /usr/bin/vlc. At this point vlc
> stopped working. I looked in /usr/bin and found that vlc had been
> turned into a music file! So I erased it, and removed it via yum.
> Success. Then I reinstalled via yum; success. But the messages now
> are: from terminal:
> 
> [chris@localhost bin]$ vlc
> bash: vlc: command not found
> 
> >From gui: Could not launch 'VLC media player' Failed to execute child
> process "vlc" (No such file or directory).
> 
> Any help? Thanks,
> 
> Chris 

Simple:
/dev/snd/* and /dev/dsp are device nodes - read special "files" that are
used to communicate with the kernel.
However, /usr/bin/vlc is binary.

As such, while cat file.wav > /dev/audio send a wav stream to be played
by a kernel driver, cat file.mp3 > /usr/bin/vlc trashed the vlc binary.

On more thing, in-order to trash the vlc binary you had to run as root.
I'd advise against using the root account to anything besides
administration tasks.

- Gilboa

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe: https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux