Defaulting a User Mountable (e.g USB /Thumb) Drive in CentOS With exec Privileges

Language butchery by Mr Rich on  26.1.11 @ 11:21

I discovered this tip a few days ago while trying to get a USB drive (where I keep my timekeeping application) working. However I lost the URL that gathered this information from.

Symptoms
  • Drive mounts OK when attached (e. g.: plugged into USB)
  • Cannot execute programs -- even as root.
  • Does not show up in /etc/fstab
  • Shows up on /etc/mtab with noexec mounting options.

Resolution
Caveat: This is a pretty broadsword approach.
  1. When mounted, take a look at the details in /etc/mtab:
    • cat /etc/mtab
    • What you are looking for is the file system type and mounting options.
    • Check out the details (including the options) in the man page for mtab.
  2. In the Gnome Configuration Editor:
    • Find the file system ( /system/storage/default_options/...)
    • Add the following as a high-priority item to the mount_option entry:
      exec
    • Thus, your entry might look like this:
      [exec,shortname=foo,uid=]

 0 comments

Adding Programs to the 'Open With' Diaglog in Gnome

Language butchery by Mr Rich on  ;@ 11:13

(Link in title is a complete dialog on the topic)
  • As superuser, edit:
    • /usr/share/applications/mimeinfo.cache
    • /etc/gnome_defaults.conf or /etc/gnome/defaults.conf
  • As normal user, edit the details in the MimeType section in ~/.local/share/applications/[FOO-PROGRAM].desktop
For ridding yourself of the double entries: http://linux.aldeby.org/get-rid-of-gnome-open-with-duplicate-entries.html

 0 comments

Sun Java Setup Notes on Centos x64

Language butchery by Mr Rich on  24.1.11 @ 09:58

Some notes for the next time I do this:
  1. Find OpenJDK related packages. Take some notes as to what alternatives lists; you'll be setting this up later to point correctly to Sun Java
    yum list installed jre
    yum list installed jdk
    yum list installed gcj
    ll /etc/alternatives/j*
  2. Uninstall OpenJDK related:
    yum remove jre
    yum remove /* other java related packages */
  3. Get the JDK for x_64 from Oracle ( http://www.java.com ); install as root as directed on site.
    Take note of where Java installs to; you'll need it for re-pointing alternatives!
  4. Delete (if necessary) and make a soft link:
    ln -s [location where Java installed] /usr/java/latest
  5. Re-point alternatives (as root):
    /usr/sbin/alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 1
    /usr/sbin/alternatives --install /usr/bin/jarsigner jarsigner /usr/java/latest/bin/jarsigner 1
    /usr/sbin/alternatives --install /etc/alternatives/java java /usr/java/latest/bin/java 1
    /usr/sbin/alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 1
    /usr/sbin/alternatives --install /usr/bin/javadoc javadoc /usr/java/latest/bin/javadoc 1
    /usr/sbin/alternatives --install /usr/bin/javah javah /usr/java/latest/bin/javah 1
    /usr/sbin/alternatives --install /usr/bin/java_sdk java_sdk /usr/java/latest 1
    /usr/sbin/alternatives --install /usr/bin/jre jre /usr/java/latest/jre/ 1
    (... and anything else that needs to be re-pointed from the list step above)
  6. Verify your setup:
    java -version
    javac -version
    ls /etc/alternatives/j*
  7. Setup the browser plugin for Firefox (these directions differ from those on Oracle's site):
    (as root): cd /usr/lib64/mozilla/plugins
    ln -s /usr/java/latest/jre/lib/amd64/libnpjp2.so .
  8. If necessary, you may also need to setup the link to the Java plugin as the user:
    (not super-user): cd ~/.mozilla/plugins
    ln -s /usr/java/latest/jre/lib/amd64/libnpjp2.so .
Finally, you'll probably also want to get the Flash plugin installed for the browser. Adobe has a some funky links on the site (as of this posting anyway), so it takes a bit of rooting around in there to find what you are looking for:
  1. Site where found: http://labs.adobe.com/downloads/flashplayer10_square.html
  2. File desired: flashplayer10_2_p3_64bit_linux_111710.tar.gz
    Make sure you get the 64 bit version! The typical download location on Adobe's site doesn't list the 64 bit version!
  3. As root, unpack the tarball into the mozilla plugin directory (where you created the link for the Java plugin above) and make it executable:
    tar -zxvf flashplayer10_2_p3_64bit_linux_111710.tar.gz -C /usr/lib64/mozilla/plugins
    chmod +x /usr/lib64/mozilla/plugins/libflashplayer.so

 0 comments

This page is powered by Blogger. Isn't yours?