LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 08-21-2004, 07:45 AM   #1
Ollir
LQ Newbie
 
Registered: Aug 2004
Posts: 12

Rep: Reputation: 0
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
 
Old 08-21-2004, 09:14 AM   #2
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
Code:
alias liput='python rm.py -c 1 4'
try using single quotes...........like you see above
 
Old 08-21-2004, 09:22 AM   #3
otish1000c
Member
 
Registered: May 2004
Location: Pennsylvania, USA
Distribution: dual boot.... Mandrake 10.0OE/10.xcooker
Posts: 611

Rep: Reputation: 30
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.

Last edited by otish1000c; 08-21-2004 at 09:25 AM.
 
Old 08-21-2004, 09:25 AM   #4
Ollir
LQ Newbie
 
Registered: Aug 2004
Posts: 12

Original Poster
Rep: Reputation: 0
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
 
Old 08-22-2004, 12:45 AM   #5
Ghost_runner
Member
 
Registered: Jun 2004
Location: Kansas City, MO
Distribution: Fedora (LXQT)
Posts: 276

Rep: Reputation: 30
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.
 
Old 08-22-2004, 03:04 AM   #6
Ollir
LQ Newbie
 
Registered: Aug 2004
Posts: 12

Original Poster
Rep: Reputation: 0
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
 
Old 08-22-2004, 08:09 AM   #7
otish1000c
Member
 
Registered: May 2004
Location: Pennsylvania, USA
Distribution: dual boot.... Mandrake 10.0OE/10.xcooker
Posts: 611

Rep: Reputation: 30
Quote:
The file rm.sh is in my home directory, so there should be no problems with access priviledges.
just because something is in /home, doesn't neccessarily mean that it has user priveledges. if it was created as root, it could/would have root permissions. i'd check that, just to be sure. right click the file, check the permissions tab, change if neccessary.

otis
 
Old 08-22-2004, 02:10 PM   #8
Ghost_runner
Member
 
Registered: Jun 2004
Location: Kansas City, MO
Distribution: Fedora (LXQT)
Posts: 276

Rep: Reputation: 30
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
 
  


Reply



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
How to export stuff and add aliases in bash MalachiX Linux - Newbie 2 03-21-2005 06:33 PM
autostart noobtesting Mandriva 3 07-04-2004 11:45 AM
.kde/Autostart bash scripts "file not found" Nice-n-Slow Linux - Software 1 07-02-2004 05:25 PM
autostart for aliases and kde derfaust Slackware 6 06-06-2004 11:48 PM
Make Screen respect bash aliases VxJasonxV Linux - Software 8 02-05-2004 03:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 07:28 PM.

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