The "Linux questions (and other stuff)" thread


Last Updated:

  1. saptech

    saptech Well-Known Member

    One day at work, using Win7, I was able to encrypt files and offer to give the files their own password to decrypt it. The PC have PGP installed. I guess this is in case the persons you send the files to doesn't have PGP installed.

    Is there a way to do this using KGPG for KDE4? I really don't use encryption much but looking into using it more while at work. I can see how to encrypt files but not give it an individual password.

    Thnx.

    Advertisement
  2. MoodyBlues

    MoodyBlues - Crazy peacock person - Guide

    I haven't looked into any kind of encryption in a long time, so this may not be what you're looking for, but I used to use crypt (a built-in *nix command). It encrypts and requires a password. I used to use it with vi, by invoking vi with the -x argument.

    Have a look and see if it's what you're after:

    man crypt

    And, a little *nix historical tidbit. :) Back in the '80s when I was upgrading the OS at work, we had to prove to SCO that we were in the United States before they'd let us have crypt. I still remember receiving its diskette and man sheets separately, a little while after receiving the rest of the upgrade.
  3. saptech

    saptech Well-Known Member

    I couldn't find Crypt in my distro's repository (Magia 3), but reading more about it, it seems to be an older & outdated encryption program.

    I would have to talk the few people I exchange files with to use PGP, most of them use Windows anyway.

    Thnx.
  4. EarlyMon

    EarlyMon The PearlyMon Moderator

    I haven't seen or used crypt since the 90s on an HP-UX machine. Primitive rotors. :)
  5. palmtree5

    palmtree5 Sunny Vacation Supporter! Moderator

    http://en.m.wikipedia.org/wiki/GNU_Privacy_Guard
  6. saptech

    saptech Well-Known Member

    I think I figured it out. After more research, you have to use CLI commands, using the
    --symmetric flag. The flag is not available for the GUI interfaces.

    gpg --symmetric

    then I think it will ask for a passphrase that will encrypt/decrypt.

    I'm at work so I can't try it out until Wed.
  7. saptech

    saptech Well-Known Member

    I want to import the job's PGP keys to my home computer and when I open Kgpg, it starts to open and then closes out. Using CLI it does the same thing and do not show any type of messages.

    Kgpg open when I used it for the first time, but now I can't get it to open at all. Any ideas/suggestions what may be causing this?

    It will open if I run it as root and I get the icon in the bottom tray. Would it be okay to run it as root and then use it as regular user?

    Good thing I can run gpg from cli as regular user!
  8. EarlyMon

    EarlyMon The PearlyMon Moderator

    Are you getting a /tmp/error-output.txt?

    Is it the old problem of wanting to write to a directory without permission?
  9. palmtree5

    palmtree5 Sunny Vacation Supporter! Moderator

    What DE are you using?
  10. EarlyMon

    EarlyMon The PearlyMon Moderator

  11. saptech

    saptech Well-Known Member

    Thanks everyone for your help. It turns out, it was loading all the time. It is hidden in the system tray!!! Who know where to look when it is hidden? I sure didn't know but found out when I went to an IRC channel.

    I'm more of a Gnome user so using KDE is still new for me.
  12. Mehta23

    Mehta23 Guides Guide

    Is it better/easier/more recommended to use Kubuntu, or ubuntu with the kde bits on?

    And can I use a USB flash drive rather than a dvd ? (after the next post, I assume if I could, I'd have to make it bootable)
  13. MoodyBlues

    MoodyBlues - Crazy peacock person - Guide

    I've done it both ways, just for the fun of it, and I can't really say one way is better than the other. Now, I always do it the Kubuntu way, but if you choose to install Ubuntu first, that's fine. It's just more work, looking for and installing all the K bits.

    My brain is several steps ahead of my fingers. :D

    There are MULTIPLE ways to end up with Kubuntu after installing Ubuntu. One is to use Ubuntu to install the K bits. For example, using Synaptic and/or apt-get and searching for all the K parts you want to install (or NEED to install, as the case may be). But you can also do it by heading over to KDE and grabbing their file, then installing that on top of Ubuntu.

    The easiest method is to simply use the Kubuntu install file. :)

    I've never done that, but I don't see why it wouldn't be possible, as long as you can tell the computer to boot from that drive. Anyone?
  14. palmtree5

    palmtree5 Sunny Vacation Supporter! Moderator

    I've never had issues installing from a usb drive
  15. palmtree5

    palmtree5 Sunny Vacation Supporter! Moderator

    Question to pose here:

    Let's say I have a directory that contains subdirectories that I would like to zip in such a way that each subdirectory has its own zip file. Is there a way to do this with a script? I know I could do this manually but I would rather be able to just run the script

    What I have so far:

    [HIGH]#!/bin/bash
    WORK=/path/to/work/directory
    SUBDIR=$1
    ls -l $WORK/$SUBDIR > ~/listing
    list="cat ~/listing | wc -l"
    for d in $list; do
    zip -r $d.zip $WORK/$SUBDIR/$d
    done[/HIGH]

    Something's obviously wrong with this though as it doesn't do what I want it to do
  16. saptech

    saptech Well-Known Member

  17. MoodyBlues

    MoodyBlues - Crazy peacock person - Guide

    I just slapped something together, but I'm not 100% sure it's exactly what you're after.

    From your snippet, it looks like you want to hard-code the working directory, then at runtime you want to manually enter the name of a subdirectory to zip, correct? Is that actually how you want it? If so...ignore the following!

    This--as it stands right now--has nothing hard-coded, meaning it can be run in any directory, and it automatically finds all of its subdirectories, and zips each one as its own subdirectory-named zip file in its own subdirectory. Obviously, this can be tweaked as far as location of the zipped files, whether or not you enter a directory/subdirectory name, and so on:

    Code (Text):
    1.  
    2. #!/bin/bash
    3. for SUBDIR in `ls -d1 */`
    4. do ZIPFILE=`basename $SUBDIR`
    5. zip -r $SUBDIR$ZIPFILE.zip $SUBDIR
    6. done
    7.  
    Any questions about what's doing what, just ask. :)
    palmtree5 likes this.
  18. palmtree5

    palmtree5 Sunny Vacation Supporter! Moderator

    The way the directories are is my work directory has subdirectories for each section. In those subdirectories are the directories that need to be zipped in such a way that each of those directories is its own zip file. What you gave me works if I was trying to include the entire section in one zip.
  19. MoodyBlues

    MoodyBlues - Crazy peacock person - Guide

    No worries--it can be tweaked. :)

    Do you want to see what you can come up with using my snippet as a start?
    palmtree5 likes this.
  20. palmtree5

    palmtree5 Sunny Vacation Supporter! Moderator

    Got it!

    [HIGH]#!/bin/bash
    SUBDIR=$1
    cd $SUBDIR
    for SUBDIR2 in `ls -d1 ./*`
    do ZIPFILE=`basename $SUBDIR2`
    zip -r $ZIPFILE.zip $SUBDIR2
    done
    [/HIGH]
  21. MoodyBlues

    MoodyBlues - Crazy peacock person - Guide

    Excellent! :D

    There's potential for all sorts of variations. Damn, I love *nix. :)
  22. palmtree5

    palmtree5 Sunny Vacation Supporter! Moderator

    Something I just found out the hard way is this doesn't deal with directories that contain spaces in their names...
  23. MoodyBlues

    MoodyBlues - Crazy peacock person - Guide

    Tsk...tsk...tsk... Spaces in file names. :rolleyes: *sigh*

    :laugh:

    Experiment with quoting/escaping the commands that refer to directories. If you run up against a brick wall, shout! :)
  24. palmtree5

    palmtree5 Sunny Vacation Supporter! Moderator

    That's what I was thinking but I can't seem to get it

Share This Page