You are not logged in.

#1 2009-07-12 02:16:46

luskjh
Member
Registered: 2009-03-24
Posts: 19

[SOLVED] Opening Shell and runnning command(s)

Hi,

I have just discovered the wonderful program xbindkeys, and am thus setting all my keybindings.  I ran into a problem when I came to adding the music keybinding [EDIT].  I don't use a gui, just command line mplayer, so this is a bit problematic, as I want to be able to launch a shell and then run a command inside that shell (in this case cd /home/jhl/music/mplaylist && mplayer *).  So when I try :

konsole -e cd /home/jhl/music/myplaylist && mplayer *

It does not do what I expected sad.  I've looked around here and on google for an answer, but have yet to find one. 

All help is greatly appreciated smile.

-Josh

Last edited by luskjh (2009-07-12 17:00:12)


Calm down, it is only ones and zeroes.
       -flyingfsck ( on /. )

Offline

#2 2009-07-12 02:22:21

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: [SOLVED] Opening Shell and runnning command(s)

the quickest thing to do would be to put the bultiple commands in a script and execute that.

Dusty

Offline

#3 2009-07-12 02:32:28

droog
Member
Registered: 2004-11-18
Posts: 877

Re: [SOLVED] Opening Shell and runnning command(s)

[edit]wrong line of thought i guess.

still try the -playlist switch for mplayer if it is a playlist you are opening.

Last edited by droog (2009-07-12 03:04:55)

Offline

#4 2009-07-12 02:46:55

crouse
Arch Linux f@h Team Member
From: Iowa - USA
Registered: 2006-08-19
Posts: 907
Website

Re: [SOLVED] Opening Shell and runnning command(s)

Try

konsole -e sh -c "cd /home/jhl/music/myplaylist && mplayer *"

Offline

#5 2009-07-12 08:59:40

majiq
Member
Registered: 2009-03-06
Posts: 259

Re: [SOLVED] Opening Shell and runnning command(s)

If none of that works, see if KDE has an auto-/launcher type thing which has the option of "run in terminal". If it does you can either create a launcher and keybind to that, or scour through the KDE tree for how it goes about doing it. :-)

Offline

#6 2009-07-12 16:59:52

luskjh
Member
Registered: 2009-03-24
Posts: 19

Re: [SOLVED] Opening Shell and runnning command(s)

Crouse's method worked (thanks crouse smile )

And the [EDIT] was because I repeated 'adding the music keybindings' twice, and didn't catch it when reviewing the thread, opps roll .

Thanks for all the help smile.

-Josh


Calm down, it is only ones and zeroes.
       -flyingfsck ( on /. )

Offline

Board footer

Powered by FluxBB