1dot0
Posts: 430
Joined: Mon Nov 28, 2016 12:31 pm

Jessie: how to create a desktop shortcut to a USB storage drv?

Thu Apr 26, 2018 9:41 am

for Jessie:
how to create a desktop shortcut to a USB storage drv?
My USB drv is mounted as
/media/pi/USBDRV
as that is too cumbersome for quick file browsing I want to access the drive via a dektop shortcut, to be opened by the file manager by a double click, like I am used to do it on Windows (7,8,...).
How to get that?

User avatar
Roken
Posts: 309
Joined: Sun Dec 31, 2017 4:35 pm
Location: UK

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Thu Apr 26, 2018 10:01 am

It depends on your DE and filemanager, but as an example with XFCE and thunar:

Create a launcher on the desktop. The command to use in the launcher is:

Code: Select all

thunar /media/pi/USBDRV
You may need to mark it executable. Then, a double click will open it in your filemanager.
Headless PI. OMG, someone cut it's head off. Oh, hang on. it didn't have one to start with.

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Thu Apr 26, 2018 10:37 am

what means mounted? is it automounted by pcmanfm?

for RASPBIAN Desktop
why not just go desktop / right click contextmenu / desktop preferences /
[x] mounted disks [OK]
Last edited by KLL on Thu Apr 26, 2018 10:40 am, edited 2 times in total.

1dot0
Posts: 430
Joined: Mon Nov 28, 2016 12:31 pm

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Thu Apr 26, 2018 10:37 am

@Roken:
I have the Jessie file manager,
and 1st of all I need a shortcut on the Jessie desktop - but how ???

@KLL:
that's even too cumbersome on small TFTs and touchscreens, so I'd like to have a shortcut icon

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Thu Apr 26, 2018 10:42 am

1dot0 wrote:
Thu Apr 26, 2018 10:37 am
@KLL:
that's even too cumbersome on small TFTs and touchscreens, so I'd like to have a shortcut icon
you just enable it one time???

1dot0
Posts: 430
Joined: Mon Nov 28, 2016 12:31 pm

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Thu Apr 26, 2018 10:46 am

what I got then is an icon called "settings" with tiny submenus and lot of tiny entries, not possible to open just the single drv USBDRV immediately.
I'd like to have a shortcut icon to just this single folder "USBDRV".

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Thu Apr 26, 2018 11:05 am

ok, there is a hard way: ( i booted a old JESSIE for you )
you need to edit
nano ~/.config/pcmanfm/LXDE-pi/desktop-items-0.conf

line
show_mounts=0
change to
show_mounts=1

( can you touch your system via ssh??)

____________________ OR _______________________

nano ~/Desktop/mymount.desktop

Code: Select all

[Desktop Entry]
Type=Application
Comment=link to a mounted drive
Name=my USBstick
Icon=drive-removable-media.png
Exec=pcmanfm /media/pi/USBDRV

1dot0
Posts: 430
Joined: Mon Nov 28, 2016 12:31 pm

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Thu Apr 26, 2018 12:45 pm

no, I have no ssh.

What I am searching for is a simple way, like in Windows:

select target folder (e.g.: /media/pi/USBDRV (or any different arbitrary one))
right mouse click on this folder
context menu: create shortcut (on desktop)

But there is not such a context menu to create a short cut
- why not? where is it?

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Thu Apr 26, 2018 1:03 pm

1dot0 wrote: like in Windows:
here i show you can run win 3.1 if you want.



problem is with menu ... filemanager [context menu][add to desktop]
you get only a link and not a file.

so in terminal can do
cd Desktop
cp /usr/share/raspi-ui-overrides/applications/pcmanfm.desktop mydrive.desktop
and then try to edit it with leafpad like i show in prior post

__________________________________________________________
or
[main menu][preferences][menueditor]
[new item]
name:[mydrive]
command:[pcmanfm /home/pi/USBDRV]
and then [add to desktop] ( its a alacarte-made.desktop menu item, still can edit it (leafpad))

__________________________________________________________

sure there is also the direct way:
context menu create new folder
and mount that stick into that folder

User avatar
scruss
Posts: 2624
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Thu Apr 26, 2018 2:07 pm

On the desktop, if you go to Preferences → Appearance Settings → Desktop tab and select the "Mounted disks" option, any inserted USB stick will show on the desktop.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

1dot0
Posts: 430
Joined: Mon Nov 28, 2016 12:31 pm

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Thu Apr 26, 2018 9:39 pm

tbh, it's not about just the shortcut (the LINK!) to the mounted drive, it's actually about a certain directory on the mounted drive (called "programs") .
I admit that I simplified my question not to make it over-complicated in the thread-opening post.

@scruss, @KLL : yes, thank you, I found that option meanwhile, and it now works - what I was missing was that the drive icon appeared somewhere in between some different icons on the desktop randomly where I didn't actually expect it to turn up.

