Ubuntu: where is a bug in my startup mounting application in Ubuntu 16.04?


In the Terminal, the command

  myuser@TomE:~$ sleep 5 && /home/myuser/mountF  myuser@TomE:~$
works OK with mountF containing
  #! /bin/bash  pkexec mount -t vfat /dev/sdb7 /home/myuser/F
. But if I place the same command in the Startup Applications dialog and check it, it does not work after I log in, even if I have unchecked the antivirus program there and disconnected external USB disks. In my home directory is a file .xsession-errors, with the logging time, containing
  openConnection: connect: No such file or directory  cannot connect to brltty at :0 
. Is it related to this problem? (According to the Software Updater, my system is up to date.) Thanks!


Add this to /etc/fstab

sudo nano /etc/fstab

Add in

/dev/sdb7 /home/myuser/F vfat noauto,users,uid=1000,gid=100,dmask=027,fmask=137,utf8  0  0  

Now you can mount at login with or without a script and without sudo

mount /dev/sdb7  

So just run that command, mount /dev/sdb7 at login, no need for a script or anything complex.

See https://help.ubuntu.com/community/Fstab for details and other options.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »