How to get rid of the annoying blue shadow in KDE 4

I vowed to switch to KDE after trying for a few months to find an alternative to Gnome 2, which is going the way of the Dodo. I ran into two problems initially. The system sounds were distorting and I hated the annoying blue shadow on active windows.

The fix for the first problem came when I installed the phonon gstreamer backend, though I’m not sure this was exactly the fix as I never switched to that backend in the settings.

To fix the annoying blue shadow, go to System Settings -> Workspace appearance -> Window Decorations. Click on the Oxygen theme and then click “Configure Decoration”. Click the Shadows tab and change the colors under “Active Window Glow”. I made my inner color a dark grey and the outer color black. I like this a lot better than the bright blue.

,

No Comments

Screw you Desktop Environments, I’m installing KDE

Many years ago I used KDE as my main Linux desktop environment. I switched to gnome around the same time that I switched to Debian and later Ubuntu. I liked GTK themes. I liked Gnome’s way of keeping the visual simple and found that it was much more solid than KDE, especially KDE version 4+. I’ve lived in a Gnome utopia for quite some time, and I loved it.

Now, we have Gnome 3 and Unity. XFCE4 is a good alternative but it just isn’t Gnome 2. Rather than battle it any longer and continue my search for a Gnome 2 alternative. I’m switching back to KDE. I don’t care if I hate it. At least they aren’t trying this whole unification approach that is killing the desktop in Linux on many distributions.

So far, LinuxMint has been the only distribution I’ve found that had a decent Gnome 3 setup by default, and it has some freakish glitch with my ATI video card that appears to make it reset itself from time to time. It just acts really flaky.

So, I’m installing the kde-full package in Debian Wheezy right now and crossing my fingers for a better experience.

, ,

No Comments

Mount Samba/Windows/CIFS Share with User Read/Write Permissions

Mounting a Windows/SMB/CIFS share can be accomplished in many different ways. The way that I do it works best for me, and I’m presenting it here for anyone who wants to take advantage of the info.

I have a NAS device with Windows shares on IP 192.168.1.90 on my LAN. One of the shares is called “Docs” which I use for important documents. First I create a directory to mount the share to on my local machine. I put this in my /media directory.

1
sudo mkdir /media/Docs

Note that I’m using Debian Wheezy as my distro, but all of this should work in any distro.

Next I add a line to my /etc/fstab file. It can go at the bottom of the file. So, open /etc/fstab in your favorite editor. I’m using vim.

1
sudo vim /etc/fstab

The line I add for the share is:

1
\\192.168.1.90\Docs   /media/Docs cifs username=myuser,password=mypassword,uid=myuser,gid=users,auto 0 0

I set “myuser” to my actual local username. The reason I’m setting the uid in this line is because I want to specify that my user will be the owner of the mounted share (giving me read and write), and I’m setting the gid to users because I want all other users on the local machine to have read access to the mount.

After saving the file, I can sudo mount /media/Docs and I’ll have my mount available for my user. When the system reboots, the mount will automatically occur. So my user will have access to the mount directly after boot.

An optional, more secure way to do this is to put your username and password in a file somewhere (perhaps your home directory) and replace the “username=myuser,password=mypassword” part of the mount line with “credentials=/path/to/file”. This will help keep your passwords safe. Also note that these credentials aren’t your local user credentials necessarily. They can be the same, if you set your local user up with the same creds as the share, but these credentials should be the user information that gets you access to the share.

, , , ,

No Comments

How to play a Bluray movie in Debian Testing

This HOWTO will probably work in Debian Squeeze, but the system I used was running Wheezy. Hopefully this HOWTO won’t be necessary long, but until then, it’s a very good way to watch blurays on your Linux system. This will also work for Mac and Windows, with some changes, but this is strictly a Debian Testing HOWTO.

There are various ways to do what we need to do. Some require you to rip the bluray first and then watch the resulting MKV. I found that this took 15 minutes or so on my 8-core system. However, there is another method which uses a program called makemkv and pipes the output to VLC using a network stream. I found this method on the web but found that some of the links were screwed up, so I couldn’t use it directly. After some searching, I found the script I was looking for and edited it slightly. For your convenience, I’m rewriting the HOWTO and including the files all here.

First of all, create a folder called makemkv in your home directory. You can use a different location if you prefer but for simplicity we’ll put it in our home directory.

mkdir ~/makemkv

Change into that directory and grab two zipped tarballs from the makemkv author. Then extract them.

