• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

How to open a .txt file that I copy from PC to FP2 with UT? [Solved]

Scheduled Pinned Locked Moved Support
14 Posts 5 Posters 960 Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O Offline
      Opolork
      last edited by Opolork 3 Mar 2020, 20:17

      Hi guys.

      I can create a text file with tedit. However, I cannot save it to e.g. the Downloads folder so my PC can access the file. I can make a .txt file with the native file manager app but cannot open it with any program that I know of. I was thinking of copying and pasting the text of a tedit text file into the newly created file in the Downloads folder. Is this doable at the moment?

      Thanks.

      A 1 Reply Last reply 3 Mar 2020, 21:18 Reply Quote 0
      • A Offline
        AppLee @Opolork
        last edited by 3 Mar 2020, 21:18

        @Opolork
        The files created with Tedit can be found there : ~phablet/.local/share/tedit.fulvio/
        You can access it with the file manager and move or copy them wherever you want.

        But if (as your title suggest) you want the other way around, I'm not sure if Tedit can handle it... but I didn't read the code, so maybe.

        A 1 Reply Last reply 4 Mar 2020, 15:03 Reply Quote 2
        • G Offline
          Giiba
          last edited by 3 Mar 2020, 22:49

          Try uText in the store. The interface is a bit awkward, but you can select files to open from the file manager. Works for me at least.

          O 1 Reply Last reply 7 Mar 2020, 14:59 Reply Quote 2
          • A Offline
            adeliepenguin @AppLee
            last edited by 4 Mar 2020, 15:03

            @AppLee said in How to open a .txt file that I copy from PC to FP2 with UT?:

            @Opolork
            The files created with Tedit can be found there : ~phablet/.local/share/tedit.fulvio/
            You can access it with the file manager and move or copy them wherever you want.

            I am doing the same, but mostly from the terminal (copying to/from USB). I took the liberty to create myself a short-cut (~phablet: ln -s /.local/share/tedit.fulvio/ MyTextFiles)

            The file manager (in unlocked mode) displays the symlink "MyTextFiles" as if it was a directory, so you don't have to navigate the full path every time.

            But if (as your title suggest) you want the other way around, I'm not sure if Tedit can handle it... but I didn't read the code, so maybe.

            I have copied many a text file to tedit's directory. From there, it can open them alright (settings icon / open / select a file by touching it / swipe to the left, click the "edit" icon).

            I'm very glad about tedit, it has proven to be really helpful to me. It stores plain text that I can re-use later any time, anywhere. I tried the Note app first, but it's actually storing XML (~phablet/.local/share/com.ubuntu.reminders/); fine for what it is, but not what I need.

            BTW, I got really skilled at using vi with the on-screen keyboard, I don't need any other games. 😉
            (explanation: I'm using "view" aka "vi -R" when I want to read a config file, since "less" seems to mess up the terminal, and "cat" isn't always an option. Maybe I could start using uText for that like @Giiba mentioned. Since the root file system is read-only, no risk messing up.)

            Nexus 5 16.04 OTA-12 stable, PinePhone UBports CE

            O 1 Reply Last reply 7 Mar 2020, 08:16 Reply Quote 2
            • T Offline
              TotalSonic
              last edited by 5 Mar 2020, 23:35

              Both gedit and medit installed in a Libertine container work fairly well in UT as well. You can use the Libertine Tweak Tool in the Open Store to enable better sized gui's for these.

              Best regards,
              Steve Berson

              1 Reply Last reply Reply Quote 1
              • O Offline
                Opolork
                last edited by 7 Mar 2020, 08:12

                Thanks, guys, for the help. I will heed the advice. 🙂

                1 Reply Last reply Reply Quote 0
                • O Offline
                  Opolork @adeliepenguin
                  last edited by Opolork 3 Jul 2020, 09:38 7 Mar 2020, 08:16

                  @adeliepenguin said in How to open a .txt file that I copy from PC to FP2 with UT?:

                  ... I took the liberty to create myself a short-cut (~phablet: ln -s /.local/share/tedit.fulvio/ MyTextFiles) ...

                  Hi adeliepenguin. How do I make a shortcut from the Downloads folder to the tedit text files folder? Would it be something like this?

                  ~phablet: ln -s /.local/share/tedit.fulvio/ /Downloads/MyTextFiles
                  

                  Should I put the link in the Downloads folder or the tedit.fulvio folder?

                  A 1 Reply Last reply 7 Mar 2020, 11:14 Reply Quote 0
                  • A Offline
                    AppLee @Opolork
                    last edited by 7 Mar 2020, 11:14

                    @Opolork said in How to open a .txt file that I copy from PC to FP2 with UT?:

                    Should I put the link in the Downloads folder or the tedit.fulvio folder?

                    I think both are fine. The way you wrote the command is IMHO the safest.

                    And yes a simple ln should do the job.
                    Don't forget the ~ before the paths 😉

                    O 1 Reply Last reply 7 Mar 2020, 14:34 Reply Quote 1
                    • O Offline
                      Opolork @AppLee
                      last edited by 7 Mar 2020, 14:34

                      @AppLee Cheers, AL. 🙂

                      1 Reply Last reply Reply Quote 0
                      • O Offline
                        Opolork
                        last edited by Opolork 3 Jul 2020, 14:53 7 Mar 2020, 14:50

                        So this is correct to be run from the home folder?

                        ln -s ~/.local/share/tedit.fulvio/notes.txt ~/Downloads/notes.txt
                        
                        A 1 Reply Last reply 7 Mar 2020, 17:41 Reply Quote 1
                        • O Offline
                          Opolork
                          last edited by 7 Mar 2020, 14:51

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • O Offline
                            Opolork @Giiba
                            last edited by Opolork 3 Jul 2020, 15:00 7 Mar 2020, 14:59

                            @Giiba said in How to open a .txt file that I copy from PC to FP2 with UT?:

                            Try uText in the store. The interface is a bit awkward, but you can select files to open from the file manager. Works for me at least.

                            Cheers, Giiba. I can open the file manager, then open said .txt file with uText. Nice! 😉

                            1 Reply Last reply Reply Quote 1
                            • A Offline
                              adeliepenguin @Opolork
                              last edited by 7 Mar 2020, 17:41

                              @Opolork said in How to open a .txt file that I copy from PC to FP2 with UT?:

                              So this is correct to be run from the home folder?

                              ln -s ~/.local/share/tedit.fulvio/notes.txt ~/Downloads/notes.txt
                              

                              Yes, that's correct syntax. (I forgot the ~ in my post. And the -s is required if you want a symbolic link like in my example. Without any options, ln on my UT system creates a hard link. That's a different story.)

                              In the terminal, you can look at the result with ls:

                              ls -l ~/Downloads/notes.txt
                              

                              The output shows that notes.txt in the Downloads folder is not a file, but a symbolic link, pointing to your notes.txt file in its original place.

                              Most programs will follow the symlink and access the actual file. File manager does a good job on this. (It lets me open the referenced file with another app, but when I have it delete the symlink, it correctly removes the link only and keeps the file untouched.)

                              However, I'm not sure whether you can access your notes.txt via the PC that way. Exporting only those special folders is a security feature, so following symlinks might be prohibited. Let us know how it turns out.

                              Nexus 5 16.04 OTA-12 stable, PinePhone UBports CE

                              1 Reply Last reply Reply Quote 1
                              • O Offline
                                Opolork
                                last edited by Opolork 3 Aug 2020, 18:31 8 Mar 2020, 15:31

                                I've made a note of the tedit paths and commands and may try it at a later date. Or anyone else can try and post here if they please. 🙂

                                For now, I prefer the uText method as described in my post here: https://forums.ubports.com/topic/3902/how-to-open-a-txt-file-that-i-copy-from-pc-to-fp2-with-ut/12?_=1583692201634

                                Cheers, friends. 👍 👍

                                1 Reply Last reply Reply Quote 0
                                3 out of 14
                                • First post
                                  3/14
                                  Last post