LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-09-2013, 07:10 PM   #1
CamTheSaxMan
Member
 
Registered: Nov 2013
Distribution: Linux Mint 13 Cinnamon Edition 64-bit, Windows 7 Home Premium SP1 64-bit, Arch Linux 32-bit
Posts: 161

Rep: Reputation: 9
Odd issue with creating a soft link


I'm trying to make a program startup when I log in. The program is a shell script called "wicd-gtk" located in the /usr/bin directory, so I tried making a soft link to it in the /home/<user>/.config/autostart directory. However, I get a link to the /usr/bin directory instead.

So I ran this command:
Code:
ln -s /usr/bin/wicd-gtk /home/cameron/.config/autostart/wicd-gtk
I looked in the autostart directory and there was a symbolic link called wicd-gtk that links to the /usr/bin directory. I wanted it to link to /usr/bin/wicd-gtk, but it refused and linked it to /usr/bin instead.
However, if I specify a different name for the link by doing this:
Code:
ln -s /usr/bin/wicd-gtk /home/cameron/.config/autostart/donkeypoo
it works, and there is a link named donkeypoo in the autostart directory that points to /usr/bin/wicd-gtk . Of course, I can rename it from donkeypoo to wicd-gtk, but why do I have to go through all of this? Why doesn't it work when the names are the same?

EDIT: Oh, and by the way, the script refuses to start automatically. Why doesn't it start if it's in the autostart directory?

Last edited by CamTheSaxMan; 12-09-2013 at 07:13 PM.
 
Old 12-09-2013, 07:23 PM   #2
Spect73
Member
 
Registered: Aug 2013
Distribution: Slackware 14.1
Posts: 128

Rep: Reputation: Disabled
I don't have that file, but I do have a file /usr/bin/weather that it a shell script. I can use it and get the proper results, i.e. I get the link under /home/mhobgood/.config/autostart/weather pointing back to /usr/bin/weather.

I will do some more checking and see if I can come up with anything. Not being real knowledgeable about links I'll have to do some reading. This gives me a perfect excuse to do so.

FWIW I'm running Slackware 14.1
 
Old 12-09-2013, 07:31 PM   #3
CamTheSaxMan
Member
 
Registered: Nov 2013
Distribution: Linux Mint 13 Cinnamon Edition 64-bit, Windows 7 Home Premium SP1 64-bit, Arch Linux 32-bit
Posts: 161

Original Poster
Rep: Reputation: 9
Hmmm... odd. I just rebooted and it worked (meaning I could create the link). I literally copied and pasted the command into the terminal. Must have been some weird fluke.
But the script is still not autostarting. BTW, I'm using Debian "Wheezy" with the Enlightenment E16 window manager.

Last edited by CamTheSaxMan; 12-09-2013 at 07:36 PM.
 
Old 12-10-2013, 12:00 AM   #4
Spect73
Member
 
Registered: Aug 2013
Distribution: Slackware 14.1
Posts: 128

Rep: Reputation: Disabled
Glad you got the link part to work. Nothing I read gave me a clue. All attempts to recreate the problem failed. I either got the link correctly, or I got an error when trying to create it.

As to why the script won't start, the only items I can think of are that it's not executeable or that it is actually being ran and you aren't seeing the display you expect to see.
 
Old 12-10-2013, 08:38 AM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,957

Rep: Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267
If the link name (last argument) exists and is a directory or a symlink to a directory, then your new link will be created in that directory and there would be no EEXIST error. You can also run into that problem if you are trying to use the "-f" option to replace an existing symlink. You would have to include the "-n" (--no-dereference) option to avoid following the existing symlink to a directory and placing your new symlink within that directory.
 
  


Reply

Tags
autostart, link, symbolic


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Difference Between Soft Link & Hard Link rajaniyer123 Solaris / OpenSolaris 16 09-30-2012 04:42 AM
creating symbolic link issue? prasad_nyros Linux - Newbie 1 05-08-2011 07:50 AM
Any command not working on rhel3 after creating soft link of libc.so.6 singh_chitranjan Linux - Server 1 10-29-2010 01:07 AM
create soft link and hard link in RHEL5 ramadas88 Linux - Server 6 09-15-2010 05:32 AM
hard link and soft link varunrapelly Linux - Newbie 9 10-02-2008 08:05 AM


All times are GMT -5. The time now is 06:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration