Jump to content

jboy

OTW
  • Posts

    2241
  • Joined

  • Last visited

Everything posted by jboy

  1. I believe this will work if you're using KDE: Menu icon (lower left corner of Screen) -> System -> Configuration -> KDE -> Components -> File Associations In the 'Find filename pattern' input box, enter PDF. Then, in the 'Known Types' tree below that you should see only 'applications'. Expand the applications entry and you should see PDF. Click on that, and you will probably see several entries under 'Application Preference Order' (KGhostview, KPDF, etc). Make sure KPDF is the topmost entry, using the Move Up button. I'm not sure if you have to restart KDE; probably not. Then when you click on a hyperlink that's a PDF file, it should be downloaded and automatically opened in KPDF. There may also be ways to have the PDF file opened embedded directly within the Firefox window/tab. For instance, there is a Firefox Extension that "allows you to choose whether you want to view a PDF file inside the browser (as PDF or HTML) or whether you want to download it." You can view the details and download this extension from the Mozilla site at this link. Note: I haven't tried this Extension so I can't comment on how it works. If anyone has tried it or knows of other options, please comment.
  2. Well, I pulled out the old shell programming book and here is a big kludge, but it works (at least for spaces in directory names). alias dnf='OPTIONS=$(ls -aF | tr " " \000 | grep /$) ; select s in $OPTIONS; do cd "`echo $PWD/$s | tr \000 " "`" ; break ; done ' and (version that doesn't show hidden subdirs) alias dn='OPTIONS=$(ls -F | tr " " \000 | grep /$) ; select s in $OPTIONS; do cd "`echo $PWD/$s | tr \000 " "`" ; break ; done ' The kludge is to substitute Octal char \000 for spaces in the directory names display, then to translate \000 back to a space for the cd command. You just have to realize that a \000 char displays instead of a space for those dir names with embedded spaces. Hope that helps. Perhaps someone more experienced in shell programming can suggest a more elegant solution.
  3. I just came across this great shell command tip for easy subdirectory navigation in a terminal, so I thought I'd post it. Here's the source link It lists and numbers all subdirectories at your current location and you just enter the number to cd to that choice. It's like a menu for subdir navigation. alias dnf='OPTIONS=$(ls -aF |grep /$) ; select s in $OPTIONS; do cd $PWD/$s ; break ; done ' The author suggests adding this command to .bashrc There is also a version if you don't want to show hidden subdirs: alias dn='OPTIONS=$(ls -F |grep /$) ; select s in $OPTIONS; do cd $PWD/$s ; break ; done ' A great example of the flexibility and power of shell commands! [moved from Terminal Shell Commands, etc by spinynorman]
  4. Here are three options I am aware of: (1) The 'find' command along with 'grep' can be very useful for this. For example, the following command displays all lines containing 'www-browser' in /etc and its subdirectories and displays the filename on the preceding output line: find /etc -name "*" -type f -exec ls -a {} \; -exec grep -i www-browser {} \; | grep -B1 -i www-browser An example of a couple lines of output is: /etc/X11/Xsession BROWSER=`which www-browser 2> /dev/null` -- /etc/gconf/schemas/desktop_gnome_url_handlers.schemas <default>www-browser %s</default> -- There might be some other, easier, and better ways to do this, but this is one I've used and it works nicely. For example, the following is simpler, but I don't like the output format compared to the above: grep -iHnr www-browser /etc Also, there are two very nice gui search utilities you might want to check into: (2) gnome-search-tool: Click on 'Show more options' and one of the 'Available Options' is 'Contains the text'. (3) kfind: There is a 'Contents' tab where you can specify the text you want to search for, including options like case insenstive.
×
×
  • Create New...