I ran the following command
It said, USB filesystem is unknown. Then I ran the following command.
It said, the USB stick has VFAT filesystem.
Owner is root for this USB. I am able to access the files and make changes to the USB but only through SUDO commands like copy, delete or move like the following
sudo cp /home/pi/test.gif /media/usb/
Since owner is root for the USB, I decided to start my program from the console instead of from the desktop shortcut doing the follwing
And bunch of errors showed up in the console
(myprogram:1417): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.PNP0GY': No such file or directory
(myprogram:1417): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
TApplication.HandleException Access denied
Stack trace:
$00110A70 TSYSTEMDLG__WRITE, line 176 of Ezsystem.pas
$00110830 TSYSTEMDLG__OKBTNCLICK, line 135 of Ezsystem.pas
$0031C6E4 TCONTROL__CLICK, line 2711 of ./include/control.inc
$0034F2F4 TBUTTONCONTROL__CLICK, line 54 of ./include/buttoncontrol.inc
$0034FC84 TCUSTOMBUTTON__CLICK, line 169 of ./include/buttons.inc
$0033D68C TCUSTOMBITBTN__CLICK, line 64 of ./include/bitbtn.inc
$0034F1BC TBUTTONCONTROL__WMDEFAULTCLICKED, line 20 of ./include/buttoncontrol.inc
$00044B48
$0030AB38 TWINCONTROL__WNDPROC, line 5326 of ./include/wincontrol.inc
$0040CD44 DELIVERMESSAGE, line 112 of lclmessageglue.pas
$0041DA64 GTK2WSBUTTON_CLICKED, line 2435 of gtk2wsstdctrls.pp
$76969AFC
By the way, I just want to let the forum administrators know that I am not asking pure Raspberry PI question on Lazarus forum just because... My program was written using latest FPC and Lazarus... Thanks.