LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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


Reply
  Search this Thread
Old 10-01-2019, 01:12 AM   #16
davecs
Member
 
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503

Original Poster
Rep: Reputation: 32

That's OK. Multiple logins on my computer are caused only by the use of "Swap User". And logins start at tty7.
 
Old 10-01-2019, 11:57 AM   #17
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 483

Rep: Reputation: 153Reputation: 153
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.
 
Old 10-05-2019, 06:31 AM   #18
davecs
Member
 
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503

Original Poster
Rep: Reputation: 32
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.
 
Old 10-05-2019, 07:39 AM   #19
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 483

Rep: Reputation: 153Reputation: 153
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).
 
Old 10-05-2019, 02:12 PM   #20
davecs
Member
 
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by tofino_surfer View Post
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.
 
  


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
UDEV: Unable to run a command line interface script after USB automount using udev mohamr2 Linux - Embedded & Single-board computer 8 08-16-2011 10:39 AM
[SOLVED] How to mount by-uuid if the device won't show in /dev/disk/by-uuid untill after blkid /dev/sd* ? masmddr Linux - General 4 01-10-2011 07:38 PM
Change UUID - Edit UUID using the dd command GMHilltop Linux - Newbie 10 10-28-2010 07:39 PM
Volume has problems including no uuid in /dev/disk/by-uuid abejarano Linux - Hardware 3 12-31-2008 08:41 PM
Automount - HAL - udev - Xfce - Konqueror - Slackware - help requested Linux.tar.gz Linux - Hardware 5 06-19-2008 09:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:51 AM.

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