Skip to main content

Posts

Showing posts from 2010

Changing File and Directory Permission en masse.

Running msec on one of my Mageia Linux machines turned up a number of world-writable files. These are potential security problems, especially on a machine that faces the Internet. The obvious solution was to use chmod to remove any world writable permissions. But there's the problem. The chmod command has a recursive directive, -R , that would work except that it would change permissions on the directories as well. After all in *NIX, all directories are files. Thanks to my friends at TWUUG , I discovered that the find command, used with its -exec directive could accomplish what I wanted. find /xxx -type f -exec chmod o=-w {} + ; Breaking this down: find - the find command itself. Depending on what files you are modifying, you may need to be root. /xxx - the path to where the files are located. -type f - this tells find to look for files; type d would tell it to look for directories. -exec - this directive tells find to execute the command that follows, in

Going Postal with Postal2

I have always enjoyed computer games that are out of the ordinary. Postal2 by Running With Scissors is certainly that. It is both amusing and offensive in a very politically incorrect way, featuring Gary Coleman, the Taliban and dead cow heads. At postal2.maximumhoyt.com , I am in the process of documenting how to install and run the game on a Linux computer as well as run the win32-only 1409X version of the dedicated Postal2 server. The site is also providing me with experience in site development using SSI ( Server Side Includes ) and Cascading Style Sheets ( CSS ). UPDATE I have no made any progress other than to realize that the 1409X version can only run well under MS Windows, so it looks like a VirtualBox WindowsXP instance would do the trick, but my webserver lacks the computing power to do that, so it looks like I'm waiting on a hardware upgrade to move forward.

A screen-like command for X applications

The screen command has been very useful for running programs on remote machines because you can detach the sessions and log out of the remote machine and the application is still running remotely. It would be nice to do that with a graphical application since you can connect to a remote graphical application via X or VNC or similar applications, any graphical application terminates when you close the session. That's changed with xpra . Connecting to an X server (the special Xvfb server, basically an X server minus any video drivers so it can run on a headless computer -- yes, X with no video card) as a compositing window manager on the remote computer allowing you to log in later (even from a third computer), re-attach the session and the program is still running. The parent project that includes xpra is partiwm , a tiling window manager. The current version of xpra has many enhancements from the version originally reported here. Compiling and Installing on Mandriv

Mandriva InstantOn

Mandriva InstantOn is a variant of their main distro based on their commercial product named "Mini". InstantOn is a boot-in-20-seconds minimalist Mandriva 2010.0-based distro aimed at providing a few applications (web browser, email, Skype, instant messaging, video and pictures) with a simple interface (just a few icons to single-click on). The InstantOn iso image is an install image which can be transferred to a flash drive or a CD, whichever you prefer to boot from. It will install itself by default into a 1.8GB partition # 1 that it will create on your hard drive. You may choose to use custom partitioning or use the existing partitions. To gain admin access in InstantOn, click on the Multimedia icon, then the Home icon. Navigate to /usr/bin and click on the xterm icon. "su" to root: the password is "mini". To add software, use vi to edit /etc/mandriva-release to Mandriva Linux release 2010.0 (Official) for i586 , then add the 2010.0 reposit

Managing /etc/alternatives (Updated 2019-11-09)

A number of applications are configured by default to invoke the sendmail application to send mail messages. Sendmail is, of course, the iconic UNIX command to send mail. But in many cases, sendmail is overkill and most systems provide a default lightweight command, /bin/mail , that can be used instead. Another alternative is ssmtp . There are alternative applications for many standard applications. After all, what UNIX programmer can't think of a better or different way of doing something? But how is that choice of alternatives easily managed on a Linux system? In the old days, the sysadmin installed the alternative application and created a symlink to the alternative application in place of the expected default application, for example symlinking /bin/mail to /usr/bin/sendmail . But the update-alternatives method provides better control, in theory at least. My problem was that the default installation of Mageia does not provide such a choice. I filed a bug report abou

Dirty Stacey Needs Registry Cleaner 5.4

I write this blog to keep track of things that interest me. I don't expect anybody to ever read it and, based on the volume of comments left here, nobody does. That, or I've nailed the subject so well that there is just nothing left to say about it. Well, imagine my surprise when I got an email message from the lovely Stacy Jeanne, a Tech Writer (it's in caps, so it must be a real job Mom!) with Digeus, Inc [sic] (that notation is there because the Editor for Digeus, Inc. was out at the moment and did not have the opportunity to correct Ms. Jeanne's egregious punctuation error). Here's what our paragon of tech writing had to say: Could you please write a short review or place a link bellow (sic) to Digeus Registry Cleaner 5.4.49596 on your blog? I will give you a full-time license in exchange. (emphasis added) Registry Cleaner You may place this link alone without description or on existing post or create new post with a short description (language and t