So after all: it's still about a shortcut, which of course (@KLL) is a link, not a file, and such a shortcut link is exactly what I needed.

But is it honestly not possible by Linux to create a shortcut link to a directory on a USB disk on the desktop?

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Thu Apr 26, 2018 10:13 pm

1dot0 wrote: tbh, it's not about just the shortcut (the LINK!) to the mounted drive, it's actually about a certain directory on the mounted drive (called "programs") .

it's still about a shortcut, which of course (@KLL) is a link, not a file

But is it honestly not possible by Linux to create a shortcut link to a directory on a USB disk on the desktop?
i show you many ways to make a .desktop file
+ and in linux and windows that are files,
in linux just a clean text file you can edit with any editor,
in linux and in windows just via its properties editor.

but if that file is hidden and in desktop only a link to it, it is difficult to use a editor on it.
and that is what desktop menu and pcmanfm are doing.

so again, you need that file i show you and then its easy to use
Exec=pcmanfm /home/pi/USBDRV/myprograms/
or even just link to single file on the drive ( and its use by something )
Exec=python3 /home/pi/USBDRV/myprograms/my_py_program.py

so again, it is possible, on (this) desktop not via context menu, only via main menu editor or manually...
_____________________________________
why you not enable ssh and login putty ssh remotely? so terminal work is easy ( compared to the small screen issues )

1dot0
Posts: 430
Joined: Mon Nov 28, 2016 12:31 pm

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Fri Apr 27, 2018 8:11 am

thank you, but I actually thought there must be a simpler way.... :roll:

and heureka! I found it out just in the moment!
file manager
select the target file /dir
edit
new shortcut link....
left window: location
choose: desktop
ok
=> there the shortcut link appears statically on an arbitrary place on the desktop!

unfortunately just that way and not via the right-mouse-click-context-menu, but anyway, finally it's there!
Thanks to all!

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Fri Apr 27, 2018 9:00 am

very good find!
i try to follow in terminal
it would be like:
cd ~/Desktop
ln -s /media/pi/USBDRV


and yes, that one is not a .desktop file, ( and no link to a .desktop file ), it is a symlink / softlink

until now i not find a way to EDIT that link,
but there must be a way, because from MC filemanager i can do exactly that
Image
Last edited by KLL on Fri Apr 27, 2018 10:04 am, edited 1 time in total.

1dot0
Posts: 430
Joined: Mon Nov 28, 2016 12:31 pm

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Fri Apr 27, 2018 9:41 am

to me there is no reason why I should "edit" the shortcut link (??)
I just double click on the desktop icon and I get where I want, and it works like a charme.

User avatar
scruss
Posts: 2624
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Sat Apr 28, 2018 10:01 pm

1dot0 wrote:
Thu Apr 26, 2018 9:39 pm
But is it honestly not possible by Linux to create a shortcut link to a directory on a USB disk on the desktop?
Looks like you've found a way, but that folder link may do unexpected things if you don't have the drive inserted or it's mounted on a different place. You might get the fun situation of your system making an explicit /media/pi subfolder and storing the file on your system SD card. When that happens, the you'd still appear to have access to the same folder, but they'd be different depending on whether the USB key was inserted.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

klricks
Posts: 6618
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Sun Apr 29, 2018 12:34 am

scruss wrote:
Sat Apr 28, 2018 10:01 pm
1dot0 wrote:
Thu Apr 26, 2018 9:39 pm
But is it honestly not possible by Linux to create a shortcut link to a directory on a USB disk on the desktop?
Looks like you've found a way, but that folder link may do unexpected things if you don't have the drive inserted or it's mounted on a different place. You might get the fun situation of your system making an explicit /media/pi subfolder and storing the file on your system SD card. When that happens, the you'd still appear to have access to the same folder, but they'd be different depending on whether the USB key was inserted.
I once filled up my entire SD card when I didn't realize my attached hard disk was not working.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

1dot0
Posts: 430
Joined: Mon Nov 28, 2016 12:31 pm

Re: Jessie: how to create a desktop shortcut to a USB storage drv?

Sun Apr 29, 2018 10:02 am

scruss wrote:
Sat Apr 28, 2018 10:01 pm
1dot0 wrote:
Thu Apr 26, 2018 9:39 pm
But is it honestly not possible by Linux to create a shortcut link to a directory on a USB disk on the desktop?
Looks like you've found a way, but that folder link may do unexpected things if you don't have the drive inserted or it's mounted on a different place. You might get the fun situation of your system making an explicit /media/pi subfolder and storing the file on your system SD card. When that happens, the you'd still appear to have access to the same folder, but they'd be different depending on whether the USB key was inserted.
Didn't you try it out by yourself?
By a double click on the desktop link icon nothing unexpected is happening: if the USB drive is not inserted, then just a pop-up window appears showing a message that the target is not available.

Return to “Beginners”