Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
|
10-01-2019, 01:12 AM
|
#16
|
Member
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503
Original Poster
Rep:
|
That's OK. Multiple logins on my computer are caused only by the use of "Swap User". And logins start at tty7.
|
|
|
10-01-2019, 11:57 AM
|
#17
|
Member
Registered: Aug 2007
Posts: 483
Rep: 
|
Quote:
That's OK. Multiple logins on my computer are caused only by the use of "Swap User". And logins start at tty7.
|
You seem to be only talking about your computer now but on your web page you are attempting to create a guide for everyone to use. On most major distros now logins start at tty1. Fedora used to be tty7 but is now tty1.
Also others may have multiple logins by other people. For everyone to use you should search for either tty1 or tty7.
Code:
$ who | awk '/tty[17]/ {print $1;}'
Also you should use variables as I showed and get rid of the following. Alternatively you could use a backslash to escape the newline so a long command can be split over multiple lines.
Quote:
NOTE: The lines in RED should be made into a single line when typed in.
|
https://www.cyberciti.biz/faq/howto-...ues-next-line/
To use both techniques
Code:
#!/bin/bash
hisname=`who | awk '/tty[17]/ {print $1;}'`
mkdir -p /media/$hisname/REMOTE
chown $hisname:`id -gn $hisname` /media/$hisname/REMOTE
DEVICE=/dev/disk/by-id/usb-UEI_Remotes_UEI_Mass_Storage_000000000001-0:0-part1
mount -t vfat $DEVICE /media/$hisname/REMOTE/ \
-o uid=`id -u $hisname`,gid=`id -g $hisname`,utf8,dmask=027,fmask=137
Also if you use mkdir -p it creates parent directories as needed.
Last edited by tofino_surfer; 10-05-2019 at 07:25 AM.
|
|
|
10-05-2019, 06:31 AM
|
#18
|
Member
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503
Original Poster
Rep:
|
Thanks!
There is one other problem.
Umounting from the desktop icon. In PCLinuxOS it's fine, but in the beta of MX19 it requires root password to unmount. I don't know whether it's a bug in the beta, or whether I could improve the mount command.
|
|
|
10-05-2019, 07:39 AM
|
#19
|
Member
Registered: Aug 2007
Posts: 483
Rep: 
|
Quote:
Umounting from the desktop icon. In PCLinuxOS it's fine, but in the beta of MX19 it requires root password to unmount.I don't know whether it's a bug in the beta, or whether I could improve the mount command.
|
You could try adding users to the mount options. From the mount manpage:
Code:
users Allow any user to mount and to unmount the filesystem, even when some other ordinary user mounted it.
This option implies the options noexec, nosuid, and nodev
(unless overridden by subsequent options, as in the option line users,exec,dev,suid).
|
|
|
10-05-2019, 02:12 PM
|
#20
|
Member
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503
Original Poster
Rep:
|
Quote:
Originally Posted by tofino_surfer
You could try adding users to the mount options. From the mount manpage:
Code:
users Allow any user to mount and to unmount the filesystem, even when some other ordinary user mounted it.
This option implies the options noexec, nosuid, and nodev
(unless overridden by subsequent options, as in the option line users,exec,dev,suid).
|
Tried that and various other similar combinations. It's not having it at all. I'm wondering if it's a bug in the MX-linux 19ß3 version, and I've reported it there.
I found the online man-page for mount, and I can't see why it doesn't work.
Last edited by davecs; 10-05-2019 at 02:14 PM.
|
|
|
All times are GMT -5. The time now is 12:49 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|