Bash aliases won't autostart?
I know, I know, this is my about hundreth post about Konquaror autostart, but I just don't get it :( I have a working bash alias, the alias is named "liput". The .bashrc file reads like this:
alias liput="python rm.py -c 1 4" How should I define the command in the Konqueror autostart to get the alias to start when kde starts? I have tried everything, and nothing actually works. But like a miracle, when manually using from terminal, the alias works like a charm. Any clues? I promise this was my last post concerning tha Autostart "feature"! -Olli |
Code:
alias liput='python rm.py -c 1 4' |
i don't know much about alias or bashrc, but have you tried just creating a symlink to the executable that you want to autostart, in the autostart directory? you can do it 2 ways...........
GUI method........ open Konqueror in normal (not root) file manager mode. navigate to the /.kde/autostart directory. on the top tool bar, click edit->create new->file->link to application. under "general" give it a name of your choice, under "application" name it the same, then in the "command" box, browse to the executable, put any special switches you might want to use, click "ok" when done. terminal method.......... open a terminal, as normal user cd to /.kde/autostart. then type the following.......... ln -s /path/to/executable (hit enter) where /path/to/executable is the path to the executable you want to run. you can also add any switches you want to use in the path. otis EDIT: oops............ i see 320mb has a suggestion too. as i said i'm not real familiar with aliases or bashrc, so try his suggestion first, as that might be a better way. |
The alias works fine from terminal, but I cannot get it to work as an "link to application" in .kde/Autostart/ -directory. So it can't be the quotes, I think. I just need to know how the simple liput -command should be entered to the "command" -field in the "link to application" properties window.
-Olli |
i had to make a bash script for setiathome, maybe you need to do something similar. I put my alias after the call to /etc/bashrc for some reason the etc/bashrc would overwrite my alias. as to your shell script you can make
#!/bin/bash python rm.py -c 1 4 & then make a desktop icon link to application, then do mv /home/[username]/Desktop/[application link name] /home/[username]/.kde/Autostart and it should work for you. I know it's a bit of a hack, but it should work, if you want the program to autostart for you. Btw, i use this method to make my background picture have rxvt running transparently over it. |
Thanks for your input people :) However, it just don't work... I didi both te ways you suggested and it basically gives me this error "exec failed: not a directory" I created this shell-script:
#!/bin/bash/ python rm.py -c 1 4 & saved it as rm.sh and created a link to it. The name of the link was rm and the application field was also named a rm. It won't work by clicking or at kde startup, though it's in the .kde/Autostart -directory. I can't understand, what can be wrong. This seems to unnecessary, because the actual problem should be like making a cup of coffee. (that can be pretty hard too some times ;) The file rm.sh is in my home directory, so there should be no problems with access priviledges. Bear with me, Olli |
Quote:
otis |
I see the problem, you may not have python in a place in your path, you might have to edit your script thusly:
#!/bin/bash /usr/bin/python /home/[username]/rm.py -c 1 4 & then to make it run in kde, make the icon on your desktop, to create a rm.desktop object to do a mv /home/[username]/Desktop/km.desktop /home/[username]/.kde/Autostart/km.desktop assuming you name your desktop icon rm |
All times are GMT -5. The time now is 12:25 PM. |