Archive

Posts Tagged ‘Linux’

Overcoming Linux Screen Resolution Limitations (EDID)

January 16th, 2010

A little while ago I picked up a 26″ monitor (NEC MultiSync LCD2690WUXi). Unfortunately, I found that when I connected the monitor to my Ubuntu Linux box that I could only use up to 1280×1028 — even though the monitor’s native resolution was 1920×1080! I also had this problem on my Windows and SuSE machines, so I suspect the monitor is not properly reporting its maximum resolution via EDID.

I used the command-line utility xrandr to fix the problem. Running the tool with no arguments prints a list of displays and available display modes for each. This is handy since you need the name assigned to your display by your OS for the next step. Next, use the “–newmode” option with xrandr and specify the modeline which describes the display configuration you wish to use. This modeline generator might help you create the modeline you need. Once you create the new mode, use the “–addmode” option to add it to the list of modes supported by your monitor.

Finally, add this command to your ~/.xprofile file (or something similar) so that when you start your machine the new mode is automatically added and available (this way Ubuntu automatically reselects it too). This is what I ended up adding to my ~/.xprofile file:

xrandr --newmode "1920x1200_50Hz" 128,300 1920 1968 2000 2079 1200 1203 1209 1234 +hsync -vsync
xrandr --addmode HDMI-0 "1920x1200_50Hz"

Note: If you set your refresh rate too high, your monitor will probably flicker occasionally. If this happens, try lowering the refresh rate by lowering the pixel clock value (the first number in the modeline).

David Underhill Linux , , , , , ,

sshfs

February 27th, 2009

I recently decided I was fed up with maintaining the files on my web host’s server via FTP. It is just a very unnatural and inconvenient way to update remote files – especially when making lots of small tweaks. What I really wanted was the normal file system abstraction. It seemed like mounting the remote file system as a folder in my local filesystem over SSH/SFTP would be ideal. Luckily, Miklos Szeredi (the author of FUSE) already did the hard work of implementing a little program called sshfs which does just that.

It was a piece of cake to install on my Linux box, and it looks like Mac’s have an implementation of FUSE available too. Once you have installed the tool you can mount a remote file system just like this:

format: sshfs username@host: folder_to_mount_in
example: sshfs dound@myhost.com: wwwdound

I now use sshfs to mount folders from a variety of remote machines on my local machine — it is much better-suited to many tasks than FTP, and for some tasks it beats SSH too. It is also handy when I want to grep remote files on a server I only have FTP access to. The only downside is that while you are in a terminal whose current working directory is within the remotely mounted directory all commands experience a slowdown – while I expected file-related commands like to run slower, I did not expect commands like clear to experience a noticeable latency. It is not clear to me whether this is an issue with sshfs, FUSE, or mounted file systems on Linux in general, but maybe I will look into it later. Regardless, I highly recommend sshfs — it is a very handy utility and much better than the alternatives.

David Underhill Linux, Software , , , , , ,