LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 10-07-2012, 11:22 PM   #1
sgmart
LQ Newbie
 
Registered: Jun 2012
Location: Mexico
Distribution: Slackware Linux
Posts: 9

Rep: Reputation: 0
music on console "moc" autostart with fluxbox


Since moc is a music server, and mocp is the client to play music files.

I want to play my music collection with fluxbox window manager, so I've tried add this to ~/.fluxbox/startup file
Code:
#!/bin/sh
...
mocp -S &  # start moc server
mocp -p & # start music player
...
exec fluxbox
but nothing yet!

Anyone know how to perform this task?

Last edited by sgmart; 10-09-2012 at 02:45 PM. Reason: Thanks @Segmentation Fault, I forget p, but not working yet! and & is used in fluxbox startup file
 
Old 10-09-2012, 11:16 AM   #2
segmentation_fault
Member
 
Registered: Sep 2008
Location: Ioannina, Greece
Distribution: Gentoo
Posts: 332

Rep: Reputation: 55
Quote:
moc -S & # start moc server
I think this should be
Code:
mocp -S
without background (&) since -S starts the server and exits. Then
Code:
mocp -p
again without background (&) should start playing. I think just mocp without any arguments brings up the ncurses interface.
 
1 members found this post helpful.
Old 10-09-2012, 04:51 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
...also I had to make sure my playlist was populated or "-p" wouldn't play anything.
 
Old 03-08-2015, 11:47 AM   #4
sgmart
LQ Newbie
 
Registered: Jun 2012
Location: Mexico
Distribution: Slackware Linux
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sgmart View Post
Since moc is a music server, and mocp is the client to play music files.

I want to play my music collection with fluxbox window manager, so I've tried add this to ~/.fluxbox/startup file
Code:
#!/bin/sh

mocp -S &  # start moc server
mocp -p & # start music player

exec fluxbox
but nothing yet!

Anyone know how to perform this task?
[SOLVED]

It was necessary to add some delay before start the server, so I ended with something like:
Code:
#!/bin/sh

sleep 1s
mocp -S &  # start moc server
mocp -p & # start music player

exec fluxbox
 
  


Reply

Tags
console, fluxbox, linux, music, slackware



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux10.10 Where to down load "Demux " plugin for "Amorak" music bluesman1951 Linux - Newbie 10 10-28-2011 01:08 AM
[SOLVED] How do I run "menu" and "logout" from the command line in fluxbox? psionl0 Slackware 19 03-02-2011 12:46 AM
"s" "d" and "f" don't type in console krose Linux - General 11 05-30-2008 11:42 PM
How boot-cd works? Can I run this "autostart" within Linux? kornerr Linux - General 2 05-08-2005 05:34 AM
.kde/Autostart bash scripts "file not found" Nice-n-Slow Linux - Software 1 07-02-2004 05:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 10:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration