This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to change the config file through terminal

Tags: None
(comma "," separated)
werdho2
Registered Member
Posts
5
Karma
0
So I run ktorrent on a server that I only connect to through ssh or the web client. And my problem is that I have different download folders depending on what I am downloading, I have a different folder for music, movies, tv etc. And through the web interface I cannot change the download folder through the settings. So I made a bunch of copies of my config file found in ~/.kde/share/config/ktorrentrc and changed the line
saveDir=file:///seedbox/blah
the place where I wanted it to download to. And I now have a config file for each thing I need. But I can't figure out how to use the -config<filepath> command. I wrote a script that should work if the command would run properly
echo 'What tracker will you be using today'
read tracker
echo 'Is the torrent freeleach'
read freeleach
if [ $freeleach = 'yes' ]
then ktorrent -config<~/.kde/share/config/KtorrentConfigFiles/$trackerFreeleach
fi
if [ $freeleach = 'no' ]
then ktorrent -config<~/.kde/share/config/KtorrentConfigFiles/$tracker
fi

So does anyone know how I can fix it so that itll work?
George
Moderator
Posts
5421
Karma
1
Why are you redirecting the files to the standard input of ktorrent ?
werdho2
Registered Member
Posts
5
Karma
0
What do you mean redirecting the files. All I want to do is to be able to change the download location from a remote computer. I thought that the only was to do that was to change the config file. If there was a another way of doing this I'd love to find out about it.
werdho2
Registered Member
Posts
5
Karma
0
Does anyone know where i can find out all of the command line commands for ktorrent? Maybe after reading those I could figure out how to change the config file.
George
Moderator
Posts
5421
Karma
1
werdho2 wrote:What do you mean redirecting the files. All I want to do is to be able to change the download location from a remote computer. I thought that the only was to do that was to change the config file. If there was a another way of doing this I'd love to find out about it.


ktorrent -config<~/.kde/share/config/KtorrentConfigFiles/$tracker

If you do command < file in bash you are redirecting the content of file to the standard input of command.

What you need to do is this: ktorrent --config ~/.kde/share/config/KtorrentConfigFiles/$tracker
George
Moderator
Posts
5421
Karma
1
werdho2 wrote:Does anyone know where i can find out all of the command line commands for ktorrent? Maybe after reading those I could figure out how to change the config file.


ktorrent --help-all
werdho2
Registered Member
Posts
5
Karma
0
So would i be able to use that command for an already running session of Ktorrent? Because I tried just editing the ktorrentrc file but it didnt change where a file is downloaded to. I think that I need to change the ktorrentrc file and then somehow restart ktorrent but I cant figure out how to do that. Would it be a service command or an init.d?
George
Moderator
Posts
5421
Karma
1
werdho2 wrote:So would i be able to use that command for an already running session of Ktorrent? Because I tried just editing the ktorrentrc file but it didnt change where a file is downloaded to. I think that I need to change the ktorrentrc file and then somehow restart ktorrent but I cant figure out how to do that. Would it be a service command or an init.d?


The config option only works if a new instance of ktorrent is started.

You can shutdown ktorrent with:

killall ktorrent


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]