Page 1 of 1

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

Posted: Thu Apr 26, 2018 9:41 am
by 1dot0
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?

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

Posted: Thu Apr 26, 2018 10:01 am
by Roken
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.

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

Posted: Thu Apr 26, 2018 10:37 am
by KLL
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]

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

Posted: Thu Apr 26, 2018 10:37 am
by 1dot0
@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

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

Posted: Thu Apr 26, 2018 10:42 am
by KLL
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???

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

Posted: Thu Apr 26, 2018 10:46 am
by 1dot0
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".

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

Posted: Thu Apr 26, 2018 11:05 am
by KLL
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

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

Posted: Thu Apr 26, 2018 12:45 pm
by 1dot0
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?

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

Posted: Thu Apr 26, 2018 1:03 pm
by KLL
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

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

Posted: Thu Apr 26, 2018 2:07 pm
by scruss
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.

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

Posted: Thu Apr 26, 2018 9:39 pm
by 1dot0
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?

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

Posted: Thu Apr 26, 2018 10:13 pm
by KLL
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 )

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

Posted: Fri Apr 27, 2018 8:11 am
by 1dot0
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!

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

Posted: Fri Apr 27, 2018 9:00 am
by KLL
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

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

Posted: Fri Apr 27, 2018 9:41 am
by 1dot0
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.

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

Posted: Sat Apr 28, 2018 10:01 pm
by scruss
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.

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

Posted: Sun Apr 29, 2018 12:34 am
by klricks
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.

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

Posted: Sun Apr 29, 2018 10:02 am
by 1dot0
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.