Installing Tropy on Chromebook

Hi all!

This might be the silliest question ever, but would anyone be able to walk me through installing Tropy in its Linux 64 form onto my Chromebook? I’m starting an internship and need Tropy for it, but just have absolutely no coding competency whatsoever. I’m reluctant to post this as I know it’s a big ask, but I’ve been trying to figure it out for hours with no luck and I feel like if anywhere could help, it’s here!

Here’s what I’ve tried so far:

  • I downloaded the .bz2 from the website (did not know you could get all these different kinds of zip files, amazing!) and managed to use an online guide to extract it via the command line, as my laptop can’t extract such files in its Files app. I moved it from my Downloads to my Linux Files file.

  • Now I have a variety of loose Tropy-related files, which is very exciting! Unfortunately, when I try to open the ‘tropy’ binary file to let it run and presumably install itself, there’s a pop-up saying that this file type isn’t supported, and that I need to find an application in the Playstore from which to run it. Pretty sure this is just Google being irritating as per, but please let me know if this actually is the best course of action.

  • I tried to follow the INSTALL instructions provided with the programme upon download, but was utterly mystified by the first step, which I’ve drawn a little star next to so you can see what I’ve been looking at:

  • I also tried to follow the instructions in a similar post from 2018 on this forum, where someone called Lisa receives great help from inukshuk on installing Tropy for Ubuntu (see here). Managed to get up to step 3 this time (wahey!), so I think I’ve created a folder to install it into, but stalled at step 4 as I keep getting this reply from my laptop when I paste and run the code:
    Screenshot 2021-06-03 7.57.38 PM
    (I’ve just blocked out the bits that are personal data)

  • In the step above, I did change the version number of Tropy when I copied inukshuk’s code, because our file names were different as I’m guessing it’s been updated since then, but I don’t think that should prevent it from running?

So that’s where I’ve got to :sweat_smile:

My Chromebook is running 64-bit Chrome (90.0.4430.218) and 64-bit Linux, if that’s relevant at all.

If anyone has any idea what I could try next to install Tropy, I would absolutely love to hear it! Please let me know if I can provide any more system information, or run any commands to check certain information, that might help clarify things or solve the problem.
Thanks for reading this far!! Apologies again for the daft post, and for being so coding-illiterate.
Cheers, Issy :blush:

The folder with Tropy-related files is actually all there is: the ‘installation’ is just to to move the folder to a convenient place and make Tropy known to your desktop environment so that you can start it by clicking on its icon. So this means that starting the ‘tropy’ file in that folder should actually just start Tropy. You mentioned that your attempt to open that file resulted in a pop-up – but how did you try to open it? I don’t know have a Chromebook myself, but I would guess that it might not be possible to launch binaries by clicking on them in the Files app. If that’s what you did, can you try to open the folder in the terminal and to start binary there?

If you’ve downloaded the tar.bz2 to your Downloads folder you could do this:

  1. Open the terminal
  2. Go to the Downloads folder: cd ~/Downloads
  3. Make a folder to unpack Tropy (we can move/install the folder later when we know that Tropy can be started): mkdir tropy
  4. Unpack the archive: tar xjf tropy-1.9.0-x64.tar.bz2 -C ./tropy
  5. Go to the folder cd tropy
  6. And try to launch tropy with ./tropy

If Tropy starts, we’re good. In this case we should move the folder to more permanent location and I register the application so that you get a launcher icon and don’t have to use the terminal to start Tropy – these are the instructions in the INSTALL file, but I need to do some research to check if those steps apply on Chrome OS too.

If Tropy does not start, please post the corresponding error message. If it is something security/sandbox related, you might try the following steps right away (still in the new Tropy folder):

./tropy --no-sandbox

Or, if this doesn’t work then:
sudo chown root chrome-sandbox

Followed by
sudo chmod 4755 chrome-sandbox

And then try again to launch Tropy with ./tropy

1 Like

Thank you so much for such a quick and comprehensive response, really appreciated!
Thanks also for clarifying on the ‘installation’ vs just starting Tropy. I did originally just double-click to open it like I would with a normal file, so that makes sense that it wouldn’t work! I also can’t seem to open that file in the terminal, so I went ahead with your other instructions :slight_smile:

I moved the tar.bz2 into my ‘Linux files’ folder and worked from there as my terminal seems to find things in that folder the easiest. Happy that I got through so many of the steps! I did fall at the last hurdle a bit though as although I did the mkdir tropy, when I went in for that final ./tropy the terminal couldn’t find it again, and I got the ‘no such file or directory’ error message:
Screenshot 2021-06-04 5.19.57 PM

I then tried out those final steps you gave, even though I’m guessing it’s not a security/sandbox error, but still wasn’t able to run it. Would there happen to be any next steps I could take?

Thank you again for all your help. I’m definitely learning a lot!

This looks promising! So you seem to be able to start Tropy, however, at start-up a shared library is missing. Normally, you would install this using your distro’s package management system, for instance via sudo apt install libnss3 on a Debian-based Linux. How do you install system tools on your Chromebook? If you don’t know, try the command above and, if it does anything meaningful, try to start Tropy again (it’s possible that you’ll have to install a few more dependencies like this).

Check this out!!
Screenshot 2021-06-07 11.45.39 AM
A whole BUNCH of stuff scrolled past when I put sudo apt install libnss3 in, and I got a different reply when I tried to start Tropy again, so it didn’t quite sort it but it’s definitely doing something! :partying_face:
I’m not sure how to install system tools, didn’t know that I was using Debian-based Linux but since that command did so much, I guess I am. I understand that -bash: is a kind of error message - so Tropy is now a directory (yay!) but not yet launchable?
Am wondering if this ‘apt-utils is not installed’ is the next thing to install?
Thank you so so much.

@fl00rb0ard thanks for the patience and enthusiasm you’re bringing to this! : ) Yes, we’re making progress here: your Linux is certainly using Debian’s package system, because installing the missing dependency seems to have worked.

The error message at the end means just that: tropy is a directory, so it seems that you were in the wrong place. Here are a few Terminal fundamentals that should help you figure this out: if you type ls (or ls -l for more details) you will see a list of contents for your current working directory. When you unpack Tropy one of the files is also called tropy. The command ./tropy assumes that you’re currently in the directory containing that file, that is ./ is the current directory and tropy the file in it.

If you unpacked Tropy into the tropy folder earlier, then I guess you’re just not in the right folder yet. You would do cd tropy first to change into the tropy directory, then call ./tropy to launch the Tropy file in that directory. Alternatively you could launch it from outside with ./tropy/tropy. As part of the installation process we’ll want to add Tropy’s location to your PATH environment variable, which means that you will be able to type tropy anywhere and your system will find the binary, but until then you need to launch it at its specific location. Please try that, then we’ll know whether it works of if you need to install any other missing libraries first.

2 Likes

IT OPENED!!! WE DID IT!!!
:partying_face: :partying_face: :partying_face:

Turns out I was totally trying to open it from inside the zipped download :sweat_smile:

I can’t thank you enough - definitely wouldn’t have made it this far without all your help!
Thank you for being so generous with your time, and so patient with such a newbie.
I have never been so happy to open an app in my life omg!

That’s great! So now that we’ve established Tropy works, let’s try to make it more convenient for you to use. First you need to decide where it should be located on your disk. Typically, every Linux distro has one or two places where third-party apps are installed, but I’m not sure if there’s such a convention on Chrome OS. In any case, this is essentially up to you – it’s just important that you know where it is, because if you download a new version of Tropy in the future you’ll want to completely replace that folder. To find out the full path to your current folder you can type pwd in the terminal, if you’re currently in that folder where the ./tropy command worked.

Once you know that path, you can configure the .desktop file that will hopefully let you add Tropy other Chrome OS apps on your system. In your Tropy folder, please find and open the tropy.desktop file in a text editor. Next, edit the two lines that say

Exec=tropy %u
Icon=tropy

Using the full path. For example, if you’ve installed Tropy to /home/fl00rb0ard/tropy you would change the lines to:

Exec=/home/fl00rb0ard/tropy/tropy %u
Icon=/home/fl00rb0ard/tropy/resources/icons/hicolor/512x512/apps/tropy.png

