Creating Folder

How do I create folders for the apps on my home screen? I can only seem to be able to add to favorites or view details. Isn’t the phone OS based on android? I should be able to long tap and drag but that isn’t working.

The Librem 5 runs PureOS, which is not based on android. That is one of the major selling points. It is entirely independent from google. PureOS is a linux distribution that is based on Debian, and the Librem 5 also has Phosh to give it a mobile interface.

I don’t think Phosh supports folders yet, but it will eventually become similarly feature-rich like iOS and android but without the malicious code.

2 Likes

The answer is here already here.

Create a file with texteditor, save it ~/.local/share/application and name it [Filename].desktop. (Replace [Filename] with what ever you want.)

[Desktop Entry]
Name=[Desktop Folder Name]
Ecec=nautilus /[Full Path]
Type=Application
Icon=folder

You can replace [Desktop Folder Name] with everything you want. That will be displayed below the desktop icon.
Replace [Full Path] with the path. For Downloads-folder for example Exec=nautilus /home/purism/Downloads. Not allowed is the short way Exec=nautilus ~/Downloads.

That may not be the question though. :wink:

If the actual requirement is to be able to group apps into “folders” then just launching nautilus isn’t really the right answer, although it may somewhat work.

iOS does what I think the OP is asking for. For example, the default “Utilities” app is actually a “folder” of apps. When you touch the Utilities app, instead of launching an app, it expands that group of apps, modally, in front of the app screen, and then you can touch one of the apps inside that group.

So it is a way of having more and more apps on the main screen - instead of adding more app screens (per the way iOS works now) and without having to scroll and scroll and scroll through apps (per the way the Librem 5 works now).

The only problem is … the first thing I do with a new iPhone is pull the useful utilities out of the Utilities group of apps and banish the Utilities app, with the remaining, non-useful utilities, to one of the later app screens.

Still, someone might want this functionality.

I see - was not happy with smartphones and so I didn’t use them a lot. :sweat_smile: However, a workaround should be to put application-links inside that folder. I just don’t know right now how to link application starts this way (would have to search about it).

You can add actions to one or more .desktop files and paste the Exec= command from whichever packages you want to launch. I made a post here about adding actions to .desktop files.

This would be how to make a folder-like .desktop file:

  1. Create .desktop file in ~/.local/share/applications/

    touch ~/.local/share/applications/folder.desktop
    
  2. Open .desktop file in a text editor like gedit and add this:

[Desktop Entry]
Name=Folder
Type=Application
Icon=/PATH/TO/ICON/
Exec=DEFAULT APPLICATION OR COMMAND
Categories=Utility;

##Define Actions (as many as you want)
Actions=app_1;app_2;app_3;

[Desktop Action app_1]
Name=APPLICATION NAME (or whatever you want)
Exec=

[Desktop Action app_2]
Name=APPLICATION NAME (or whatever you want)
Exec=

[Desktop Action app_3]
Name=APPLICATION NAME (or whatever you want)
Exec=
  1. For the packages that you want to add, open the .desktop file in /usr/share/applications/ and copy/paste the Exec= line into your new .desktop file for one of the actions.

  2. To run one of the commands, tap and hold on the .desktop icon (or right-click it if you have a mouse connected) and tap (or click) the action on the popup menu.

This is how I handle my Librem 5, and I also have custom scripts for useful things.

4 Likes

Hello. Thank you so much for this tutorial. Great stuff.

However, I am having trouble creating an action (Execution) to create a folder to open the SD card folder.

What would be the correct command to do that?

I think the command is nautilus /media/purism/3438-3439 (replace the number with your own.) @flanders51

2 Likes

Worked like a charm. Thank you!

1 Like

Hello. Unfortunately, I made the mistake of upgrading to a new SD card and my fancy desktop folder stopped working. Ok, all I need to do is add the UUID for the SD card, right? I guess not.

I ran the command lsusb and got a result. Is that the sd card identification I need?

Or, when I tried reviewing the UUID with the Disks tool, I get a different ID.

Or, when I look in the /media/purism folder I see no less than 3 ID numbers for the SD card None of them work because I do not have “permission” to access them as a user.

Nautilus opens the folder as “USB STICK”.

My problem: none of those IDs work to point the folder to open my SD card anymore. Any help would be most appreciated.

I don’t have a clue :man_shrugging:. Someone else might though.

No problem. Anybody?

What is the best way to point Nautilus to the SD card via the command line?

What is the output of lsblk?
Have you edited the file /etc/fstab to add anything special to it?

Try: /media/purism/"Memory card"

Or it might be /media/purism/“USB STICK” in your case.

1 Like

I will try.

For a start, the ID in the post that you replied to looks like a Microsoft Windows ID i.e. the card might be formatted with a FAT file system. So first up you need to tell us what type of file system you put on the new card.

(In many cases, a high capacity card will arrive already formatted with an exfat file system and maybe you left it ‘as is’. In earlier times or for a lower capacity card, the card might arrive already formatted with a FAT file system.)

Regardless, if you are relying on the card being mounted automatically in the default location (/media/$USER), which I wouldn’t necessarily recommend, then it will try by default to use the LABEL from the file system but, I think, if the file system has no label then it will use the UUID of the file system. The reason that the type of file system matters is that the exact commands to use and exact capabilities depend on the type of file system.

So second up you need to tell us whether you labelled the file system.

If we are talking about a FAT file system then you can use the fatlabel command from the dosfstools package to get and set the LABEL and/or the UUID (which in this context is called the “Volume ID”). The Volume ID is a 32-bit number (hence not a true UUID at all).

For a relatively static situation (my assumption!) such as the uSD card in your Librem 5, I prefer to label the card.