The "Linux questions (and other stuff)" thread


  1. Dngrsone

    Dngrsone Well-Known Member

    ... works if I have a terminal open, but the point of this exercise is to not open a terminal manually.




    Now that I have an internet connection, I can do a little research.

    How about this:

    Code (Text):
    1.  
    2. #!/bin/bash
    3. # call tethering software
    4. keylink
    5. # identify Process ID
    6. declare -i PID=$!
    7. # call Firefox instance (Tether is the profile name)
    8. firefox -no-remote -P Tether
    9. # once firefox terminates, kill the saved process
    10. ps -p ${PID} | fgrep keylink && kill ${PID}
    11.  
    12.  
  2. MoodyBlues

    MoodyBlues - Crazy peacock person - Guide

    Oops. I didn't even notice klink; just looked it up and see that it's an Android app for tethering without root. My phone allows me to do that anyway, so I've never looked for an app. (Not that it matters--since I get *ZERO BARS* at my house. :mad:)

    How do you normally terminate klink? If you're doing everything manually at a prompt, what's its sequence?
  3. Dngrsone

    Dngrsone Well-Known Member

    I hear that I get two bars at home, one or none at work-- I work in one of the many low-reception areas in town, which Sprint has decided need not get any upgrades in service, and the steel building I work in certainly doesn't help matters much.

    But if I place the phone in just the right place (and plug it into the charger), I can get enough reception to move a tiny bit of data.

    Anyway, klink is just a call-- right now, I open a terminal, invoke klink, and go running. When I am done, I ctrl-C and close the terminal.
  4. jonbanjo

    jonbanjo Well-Known Member

    I don't know.

    If it doesn't work and provided you have no instances of keylink that you want to keep alive, you could try killall keylink.
  5. Dngrsone

    Dngrsone Well-Known Member

    Okay, with a little research, some trial, a touch of error; this is the script I am running now:

    Code (Text):
    1. #!/bin/bash
    2. # call tethering software
    3. klink &
    4. # identify Process ID
    5. declare -i PID=$!
    6. # call Firefox instance
    7. firefox -no-remote -P Tether
    8. # once Firefox terminates, kill the saved process
    9. ps -p ${PID}|fgrep klink && kill ${PID}
    MoodyBlues likes this.
  6. MoodyBlues

    MoodyBlues - Crazy peacock person - Guide

    Looks good, and thanks for posting it.

    I was going to play with it here, but klink showed that it's incompatible with all my devices. :confused: :mad:
  7. MoodyBlues

    MoodyBlues - Crazy peacock person - Guide

    AT&T says that I should have *GREAT* reception here at my house. But I don't! And their ads annoy me. :mad:

    Reminds me of the Bundys and what they had to do in order to watch Fox. :laugh: :rofl: (Anyone not a Married...with Children fan, never mind. :D)
  8. Dngrsone

    Dngrsone Well-Known Member

    That sucks... then again, it took me a while to find something that did work with my phone.

    By the way... I launch the script (got to make it executable, of course) by using a desktop launcher with ./tether (the script name), which eliminates the whole 'ask before launching scripts' dialog problem.

    Got to start klink on the phone first, and Firefox can actually come up before klink establishes the connection, but those are minor details.
  9. jonbanjo

    jonbanjo Well-Known Member

    Glad its working.

    I had a "fun" with an init scripts for my Raspberry Pi and in the end resorted to killall to terminate the program. The XPL Hub I'm using starts a couple of new processes and then exits so the pid you grab is for a process that has already closed.
  10. saptech

    saptech Well-Known Member

    I'm not sure if I asked this once before, the thread has gotten big and I can't seem to find it.

    Using Mageia 3, KDE 4.10, when I plug my Nikon S3300 camera into the USB 2.0 port, the device notifier picks it up but Dolphin doesn't. Digikam picks it up also, but Gwenview doesn't.

    Any idea why it's not being picked up by Dolphin?

    Thnx.
  11. MoodyBlues

    MoodyBlues - Crazy peacock person - Guide

    Any Dropbox users here? I just started an account and I'm wondering about a few things.

    I set up its directory in $HOME, i.e., ~/Dropbox. From the [admittedly extremely little] reading I did, it seems that you're supposed to place directories *IN* your DB directory in order to have them sync. In their terminology, you 'drag and drop your files here.' But when I tried that--using DB's interface--it MOVED the files and/or directories. Um...that's neither desirable nor workable for me.

    So my first question is, is that correct? Is that the idea? For example, let's say I have a ~/whatever subdirectory, is it now supposed to be ~/Dropbox/whatever? Or my /data/mail/[account1], /data/mail/[account2], etc., directories...are they supposed to be moved into the DB directory? ~/Dropbox/mail/[account1], ~/Dropbox/mail/[account2], etc.? That won't work.

    So my next choice seems to be copying files/directories into the DB directory. But I don't want double the space taken up for each item.

    Okay, so since it's *nix, how about symbolic links? I can link things there, and that seems okay, but I'm just not sure...about any of it right now. (And let me add my normal [recent] disclaimer: I'm doing this on virtually no sleep. My brain hurts from straining so hard just to remember what day it is. If anyone knows, kindly clue me in. :))
  12. jonbanjo

    jonbanjo Well-Known Member

    I'd guess the device needs to be mounted before you can use browse it with Dolphin.

    With my OpenSuse 12.3/KDE 10.5, my Pentax K-50 is detected by Device Notifier as a Storage Volume. The notifier offers me 3 options: Open with FileManager (which is Dolphin), Download photos with Digicam and Download photos with GwenView. I just choose from there.

    Actions can be edited and added to notifier via System Settings/Hardware/Device Actions. The command it is using on my system to open Dolphin is kioclient exec %25f.
  13. EarlyMon

    EarlyMon The PearlyMon Moderator

    Dropbox ought to behave like a USB stick - if files were moved rather than copied then it would seem your ~/Dropbox is just a local directory, not actually your Dropbox.

    You don't link things there - it's a separate cloud service specifically for copying.

    Did you - https://www.dropbox.com/install?os=lnx

    Make sure that the Dropbox daemon is running.

    Confirm actions using the web interface to help debug.
  14. palmtree5

    palmtree5 Sunny Vacation Supporter! Moderator

    I can tell you it works for me, although I'm using a systemd service that I wrote to copy a folder to the Dropbox folder
  15. MoodyBlues

    MoodyBlues - Crazy peacock person - Guide

    When I use DB's interface (and do the drag and drop thing), there is no 'copy' choice; it moves whatever I'm dragging/dropping. But, immediately checking my account via web browser, the files are there. (As in really there--I've verified that by downloading some from another computer or phone.)

    But 'make link' is one of the options within its interface (right-clicking on an item brings it up). And when I 'make link' and then drop the link into the DB directory, and then check online, the files are there. THERE there. (As above, I tested by downloading on a different device.)

    Yes.

    Yes, it definitely is. I'm looking at its cool little icon right now. :)

    That's what I've been doing, but for some reason I just have doubts. :confused:
  16. EarlyMon

    EarlyMon The PearlyMon Moderator

    Wth then. :( :dontknow:
  17. MoodyBlues

    MoodyBlues - Crazy peacock person - Guide

    Did it ever work? Or has it always been like this? It sounds like Dolphin and Gwenview aren't associated with it as options.

    Do you have a card reader? If so, what happens if you put the camera's card in the computer?

    FWIW, I never actually use the cables that came with my Nikons, but both the D40 and D5100 yield the expected three choices when I put their cards in a computer.
  18. MoodyBlues

    MoodyBlues - Crazy peacock person - Guide

    I know! :confused: If you have its GUI, give it a try! And report back, of course. :)
  19. Dngrsone

    Dngrsone Well-Known Member

    I'm not sure I understand the problem, Moody... the magic behind the scenes is doing what it is supposed to be doing, right?
  20. EarlyMon

    EarlyMon The PearlyMon Moderator

    No, drag and drop to Dropbox on other platforms, and what you expect from a cloud disk, is to copy.

    She's reporting a move - copy then delete source.

    Unless I'm reading that wrong.
    MoodyBlues likes this.
  21. MoodyBlues

    MoodyBlues - Crazy peacock person - Guide

    Yes and no.

    If you go back and look at what I posted originally, you'll see that my choices seem to be moving directories into my DB directory, which is not workable for me, or copying things into my DB directory, which is not acceptable because that means double the [local] disk space, or linking things. All of these leave me wondering if this is how it's actually supposed to work. :confused:

    But, yes, if they're in my DB directory, they are being synced with my online DB account.
  22. EarlyMon

    EarlyMon The PearlyMon Moderator

    OK, now I'm confused - or, unconfused.

    It sounds like it IS working correctly as described.
  23. MoodyBlues

    MoodyBlues - Crazy peacock person - Guide

    No, you're correct. It's definitely a move.

    It threw me because of Dolphin's behavior. With Dolphin, if you drag a file/directory to another location, it'll prompt with four choices: move, copy, link, cancel. So when I plunged in with DB's GUI, and dragged/dropped a directory into it, I was shocked that it [silently and without choice] MOVED the sucker. :eek:
  24. EarlyMon

    EarlyMon The PearlyMon Moderator

    Yeah, the daemon wants to sync with a known location. So a move there prevents duplication.

    Do you have Dropbox mounted? As in /mnt/Dropbox?
  25. MoodyBlues

    MoodyBlues - Crazy peacock person - Guide

    But, see, this is [part of] what's bothering me. I have all my directories and subdirectories mapped out the way I want them. And I don't want them relocated to ~/Dropbox.

    No. Should I?! In the very little reading I did, I don't recall seeing any mention of that. The only things I have mounted in /mnt are my other computers' hard drives.
Loading...

Share This Page