If you made these changes and saved the file, try the following back in the terminal:

mkdir -p ~/.local/share/applications
cp tropy.desktop ~/.local/share/applications/

The first command creates your the app launcher directory, in case it does not exist yet, and the second copies the desktop file to this directory. After this is done, try to see if Tropy has now been added to other apps on your Chromebook (not sure how this works, but I’m assuming there’s some kind of dock or window where you can see all the installed apps); if it isn’t restart the system, to see if the changes get picked up after the restart.

If that didn’t help, try to copy the desktop file to /usr/share/applications/ instead (sudo cp tropy.desktop /usr/share/applications/).

1 Like

It worked first time!! :partying_face:
I can open it from the dock now, which is great. Does that mean it’s all sorted?

Basically, yes. You could try to also register the icons and mime-types as explained by the INSTALL document. This achieves that Tropy project files and templates should get their own icon, when you view them in your Files app and that you can open a project file directly (i.e., clicking on the project file opens the project in Tropy – as opposed to having to start Tropy then open the project file via the menu or by dropping it into the window). I’m not completely sure that registering as described will be sufficient on Chrome OS, but you can give it a try, though this isn’t crucial for day-to-day use of Tropy.

The only thing, really, to keep in mind is that when you update Tropy you just replace the entire unpacked Tropy app folder with the new one. You won’t have to update the .desktop file, unless you decide to move Tropy elsewhere.

1 Like

Okay, that’s really good to know! I’ll take a bash at following the INSTALL document and see where it takes me. I definitely know where to come if I have any more questions!

Thank you so much (again!) for all your help.

Hi! I’m using Ubuntu 20.04.2 and I had the exact same situation as fl00rb0ard. This thread really helped me. Particularly this part:

I also managed to get it running from the terminal once I got to the right folder. I had to do one extra cd before the one you said, but once I did that, it worked. I also tried to launch it from outside as indicated, but that didn’t work. I don’t know why, but I’m quite new at Ubuntu too, so I guess I’m probably missing something.

Still, I’m thrilled I managed to get it running. I’ll try now the following steps to see if I can work out the desktop integration part. Thank you both very much!

Hi again! Well, the desktop Icon part worked perfectly and now I can launch Tropy really easily. No problem with that. But I couldn’t get the icons and mime-type registrations to work. I tried several things, following the instructions on the Install file and adapting other suggestions you’ve given in this and other threads, but something seems to be missing.

At first, I got an error that said I didn’t have the permissions to copy into that folder or that the directory didn’t exist (first the one I wanted to copy, then the one I wanted to copy it to). I also tried to manually copy the folders not from the terminal but from the regular file administrator, but I wasn’t sure about the destination folder (as I said, I’m quite new with Ubuntu and I still can’t understand perfectly the different commands in order to interpret them fully).

Finally I changed something in the command (I also made sure I was in the tropy directory when giving the command) and I managed to copy both folders fine (apparently, since I got no error messages in the terminal). Still, the icon of the .tpy file appears the same (a generic file one).

Any clues on what I could try? I know I haven’t been very specific about the “several things” I’ve tried (I forgot to write them down at the moment and now I can’t remember well), so please don’t worry about repeating what you’ve already said before. I’m willing to try everything again.

Thank you very much in advance!

With the caveat that I don’t have a Chromebook for testing, here’s how the mime type registration typically works on Linux:

There is one or more directories on your system where mime type information is stored. Usually there is system-wide information at /usr/share/mime and per-user overrides at ~/.local/share/mime. In these directories you should see a file mime.cache; this is the mime-database file. It is generated or updated with the update-mime-database command. When that command runs, it reads all the mime type configurations present in the various sub-folders.

Tropy already includes the mime type configuration in the resources/mime folder (in Tropy’s installation folder). So basically, what you need to do is copy the contents of that folder into one of the mime-database folders on your computer and then update the database (this often happens automatically after you restart). It’s possible that ~/.local/share/mime is used on your system, but that it simply does not exist by default, so I’d try that first. Something like this:

  • Make sure the folder exists: mkdir -p ~/.local/share
  • Copy Tropy’s mime-type configuration: cp -r /opt/tropy/resources/mime ~/.local/share
    (replace /opt/tropy with your Tropy installation folder!)
  • Run update-mime-database ~/.local/share/mime
  • Check that ~/.local/share/mime/mime.cache exists and also ~/.local/share/mime/packages/application-vnd.tropy.tpy.xml

