Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sym-Link help....

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
linuxgirlie
LXF regular


Joined: Sat Apr 09, 2005 7:34 pm
Posts: 787
Location: Kent...UK

PostPosted: Fri Jul 08, 2005 9:31 am    Post subject: Sym-Link help.... Reply with quote

I am trying to create a sym-link that everyone can use but it won't let me put in a variable, can anyone help me out.

What I am typing is:

ln -s $HOME/network /usr/share/windowsapps/.wine/dosdevices/h:

Everytime I do this it changes $HOME to say /root/

Will I have to look for another way round my problem? Or has someone got anything I can give a go!!

Cheers, Confused Confused
_________________
My knowledge comes with no warranty...........

Server operating system designed for schools:www.linuxschools.com
Back to top
View user's profile Send private message Send e-mail
evilnick
Moderator


Joined: Mon Apr 04, 2005 12:47 pm
Posts: 151
Location: LXF towers

PostPosted: Fri Jul 08, 2005 9:59 am    Post subject: Reply with quote

that's because the shell will evaluate the variables as it finds them, so when you run this as root, that is your home directory.

You can't really have a symlink that is evaluated on demand. However, you could create a symlink individually for each user. Does that help?
Back to top
View user's profile Send private message
linuxgirlie
LXF regular


Joined: Sat Apr 09, 2005 7:34 pm
Posts: 787
Location: Kent...UK

PostPosted: Fri Jul 08, 2005 10:01 am    Post subject: Reply with quote

Hmmm, thats a good idea, I'll just give that a try and answer back....
_________________
My knowledge comes with no warranty...........

Server operating system designed for schools:www.linuxschools.com
Back to top
View user's profile Send private message Send e-mail
linuxgirlie
LXF regular


Joined: Sat Apr 09, 2005 7:34 pm
Posts: 787
Location: Kent...UK

PostPosted: Fri Jul 08, 2005 10:18 am    Post subject: Reply with quote

Well, it works, but for only one person!!

As it won't let the second person write over the top of the one made by the last person.

Is there a way of making a sym-link read-write to all. Because at the moment if one person logs in and creates the link, when the second person logs in they don't get a drive as they can't write over the top of the last sym-link?!?

I'm sure there must be an easier way to all this!!
_________________
My knowledge comes with no warranty...........

Server operating system designed for schools:www.linuxschools.com
Back to top
View user's profile Send private message Send e-mail
Nigel
LXF regular


Joined: Fri Apr 08, 2005 9:03 pm
Posts: 1141
Location: Gloucestershire, UK

PostPosted: Fri Jul 08, 2005 10:34 am    Post subject: Reply with quote

Assuming that the users don't already have a directory called "network" under their home dir, putting the following into the system-wide login script (/etc/profile.local on SuSE, could be different for you) will probably do the trick...

if !(test -e $HOME/network); then
ln -s /usr/share/windowsapps/.wine/dosdevices/h $HOME/network
fi

(I believe that the target comes first in the ln command)
_________________
Hope this helps,

Nigel.


Last edited by Nigel on Fri Jul 08, 2005 10:36 am; edited 1 time in total
Back to top
View user's profile Send private message
linuxgirlie
LXF regular


Joined: Sat Apr 09, 2005 7:34 pm
Posts: 787
Location: Kent...UK

PostPosted: Fri Jul 08, 2005 10:35 am    Post subject: Reply with quote

Thanks, it now works for references purposes I'll put down what I did:

Basically we are designing a fat client. When the student logs on it brings all their work etc down via samba, this makes it easier when intergrating with other windows clients.

Anyhow, because of this when they click logoff it runs a script that shuts down all the samba shares.

So I first wrote a script in autorun that said to make the sym-link in the correct place, then when they logoff they run the second script which at the top says rm -f /usr/share/windowsapps/.wine/dosdevices/h:

and thats it, so when the next person logs in it has no problems.....

Cheer for pointing me in the right direction Nick.
_________________
My knowledge comes with no warranty...........

Server operating system designed for schools:www.linuxschools.com
Back to top
View user's profile Send private message Send e-mail
linuxgirlie
LXF regular


Joined: Sat Apr 09, 2005 7:34 pm
Posts: 787
Location: Kent...UK

PostPosted: Fri Jul 08, 2005 10:36 am    Post subject: Reply with quote

oops, sorry Nigel, must of posted that whilst I was typing, thanks for the help anyway.

Jo
_________________
My knowledge comes with no warranty...........

Server operating system designed for schools:www.linuxschools.com
Back to top
View user's profile Send private message Send e-mail
Nigel
LXF regular


Joined: Fri Apr 08, 2005 9:03 pm
Posts: 1141
Location: Gloucestershire, UK

PostPosted: Fri Jul 08, 2005 10:41 am    Post subject: Reply with quote

Aha - sorry, I thought you were trying to get the network directory in the user's home to point to the (fixed) windows share, not the other way round.
Back to top
View user's profile Send private message
linuxgirlie
LXF regular


Joined: Sat Apr 09, 2005 7:34 pm
Posts: 787
Location: Kent...UK

PostPosted: Fri Jul 08, 2005 10:46 am    Post subject: Reply with quote

Yes, well I have been working on this project and this is the 4th day solid, I have nearly, nearly got it finished!!

Basically its a Fat Linux Client, but the school wants to be able to run certain windows software on it, hence I have been racking my brains about Wine for the last day and a half!
_________________
My knowledge comes with no warranty...........

Server operating system designed for schools:www.linuxschools.com
Back to top
View user's profile Send private message Send e-mail
evilnick
Moderator


Joined: Mon Apr 04, 2005 12:47 pm
Posts: 151
Location: LXF towers

PostPosted: Fri Jul 08, 2005 12:14 pm    Post subject: Reply with quote

cool, glad you got it sorted.
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast