Bohemian Blog

  1. About This Blog
  2. Archives
  3. Download Artwork
  4. Home

Archive for the 'Linux' Category

Photoshop CS in Linux

Monday, January 14th, 2008

Being a freelance Web Designer & Developer is a good career if you are trying to work full time on Linux and open source software. However, you still have to be compatible with your clients’ source files and backups. This means using Photoshop to build layouts or at least slice up the layouts that you get in PSD file formats.

I have been using my aging G5 (boy, saying that makes me and my checkbook cry) to deal with Photoshop files. However, since I have been setting up this beast of a Dell for the Ultimate Linux Desktop I spent some time today in getting the Windows version of Photoshop CS running on top of Wine, the Windows Compatibility Layer.

Wine is so good right now that you can simply throw the Photoshop install disk in your Linux box and run the installer. I’m not kidding, but keep in mind that this is Photoshop CS, not the latest and greatest Photoshop CS3. Wine’s site has a great deal of information about a variety of Photoshop versions running on Wine.

How did I do it specifically? I installed Wine, the Microsoft TrueType Core Fonts Ubuntu: sudo apt-get install msttcorefonts, customized the Wine interface to taste via Applications/Wine/Configure Wine and then ran the Photoshop CS installer.

Hold On, Save For Web Isn’t Working!

Alright, so there is one big fat catch that, if not dealt with, pretty much makes Photoshop worthless to web professionals: The amazing Save For Web plugin doesn’t work. Damn. So close.

Solution: The Magic of Windows Back Slashes

Yeah, it can be fixed! So, the secret is in how you start Photoshop. Either you or Wine setup some kind of shortcut unless you are starting Photoshop from the command line. Here’s how my original shortcut command was written:
env WINEPREFIX="/home/jason/.wine" wine "C:/Program Files/Adobe/Photoshop CS/Photoshop.exe"

and to fix the Save For Web problem, simply replace the forward slashes that follow C: with back slashes:

env WINEPREFIX="/home/jason/.wine" wine "C:\Program Files\Adobe\Photoshop CS\Photoshop.exe"

Huh? What?

Don’t ask. I can only guess that how that particular plugin was written included Windows-directory style references within the code. Sincerely, I have no clue. Thankfully the Wine developers figured it out. On that page it mentions Photoshop 7 specifically, but CS works the same way.

X11: Switch Control Key To Apple/Command Key

Wednesday, January 2nd, 2008

Control-Command Keys

One of the major problems with using X11 to run *NIX applications on OSX is switching from using the Apple/Command key to using the Control key as your primary modifier key.

First of all, I don’t understand why the Control key is where it is on keyboards for OS’s that use it as the primary modifier key. It is probably the least ergonomic key to use (unless you have the good fortune of using a Thinkpad, since they don’t include the Windows key). Apple, for all its missteps, gets it right by making the primary modifier key easy to press in combination with other keys. Command, Control, Apple, whatever you call it, put it in a comfortable spot! That one detail almost prevented me from switching to something other than OSX. Seriously.

With that said, it’s no surprise that Apple puts the rarely-used-in-OSX Control key off to the far corners of the keyboard. As to why Apple doesn’t include an option to switch the Control/Command keys in the X11 preferences, I can only imagine.

Second, making this change isn’t for *NIX purists that like it the way it is. Don’t get pissed at me. I’m just trying to help Mac people enjoy the fruits of the Open Source community because I’m frustrated with Microsoft and Adobe (and even Apple). Their customers take a back seat to their interest in making money.

Third, let’s get started!

This is simple and if anything goes wrong, it’s easy to get back to where you started. Here’s the meat and potatoes:

  1. Start the X11 application
  2. In X11 go to X11/Preferences and to the Input tab. Uncheck the following settings:
    • Follow system keyboard layout
    • Enable key equivalents under X11
  3. In X11 go to Applications/Terminal to open up a Terminal window
  4. Type the following in the Terminal window:
    vi ~/.Xmodmap and press Enter. This will open a file named ‘.Xmodmap’ located in your home folder ‘~/’ with the text editor program called Vi. Don’t be frightened.
  5. Vi is run from within the Terminal, so it won’t look much different. Press ‘a’ to switch to Vi’s Insert Mode (I think the ‘a’ stands for Append) and then type in the following text:
    ! ~/.Xmodmap
    clear Mod2
    clear control
    keycode 63 = Control_L
    keycode 67 = Control_L
    add control = Control_L
  6. Now press ‘esc’ or the Escape key to exit the Insert Mode and return to the Command Mode. Now type :wq and press Enter. This command tells Vi to Write (think ‘Save’) the changes you made to the file and Quit Vi itself.
  7. Type xmodmap ~/.Xmodmap and press Enter to complete this process.
  8. Open something in Gimpshop, Gimp, OpenOffice, Inkscape or any X11 application that you use to test if you have successfully switched to the Apple/Command key.

If you suddenly cannot get any of your X11 applications to start, you can delete the .Xmodmap text file from your home directory. To do this, open a Terminal in either the X11/terminal or the OSX Terminal.app: rm ~/.Xmodmap and press Enter. The command rm stands for ‘Remove’. Be careful with this command. There is no ‘undo’ in the command line.

This post uses information found at //extrabright blog and The University of Illinois at Chicago’s Unix 101 pages on Vi. This is my attempt to write a more concise how-to.

New Dell XPS 420: Linux Dream Machine?

Sunday, December 30th, 2007

One week before Christmas my beloved Thinkpad T42 started having motherboard problems. After a little looking around I found that the problem was common. I don’t know what the deal is exactly, but pressing on the keyboard or touchpad too hard causes the display to flicker and the system to freeze. As a bonus it will also freeze at completely random moments. No more reconditioned laptops for this kid.

So I just finished ordering my first Dell desktop. I have been looking around at the Circuit City, Gateway, NewEgg and System 76 sites. They all have great Core 2 Duo-based systems at good prices. I applaud what System 76 is doing selling Ubuntu pre-installed systems only. Unfortunately it looks like they can’t compete with the buying power of the much larger discount computer manufacturers. I can’t deny my financial situation. The price difference is just too great. I even looked at building my own machine with pieces from NewEgg, but after talking to a friend I swallowed my former-Apple-promoting pride and gave Dell a try.

First I looked at the Ubuntu Pre-installed systems that Dell offers. Much to my disappointment the offering is very limited and not high-powered. To me, I would think that Linux users are generally advanced computer users that buy fairly high-end systems. I’m sure they did a lot of market research to determine what systems to offer, but this looks like a misstep to me. Perhaps their target isn’t people that know how to install Linux on any machine. Perhaps their target audience are people looking for an inexpensive alternative to Windows. However, if that indeed is the goal why aren’t they selling the Linux systems along side the Windows systems?

I decided to just shop at the regular Dell store and install Ubuntu myself. From what I’ve read, there are Linux drivers for most of the hardware provided, albeit ‘restricted’ drivers provided by the manufacturer. I don’t have a problem with installing these drivers. I’m grateful that the manufacturers even bother to provide them. Also, the companies will respond to increased demand for their product. They won’t necessarily respond to an extremely small group of people bitching about their drivers being open source. That’s how I look at it.

I settled on the XPS 420 because of its price range and power. Here are my new machine’s specs:

  • Intel® Core 2 Q6600 Quad-Core (8MB L2 cache, 2.4GHz, 1066FSB)
  • 128MB ATI Radeon HD 2400 PRO
  • 3GB Dual Channel DDR2 SDRAM at 667MHz - 4 DIMMs
  • 320GB - 7200RPM, SATA 3.0Gb/s, 16MB Cache
  • CD/DVD Burning Optical Drive
  • External speakers with sub-woofer
  • FINAL PRICE: $974 (after $100 savings, before tax/shipping)

The video card is supposed to be capable of outputting to two displays. However, I am prepared to buy a second video card later if that doesn’t work under Linux. I know that my Apple G5’s video card doesn’t successfully accomplish dual-display under Linux even though it works fine under OSX. Maybe xrandr is more capable with this particular video card. I am very impressed with the potential of xrandr, especially after my S-Video Out setup from a few weeks ago.

I’m expecting this machine to be everything I could ask for in my own personal design/development system. It should be delivered before the end of the week, but with the New Years holiday it might be next week before I can get back to working in Linux. I will report on the outcome asap.

Homework assignment:
If anyone can explain exactly how many ‘cores’ are in the above listed processor, I’d love to know. Due to the 4-DIMM ram setup I am guessing the magic number is four. However, the title ‘Core 2 Quad Core’ is confusing. If a Core Duo has two cores, a Core 2 Duo has four cores, then a Core 2 Quad Core should have eight cores, right?

Watching Internet TV on My TV

Wednesday, December 5th, 2007

Recently, due to our move and lack of willing to pay for a DVR with our cable subscription, my wife has introduced me to how the big networks are offering all their shows online. It’s great. Really.

Unfortunately, this means my wife has been sitting in our bedroom watching her favorite shows on a 19″ computer monitor hooked up to our Apple G5.

Solution: I found an RF modulator at Wal-Mart for $20 (RCA I think) that lets me hook my laptop’s S-Video output up to our old 30″ CRT. I wouldn’t write any letters on it or do lengthy reading, but video and images look pretty good. Using Linux certainly threw a few curve balls into an otherwise simple setup.

So, how can I too enjoy Internet TV on my old CRT Television?

Well, you are in luck, ‘cuz I did all the hunting around for you. At least if you are running Ubuntu Linux 7.10 on a Thinkpad T42.

Here’s how to use the xrandr tools to start your S-Video out:
mfbernardes.com: Finally I Got S-Video Working My Thinkpad T42
XStrikeForce: HowToRandR

I took Mr Bernardes’ terminal commands and created custom application shortcuts for each separate step that I use frequently:

  1. Activate S-Video
    xrandr --output S-video --set load_detection 1
  2. Start S-Video OUT
    xrandr --output S-video --auto
  3. Turn LCD OFF
    xrandr --output LVDS --off
  4. Turn LCD ON
    xrandr --output LVDS --auto

Then simply go to NBC.com, CBS.com or whatever. Hell, YouTube even.

Another good thing that helps position your video window on the TV for optimal viewing is the ZOOM capabilities of Compiz-Fusion. So look into that. You can get it set just right without too much visual noise around the video.

Wait a second, all my favorite shows are on ABC…

If you haven’t figured it out yet, ABC has a custom video player that is not available for Linux. That’s a deal breaker right there. Especially since that’s my wife’s favorite channel currently.

Luckily, the good folks over at WINE are doing a smash-up job. The trick is to install the Windows version of Firefox over WINE and then watch ABC from Firefox/Windows. Check out the following info for details:

JDESLIPPE

It’s a pretty clever solution. Not too many details there.

What about audio?

The RF Modulator that I bought has inputs for component audio that will then pass to your TV via COAX. I actually have a receiver stereo, so I push the audio through that from my laptop for the full experience.

That was simple!

I don’t guarantee this will work, but I wish you luck if you choose this challenge.

IEs4Linux Also for OSX on Intel

Monday, December 3rd, 2007

I have been using the IEs4Linux system for a while now to assist in developing websites. It allows you to install various versions of Internet Explorer in Linux. It’s great for testing websites against the many bugs in IE as you develop them.

Recently they have developed a version for OSX on Intel machines.

http://www.tatanka.com.br/ies4linux/news/49

You have to install Darwine and X11 on OSX to use it, but after that it seems pretty easy. I am not so fortunate as to own an Intel-based Mac, so I can’t test it for you.

Wine info
http://wiki.winehq.org

Darwine info
http://darwine.sourceforge.net/download.php

Wine on OSX info
http://wiki.winehq.org/MacOSX