Quake2 in a Browser in Mandriva 2010

Slashdot ran a story about getting Quake2 running in a browser windows. That is very cool. There were installation instruction at quake2-gwt-port except the instructions were not for "Linux" but only for Linux distros that provide apt-get (probably Ubuntu). That is not cool at all. While it would have been possible for them to write their HOWTO instructions in a generic way (provide a list of all dependencies, provide links to source code for needed apps not included in every Linux distro, etc.), they just assumed that everybody uses Ubuntu. Bad. Bad. Bad. Here's what I needed to do to get it compiled and installed on my Mandriva 2010 system. Read those Ubuntu-ed instructions first for the details. You should be using sudo to run commands that need root privileges. (All the following commands are written on one line even if they appear to be on multiple lines.) $ sudo urpmi mercurial ant gcj-tools javacc lame vorbis-tools URPMI asked, and I told it to insta

Better Font Viewing for Firefox, Gtk, KDE, Linux

The best font-viewing experience occurs when the patented (by Apple) Bytecode Interpreter is enabled. Due to licensing restrictions until May 2010, it's not possible for many distros to ship it enabled, but it is perfectly permissible for you as an individual to enable it and use it. Since May 2010 , distros have been enabling it by default Better fonts also help. Install the webcore fonts from here which include the Tahoma and Veranda fonts that were specifically designed to look good in browsers. There are FireFox tweaks that help it look better by changing these values in about:config, or by directly editing your prefs.js file . For better rendering of fonts: user_pref("font.FreeType2.autohinted", true);   user_pref("font.FreeType2.enable", true);   user_pref("font.FreeType2.printing", true);   user_pref("font.FreeType2.unhinted", true); user_pref("font.freetype2.shared-library","libfreetype.so.6");

Sluggish Firefox Browser in Linux

Discussions suggest that a lot of Firefox 's sluggishness on Linux (as compared to Windows) is due to Intel compiler profiling (maybe, but GCC offers profiling ), compiler cpu optimizations ( i386 vs. i686 -- not so much anymore; Mandriva compiles Firefox for i586 - see BONUS at the end) and Linux's use of pango , a library for laying out and rendering text with an emphasis on internationalization (likely a cause of slowness). Let's get rid of Pango support first. This is easily done by editing your .bashrc file and adding at the end   export MOZ_DISABLE_PANGO=1   Resource your .bashrc with $ source .bashrc You could also put the line of export code in .bash_profile. Then just re-start Firefox to get the benefit. Short of recompiling Firefox ( which appears to be a daunting task ), we have found something that helps if you have RAM available. The trick is to keep the disk cache in /dev/shm , a POSIX-compliant temporary filesystem ( tmpfs ). Let's us

Kernel Mode Setting with the Intel Driver

My HP 1120NR  uses the Mobile 945GME Express Integrated Graphics Controller and my Acer Aspire 5315 uses the‎ Mobile GM965/GL960 Integrated Graphics Controller, both of which use the  0915 video driver. This means that I can use kernel modesetting . This is how: In /boot/grub/menu.lst , delete any vga= entries. Add i915.modeset=1 Reboot. Check to see if modesetting is enabled by looking for a value of modeset : 1 when you run the command get_module i915 I also added the file /etc/modprobe.d/i915.conf that contains the following: options i915 gem_enable=1 options i915 modeset=1 options i915 fbpercrt=0 options i915 fastboot=1 The first line enables the GEM option. From here , "To [dis-]able GEM, just replace [1 with 0]. Users should try to disable GEM "when slow 3D performance is noticed and when the Xorg.log makes reference to problems enabling tiling due to it being rejected by the kernel" ." Mandriva disables GEM automatically for i8xx har

Adding Editors to GQView

GQView is an image browser that can easily be configured to use external applicatin to extend its functionality. In "Edit > Preferences > Editors" there are ten entries that can be used to identify and enter the command strings. GQView provides a few macros to assist you: Macro Description %f Inserts list of selected files, may occur only once. %p Command is executed once for each selected file, may occur multiple times. %v Display result of the command in an output window, must occur as the first two characters. %V Displays output window when multiple files are selected. Make Mirror Images By default, Editors 9 and 10 allow you to rotate jpeg images clockwise or counterclockwise using the jpegtran application, part of the jpeg tools . It would be nice to also flip the images to a mirror image. Add to, for example, Editor 8: Mirror Image %vif jpegtran -flip horizontal -copy all -outfile %p_tmp %p; then mv %p_tmp %p;else rm %p_tmp;fi A