cd ~/makemkv
wget http://www.makemkv.com/download/makemkv_v1.7.2_bin.tar.gz
wget http://www.makemkv.com/download/makemkv_v1.7.2_oss.tar.gz
tar xvf makemkv_v1.7.2_bin.tar.gz
tar xvf makemkv_v1.7.2_oss.tar.gz

Yes you need both the bin and the src.

Make sure you have some dependencies.

sudo apt-get install build-essential libc6-dev libssl-dev libgl1-mesa-dev libqt4-dev curl vlc

In other HOWTOs, the curl dependency isn’t mentioned. You need curl for the script we will download later.

Next compile and installed the two packages.

cd makemkv_v1.6.12_oss
make -f makefile.linux
sudo make -f makefile.linux install
cd ../makemkv_v1.6.12_bin
make -f makefile.linux
sudo make -f makefile.linux install

Finally download and run playBluRay.sh. I gzipped it so the site wouldn’t complain about the file type. Just gunzip it and execute it.

It will run makemkvcon to decrypt the bluray and setup a stream on port 51000 of your computer. Then it will start vlc using the network stream. It may take a few moments to load it all.

Note that sometimes a bluray won’t play correctly even with this method or you may see a behind the scenes segment before the movie. I had this problem on my Rambo bluray.

, , ,

1 Comment

My Latest Computer Build

I just ordered the parts for what will be my newest main desktop. I decided to go with an AMD processor this time around. My current desktop has a Intel Core 2 Quad Q6600 which is a quad-core process running at 2.4ghz. I’ve had this quad-core for about three years and it still has a lot of life in it. I’ll be giving it to my son. This current system also has 8gb of RAM. My new system will have 16gb. The AMD process I went with for the new build is an FX-8150 eight core running at 3.6ghz. It’s supposed to be a very good process, though I’ve read some reviews that claim it bottlenecks games.

Even though I’m getting into game development, I don’t play a lot of the mainstream games and time to time I try to Review no deposit slots. Most are first-person shooters, and I’ve grown tired of that genre. I do play some FPS on the PS3 from time to time, but about the only games I play on the PC are Minecraft, Portal, and the occasional Empire Earth I/II. I’ve been using Windows 7 on my main desktop for quite some time and my new build will be Linux all the way. I venture into Windows from time to time to play Portal and Empire Earth, but I’ve decided that Windows uses way too much of my hard drive. I have a 128gb SSD as my main drive and this just isn’t enough for Windows these days. It’s plenty for Linux, however, as I’ll be using network shares for most of my saves and using the SSD for the OS only. I detest platter hard drives unless they are in a hardware RAID configuration because I’ve lost about ten of them in the past five years. I have terrible luck with mechanical hard drives.

At any rate, I bought a pretty nice system for around $660 after shipping. I’ll be using it for rendering some 3D work I’ll be doing as practice for my game development endeavor. Hopefully the 8-core CPU will shine when it comes to this type of work. Here is a list of the components that I bought:

Antec Three Hundred Gaming Case External 3 X 5.25; Internal 6 X 3.5 2*Usb2.0

ASRock 970 EXTREME3 AMD 970 & SB950 ATX DDR3 800 AMD – AM3+ Motherboard

Rosewill RG630-S12 630-Watt Green Series 80 PLUS Certified, Single 12V Rail Power Supply Compatible with Intel Core i7 and Core i5

AMD FX-8150 FX 8-Core Black Edition Processor (FD8150FRGUBOX)

G.skill Ripjaws X Series 16gb (4 X 4gb) 240-pin Ddr3 Sdram Ddr3 1600 (Pc3 12800) Desktop Memory Model F3-12800cl9q-16gbxl

Lite-On IHBS112-04 12X Internal Blu-ray Writer(Black), Bulk w/o Software

It should be noted that I didn’t get a video card because I have a few spare AMD/ATI cards (though I really prefer nVidia). I plan to use my AMD HD6950 in this new computer. I also don’t have a hard drive listed in this build because I will be using my current SSD along with a NAS and a rack mount server which has a nice RAID as well. That’s the one good thing about having all this extra computer equipment laying around. New builds are usually pretty cheap because I usually reuse at least a few components. A comparable computer with the same components would run me well over $1000. I would guestimate that it would cost at least $1500 with the same specs.

, , ,

No Comments

Increasing the size of tmpDSK and /tmp in a CPanel Environment

I recently ran into an issue in cPanel after recompiling Apache with some new settings. I enabled the eAccelerator extension in my EasyApache configuration for PHP. Now cPanel uses a default size for its /tmp mount of 512mb. I found out rather quickly that this isn’t enough for eAccelerator. I actually ended up resetting this value to 4096mb (4GB). As a reminder to myself and so anyone else looking for the solution to this problem, I will outline what needs to be done below.

First, ssh into your server and login as root or su – root after logging in as a regular user. Now use the power of the command line. Don’t panic!

Stop Apache, MySQL, and cPanel

1
2
3
service httpd stop
service mysql stop
service cpanel stop

Next unmount the existing /tmp

1
umount -l /tmp

Remove /usr/tmpDSK

1
rm -rf /usr/tmpDSK

Next, use your favorite editor (Vim in this example) to change the config file for the tmpDSK

1
vim /scripts/securetmp

Search the file for “tmpdsksize” (in Vim type /tmpdsksize and hit enter). The line should look like this by default:

1
my $tmpdsksize     = 512000;    # Must be larger than 250000

Change the 512000 to a higher number in Kilobytes. For my 4GB, I changed it to 4096000.
Save the file (vim :wq enter).
Run the script…

1
/scripts/securetmp

Answer y to the two questions it asks.
Finally start your services back up.

1
2
3
service httpd start
service mysql start
service cpanel start

That should have you set with more /tmp space.

, , , ,

No Comments

Marte Engine Define() and Check()

I’m not very fond of the way that Marte Engine’s Input checking occurs. It simplifies things a bit in one area and complicates things in all other areas. The simplification comes from the fact that one can list all the keys for a given action in the listener definition (define(“name”, keys…), and that is pretty helpful.

However there’s something I don’t really care for when it comes to the way Marte Engine handles keyboard input, namely, it’s too fast. The key repeat becomes an issue when working with things like menus.

Disclaimer: I’m far from being a Java or game development guru. I’m merely pointing out that I ran into this issue. There could very well be a work-around for this within the Marte engine itself. I ran into this problem while trying to implement a main menu for a test game I was working on. When I would push a button, the menu selection cursor would jump to the bottom of the menu, which isn’t at all what I wanted it to do.

The believe the reason for this is that the input definitions one can make with a define() method are set to handle only KeyDown events, while I needed a KeyPressed event. Since I could find no other way to force it to use a keypress instead of a keydown, I decided to remove my input event definitions and use a standard check on the input to see if a certain button has been pressed (down and released). This solved my issue with the key events. Now my menu cursor performs as expected.

, , ,

No Comments

Marte Engine TextEntity setColor()

I’ve been focusing on learning Java game development over the last couple of weeks. I’ve found that lwjgl, Slick2d, and Marte Engine are great libraries to help with the basic game functionality. In fact, they take a lot of the work out of it and leave you to focus on the game design itself. For instance, the Marte engine comes with a great resource manager class that helps keep up with images, sounds, and spritesheets for your game. Marte also has some good classes which extend Slick2D’s Entity class which can be very useful.

The one I’m going to focus on is TextEntity, which is great for adding text to the screen. However, I was unable to change the text color for the text directly using the setColor() method from the Entity class, which is inherited by TextEntity. There’s not a lot of documentation for either Slick2D or Marte, so I wasn’t exactly sure if I was missing something or if I had found a problem with the class.

Fixing the problem is rather simple. I created a new class called MyText and copied everything over from the TextEntity class. I could have extended it, but instead I wanted a new class which extends Entity directly. Then I changed the code in the render() method as such:

1
2
3
4
5
6
7
8
9
10
11
public void render(GameContainer container, Graphics g)	throws SlickException {
	if (font == null) {
		font = container.getDefaultFont();
		this.calculateHitBox();
	}
	g.setFont(font);
	if (text != null) {
		g.setColor(this.getColor());
		g.drawString(text, x, y);
        }
}

I then added a new constructor that takes a color as the fifth parameter:

1
2
3
4
5
6
public MyText(float x, float y, Font font, String text, Color color) {
	super(x,y);
	this.setColor(color);
	this.font = font;
	this.setText(text);
}

This gave me the functionality I was after. This change basically just sets the graphics object color property to the Entity’s color property, which is exactly how I thought it should have worked to begin with.

If there’s a better way to accomplish this, let me know. I’m only intermediate with Java.

No Comments

Adding Slick 2D and lwjgl to Eclipse Project

I spent some time today trying to get Slick and the light-weight java game library setup correctly in Eclipse. The tutorial I was watching was in Netbeans and I was very unfamiliar with adding libraries to a Java project in Eclipse (very familiar now). I’m going to go over how to do this as an overview, mainly just to remind me how to do it later hehe. It may also be of use to others who don’t need a step by step picture guide of the process. So, here goes!

  1. Create a new project in Eclipse
  2. Right-click the project and choose New -> Folder (call it “lib”)
  3. Right-click the lib folder and choose Import… then General -> File System
  4. Browse to your slick folder and choose the slick.jar and the lwjgl.jar files.
  5. Right-click on the project and choose Properties
  6. Choose “Java Build Path” and click the “Libraries” tab
  7. Click “Add Jars”. It will show a tree of your project. Expand it till you see your lib folder. Expand it. Select the two jars (utilize shift for multiple selection). Click OK.
  8. Click OK again to go out to the workspace.
  9. Right-click on the lib folder and Import again. This time use “Archive File” instead of “File System”. Click Next.
  10. Browse to your slick lib folder and find “natives-win32.jar”. Click open.
  11. It will list some dlls on the right column. Make sure they are all checked and click finish.
  12. Repeat steps 9-11 and add the natives for mac and linux the same way if you want them.
  13. Now you need to add those natives to lwjgl. So…
  14. Right-click on the project and choose properties.
  15. In the Java Build Path -> Libraries tab, expand lwjgw.jar and click on Native library location.
  16. Click Edit. Click Workspace. Navigate to the lib folder, choose it, and click OK.
  17. NOW ALMOST THERE!
  18. Back in the Java Build Path -> Libraries, expand slick.jar. Click JavaDoc location.
  19. Click Edit. Set the javadoc location path to the location of the slick\javadoc folder.

Step 20… Add a class to your project and see if it will compile correctly. Here’s an example for testing.

GameTest.java

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;
 
public class Game extends BasicGame {
	public Game(String title) { super(title); }
 
	public static void main(String[] args) throws SlickException {
		AppGameContainer app = new AppGameContainer(new Game("Test Game"));
		app.start();
	}
 
	@Override
	public void render(GameContainer container, Graphics g)	throws SlickException {
		g.drawString("Hello, World!", 0, 100);
	}
 
	@Override
	public void init(GameContainer container) throws SlickException {
 
	}
 
	@Override
	public void update(GameContainer container, int delta) throws SlickException {
 
	}
}

, , , ,

2 Comments

Linux Desktop UI Options

I’m detest the current path of the Linux desktop. There are reasons that the desktop environment programmers and the distribution makers have taken the path they are on, but I disagree with those reasons. Their reasoning involves unifying the user interface for desktops, laptops, tablets, and other mobile devices.

The main problem I see with that reasoning is that they are hurting the desktop environment in the process, and the desktop/laptop is the only place their products have a future. There’s no need for a revamping of the desktop interface to make it more like a mobile device’s interface. The tablet/phone interfaces are designed for multi-touch interaction from the user. THE ADVANTAGE of a DESKTOP is having a good keyboard and mouse. The desktop UI is designed for superior input methods. Mult-touch is cool and all, but it is designed to give mobile devices an interface to mimic what you can already do on the desktop and laptop with the keyboard and mouse. Multi-touch on a desktop is cool, but it has only been implemented on OS X on Macs, and they didn’t change the actual interface itself to accomplish this. They just added multi-touch capability to the UI that was already there.

I could see good reason to make this change to the default Linux user interface if the distributions were going to be used primarily on mobile devices. BUT they aren’t. The mobile market has two very strong operating systems. Those are iOS and Android. Android is Linux itself, but its user interface is perfect for a mobile device. It also has the convenience of the Google marketplace. It is the defacto Linux distro for mobile devices. There’s no demand for Ubuntu on a mobile device like a tablet or phone. Android does everything you could want to do on those devices, and it does those things well.

So, what is the point to unify the user interface on the Linux distribution, if the only real use you’re going to see for these distributions is in the desktop and laptop markets? There’s absolutely no reason to do this.

The new unified user interface, namely Unity and Gnome 3, are clunky at best in a desktop environment. They are a downgrade from the previous user interfaces that were popular, especially Gnome 2.

For this reason, I see a shift in the primary desktop environment used by most Linux users. I think most users will switch to XFCE4 or one of the other DEs which were similar to Gnome 2. I would be willing to wager that within a year or two, most distributions will be using XFCE4 as a default desktop environment by popular demand from their userbase. Either that will happen, or the desktop environment creators will see the error of their ways and change back to the old desktop standard.

BRING BACK XORG and just improve it!

, ,

No Comments