Icons work similarly. Typically, the system should find them if they are in the appropriate folders in ~/.local/share/icons.

  • cp -r /opt/tropy/resources/icons ~/.local/share should copy the icons
  • Check that ~/.local/share/icons/hicolor/scalable/apps/tropy.svg (that’s just one of the icons that should have been copied over)

Finally, your system finds applications via .desktop files in /usr/share/applications and ~/.local/share/applications. Before you start, open the tropy.desktop file in a text editor and look for the line that starts with Exec=. This is the line that tells your system where to find the application, so it’s important you check where you installed Tropy to. If it is at /opt/tropy then the line should be: Exec=/opt/tropy/tropy %u. Having saved the file, copy it to ~/.local/share/applications and then run update-desktop-database ~/.local/share/applications.

Great! Thank you very much for your time and your detailed explanation! It finally worked!! :clap:

I don’t know if it had anything to do with it or not, but I finally copied the directories from a different installation package (the 1.4.5 release).

This is how it went, in case it’s useful. Just to clarify, I don’t have a Chromebook. I followed this thread because my situation was exactly the same as the one described. But all of this happened in a regular pc with Ubuntu 20.04.2.

I followed all the steps to register the mime-types and they seemed to work on the terminal to create and copy the folders, but when I checked for the file application-vnd.tropy.tpy.xml, like you told me to, I saw it only appeared once, in an alternative installation folder I had downloaded previously: not in the ~/.local/share/mime folder and neither in the installation folder I was using (from the latest release).

When I checked, the file contained in the installation folder I was using had a different name: the folder mime only had the file tropy.xml in it. So I tried repeating the steps, but this time copying the mime folder from the older release package. Then I repeated the same process with the icons folder. I restarted the computer and there it was! The .tpy file I have with the first trial project appeared with the correct icon and it opened with Tropy when I double clicked on it, which didn’t happen before.

I can’t be 100% sure that’s what did the trick. The mime and icons folder from the current release seem to also have been copied correctly (I couldn’t find them at first, but I found them using the locate command in the terminal [I share in case other Ubuntu newbies like me can use the tip]). But it seems that it wasn’t until I copied the files from the previous release package that the whole thing worked for me.

Everything seems to be in place now. Thanks for your dedicated guidance! I’m eager to finally start using Tropy!

Sorry, I mislead you there a little bit: we actually renamed the mime files recently and I gave you the old name above. It’s just the one tropy.xml file now which contains all the mime-type configuration. But the old files are just as fine. My guess is that either would have worked, but you saw the results only after the restart (a lot of this information is cached and refreshed whenever you log in). In any case, good work! I’m glad it’s working now.

Oh, ok! No problem! It still helped me learn some more things in the process! Surely it all worked after restarting, as you say. I had restarted after some of the previous attempts, but maybe I skipped it at some point before the last one that led me to think about the other explanation. Anyhow, thanks for all your help and for your nice words at the end!
All the best!

Dear inukshuk, I did the following instructions and it worked perfectly, thank you very much!

Then I try to follow the instructions in the INSTALL file but it didn’t work… I replaced all the “/opt/tropy” by “tropy” then “/tropy” but nothing hapen and then when I try to copy the file “tropy.desktop” (still with “tropy” instead of “/opt/tropy” it says that “…” is not a directory…
It’s not a big issue because tropy works well but i’d like to have this little icon x)
Could you help me?

Let’s try to do this step by step then. First you moved the Tropy folder to /opt/tropy, right? Let’s make sure that it is there and working. In a Terminal simply launch /opt/tropy/tropy – if this works then Tropy is installed in the right place; if not it’s likely that the folder wasn’t copied there yet.

Hello!
So I did this to launch Tropy and it works well for my Chromebook. All files related to tropy are in “Linux Files” then “tropy” but I just have to indicate “tropy”.

cd tropy
./tropy