Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
====================================
=== openSUSE Leap
=== VERSION="42.3"
=== Malachite
=== kernel version is 4.13.0-rc4-1.g94b098f-default
=== Dell OptiPlex 780
=== X86-64
=== Intel Graphics Media Accelerator 950
=== Intel 4 Series Chipset Integrated Graphics Controller
=== Intel Gigabit Ethernet Controller
=== Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz
=== 8Gb RAM
=== Intel SATA Controller [RAID mode]
=== 2 x 1Gb HD (Mirrored)
=== PIONEER DVD-RW DVR-219L
=== WLAN network interface
====================================
Hi Folks,
A little while ago, I sought to find a quick and easy way to change users while remaining in a KDE environment.
It was suggested to me that a better way would be to set up a shared folder, then, so they said, anyone could access it as they would be common files. (Providing you had permission of course.)
I set about that with gusto.
I should point out that this is sharing between users on the same machine. Windows or Samba do not come into this.
In home/ I have a directory /shared
and in that directory I have the
directory /Memberdata, and
I have the file "members.ods"
The User and the group for all above is skw and karate resp.
Root, skw and members of karate can access, change and save the file(s).
Those changes are seen by the next user that opens the file.
'Libreoffice Sharing' within the file is not set and as the file may not be accessed by two users, it is not needed.
The ods file has entries which point at text files. By pressing Ctrl and selecting the link, (usually the practitioners name.) the file is opened for editing.
As user skw, I can navigate to /home/shared and drag the ods file to my desktop, selecting 'link here' when asked.
Once opened, I can hover over a name link and I get the location on the screen momentarily.
Using the Ctrl + name selection, the file pointed at, opens for editing.
That path was created while accessing the file as user skw,
and is as follows: /home/shared/Memberdata/A.ods
When I log in as a user in the group 'karate' and access the main file, all is well and is edited and/or saved as is expected however, when I hover over a name link to get the location on the screen momentarily, it is slightly different to what I had seen
as user skw!
eg.
as user skw, the path for applicant A is shown as:
link:file:///home/shared/Memberdata/A.ods
As a different user but in a permitted group, 'karate', the path for applicant A is shown as:
link:file:///../shared/Memberdata/A.ods
and results in a failure message, ie. /../shared/Memberdata/A.ods does not exist.
If now as a user in group 'karate', (but not skw), I set the pointer for applicant B, I am able to access the file ///home/shared/Memberdata/B.ods.
Saving and closing the file and then changing back to user skw, I find I can access ///home/shared/Memberdata/B.ods but can no longer
access applicant A, which now reports:/../shared/Memberdata/A.ods does not exist.
It takes hours and hours to go from user to user to access and/or edit the file and reset the pointers.
It's doing my head damage!
If anybody has any ideas, (apart from WHY?) how to get round this I would really appreciate it.
looks like it is adding / that every time someone access it. let me review for my own understanding.
Staying in the KDE login and just using KDE's switch users option, you share a common directory under the parent directory /home
in order to give the everyone you want to access the files within that share did you use the group name to gain the common ground for all that belong to that group have access to whatever is in the shared folder, or by some other means?
did you leave the file in an open state by one of the users, then open it with the other user when testing this between two users?
Quote:
'Libreoffice Sharing' within the file is not set and as the file may not be accessed by two users, it is not needed.
may not necessary mean you should not at lest try using that option to see if that elevates your issue.
edit:::
you did what?
Quote:
As user skw, I can navigate to /home/shared and drag the ods file to my desktop, selecting 'link here' when asked.
dynamic linking is needed to update files between two sources that change same said file?.
try NOT using the link to get to the file but instead going to its source and opening and editing then saving, then if you want to quick open it use the recently opened option in the open->recently opened ( may not be spelled out or same words used) Menu option and see if that helps you out.
Para 1: I agree though I hadn't noticed it til now.
Para 2: Correct
Para 3: I used the group name! 'skw' is the owner, 'karate' is a permitted group. I, in my own login, am a member of 'karate'
Para 4: I have been fastidious at closing the file before changing user. Further, I have regularly deleted the link for the ods file in both the user areas in question, and created a new link from the shared directory before continuing with the tests.
Para 5: I did try the Libre office sharing and it allowed access for first user but opened in a 'Read only' mode if opened elsewhere. I turned it off again.
Let me see if I can explain this, how I did it in the same order it needs to be done, as I hack away on it until I figured it out.
I created two new users, created a new group put them both on it. made KDE their desktop, using startx on this Slack.
Code:
sharedfolders:x:1000:billybob,sallyjane
created a share folder as root, /home/share, made the owner one of the users, and the group ownership to the group I created.
Code:
bash-4.4# chown billybob /home/share
bash-4.4# chgrp sharedfolders /home/share
# this too is valid if you want to do it all in one command
bash-4.4# chown billybob:sharedfolders /home/share
drwxrwsr-x 1 billybob sharedfolders 48 Feb 8 11:46 .
gave the group read write execute
Code:
sudo chmod g+rwx /home/share
issued this command,
IMPORTANT: you need to try -aG instead as what I thought would happen doing it that way, did.
I lost all other groups they were attached to whereas -aG appends that group to all of the other groups already attached to.
as these are made up users it is not a big deal on my system.
drwxrwsr-x 1 billybob sharedfolders 48 Feb 8 11:46 .
drwxr-xr-x 1 root root 64 Feb 8 10:27 ..
-rwxrwxr-x 1 billybob users 8265 Feb 8 11:46 billybobob.odt
-rwxrwxr-x 1 sallyjane users 8054 Feb 8 11:42 shared.odt
both have read write to the files via the group.
now I have share files between both, opened libreoffice, edited the file with both users and libreoffice opened the same file with write permissions. .. in shorted it worked.
keep in mind this is not using links.
testing that IMPORTANT theory, let me go check if new user can do what they other two now can.
he kept all of the other groups he was already attached to.
Code:
bash-4.4# adduser jimmyjoe
Login name for new user: jimmyjoe
User ID ('UID') [ defaults to next available ]:
Initial group [ users ]:
Additional UNIX groups:
Users can belong to additional UNIX groups on the system.
For local users using graphical desktop login managers such
as XDM/KDM, users may need to be members of additional groups
to access the full functionality of removable media devices.
* Security implications *
Please be aware that by adding users to additional groups may
potentially give access to the removable media of other users.
If you are creating a new user for remote shell access only,
users do not need to belong to any additional groups as standard,
so you may press ENTER at the next prompt.
Press ENTER to continue without adding any additional groups
Or press the UP arrow key to add/select/edit additional groups
: audio cdrom floppy plugdev video power netdev lp scanner wheel
Home directory [ /home/jimmyjoe ]
Shell [ /bin/bash ]
Expiry date (YYYY-MM-DD) []:
New account will be created as follows:
---------------------------------------
Login name.......: jimmyjoe
UID..............: [ Next available ]
Initial group....: users
Additional groups: audio,cdrom,floppy,plugdev,video,power,netdev,lp,scanner,wheel
Home directory...: /home/jimmyjoe
Shell............: /bin/bash
Expiry date......: [ Never ]
This is it... if you want to bail out, hit Control-C. Otherwise, press
ENTER to go ahead and make the account.
Creating new account...
Changing the user information for jimmyjoe
Enter the new value, or press ENTER for the default
Full Name []: jimmyjoe
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Changing password for jimmyjoe
Enter the new password (minimum of 5 characters)
Please use a combination of upper and lower case letters and numbers.
New password:
Re-enter new password:
passwd: password changed.
Account setup complete.
bash-4.4# usermod -aG sharedfolders jimmyjoe
bash-4.4# cat /etc/group
root:x:0:root
bin:x:1:root,bin
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
tty:x:5:
disk:x:6:root,adm
lp:x:7:lp,userx64,jimmyjoe
mem:x:8:
kmem:x:9:
wheel:x:10:root,userx64,jimmyjoe
floppy:x:11:userx64,jimmyjoe
mail:x:12:mail
news:x:13:news
uucp:x:14:uucp
man:x:15:
dialout:x:16:uucp
audio:x:17:root,pulse,userx64,jimmyjoe
video:x:18:userx64,jimmyjoe
cdrom:x:19:userx64,jimmyjoe
games:x:20:
slocate:x:21:
utmp:x:22:
smmsp:x:25:smmsp
tape:x:26:
mysql:x:27:
rpc:x:32:
sshd:x:33:sshd
gdm:x:42:
shadow:x:43:
ftp:x:50:
oprofile:x:51:
sddm:x:64:
pulse:x:65:
input:x:71:
apache:x:80:
messagebus:x:81:
haldaemon:x:82:
plugdev:x:83:userx64,jimmyjoe
power:x:84:userx64,jimmyjoe
netdev:x:86:userx64,jimmyjoe
polkitd:x:87:
pop:x:90:pop
scanner:x:93:userx64,jimmyjoe
nobody:x:98:nobody
nogroup:x:99:
users:x:100:
console:x:101:
dovecot:x:94:
dovenull:x:95:
postfix:x:91:
postdrop:x:92:
cgred:x:41:
ntp:x:44:
sharedfolders:x:1000:billybob,sallyjane,jimmyjoe
Verdict:
It worked for the newly added user as well. so yes... whence you get that done, then you can try your links to your desktop afterwords.
That's a lot of work and I thank you explaining it.
Would you be so kind as to try the next phase, which is to add a field in the calculation sheet that is a local url. That url being in the shared directory as well.
I don't know how familiar you are with this procedure so I'll describe it here but you can comfortably ignore it :-) Just skip to the ================
Create an odt file in the shared directory say xyz.odt
in a blank field in your sheet use Ctrl K to create a hyperlink.
In the dialogue that opens, on the left side pane, select 'Document'
In the new dialogue, fill in the path. You can ignore all the other settings but it is wise to add an identifier to the 'Text' field, say, xyz.
Apply and close.
Your blank field should now show 'xyz'
If you hover the mouse over the field, an instruction appears so
Ctrl click the xyz entry and the xyz file should open.
Add to it, perhaps the identity of the current login.
Save and leave, log out, log in as another.
So the question is, does it all behave as hoped for?
================
Right, as you've skipped down to here, thanks again for your investigations on my behalf :-)
That's a lot of work and I thank you explaining it.
Would you be so kind as to try the next phase, which is to add a field in the calculation sheet that is a local url. That url being in the shared directory as well.
I don't know how familiar you are with this procedure so I'll describe it here but you can comfortably ignore it :-) Just skip to the ================
Create an odt file in the shared directory say xyz.odt
in a blank field in your sheet use Ctrl K to create a hyperlink.
In the dialogue that opens, on the left side pane, select 'Document'
In the new dialogue, fill in the path. You can ignore all the other settings but it is wise to add an identifier to the 'Text' field, say, xyz.
Apply and close.
Your blank field should now show 'xyz'
If you hover the mouse over the field, an instruction appears so
Ctrl click the xyz entry and the xyz file should open.
Add to it, perhaps the identity of the current login.
Save and leave, log out, log in as another.
So the question is, does it all behave as hoped for?
================
Right, as you've skipped down to here, thanks again for your investigations on my behalf :-)
Regards
Chris
How are you going to learn anything if I do all of your work for you? I have no need of that knowledge, whereas it looks that you do... think about it...
I don't really want you to do anything for me. I was surprised at what you did.
you don't really want me to do anything for you.
Quote:
Originally Posted by Crb999
Would you be so kind as to try the next phase, which is to add a field in the calculation sheet that is a local url. That url being in the shared directory as well. .....
that is a request from you to me to do something for you. You're contradicting yourself. you know... then playing the guilt trip thing on me next....
Quote:
I suspect they won't be maintained.
We'll never know! Shame.
Thanks anyway.
we'll never know because why, surly not by any fault of my own. They're your files. Not mine.
If you do not want to open up your app to get to your files....
Quote:
All of the biggest technological inventions created by man, the airplane, the
automobile, the computer, says little out his intelligence, but speaks volumes
about his laziness.
try :: bind mount the share into each individuals account via fstab .. then apply a shotcut to the files.
It seems there are fewer options than what you planed for, ie a Libreoffice shared document is either writable for all or not shared at all.
The help document doesn't talk about document links though, maybe the linked documents have to be set as shared or not shared opening them individually (requires some testing)
On another point, Libreoffice shared document feature allows for opening the document simultaneously by different users which may be nice (or not) depending on your usage
Hi keefaz, yes, I suspect it is a libreoffice failing.
BTW I did set up the documents for libreoffice sharing and it worked in the way expected, opening by another user opened on a 'Read only' mode, but the urls were still not maintained.
I've given up trying to use links. BW suggested that I simply 'Open recent document'
That works and I'll stick with it for the foreseeable future.
I'll drop a line to libreoffice and see what they say.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.