LinkShare rotating banner
Showing posts with label x-windows. Show all posts
Showing posts with label x-windows. Show all posts

Friday, October 5, 2012

Using GraphicsMagick to Set the Background

GraphicsMagick is a powerful graphics tool that can be used to set the background on Linux. I've been using xsetbg from the xloadimage package to set X-Windows background. However, I realized that GraphicsMagick can replace xloadimage and netpbm that I've used for setting background and converting images.



So far I just learned a few tricks for setting background with GraphicsMagick. To tile an image on the background, type a command like this:



gm display -window root background.jpg


To fill the background with an image smaller than the screen size, use the -geometry option:



gm display -window root -geometry 1440x960 Background.jpg


You can also use the percentage (%) sign to zoom in or out the image and place it on the background.



gm display -window root -geometry 300x200% background.jpg


You can add the -gamma option to darken or brighten the image. If gamma is less than 1, the output image will be darker. If gamma is greater than 1, the image will be brighter.



gm display -window root -gamma 0.5 BG_pix.jpg


There are many more options that you can use with GraphicsMagick, for example, -crop, -dither, -trim etc. Read the manual page of GraphicsMagick and documentation for further information.

Saturday, April 4, 2009

Sample xorg.conf for a Minimal System

The following is the contents of my xorg.conf file of a minimal Linux system that I use as a base for a Live CD. It makes use of either VESA standard server or framebuffer server.



Section "Files"
FontPath "/usr/local/share/fonts"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/truetype/latex-xft-fonts"
FontPath "/usr/share/fonts/truetype/ttf-dejavu"
FontPath "/usr/share/fonts/truetype/ttf-thai-arundina"
FontPath "/opt/jre1.6.0_06/lib/fonts"
FontPath "/opt/jre1.6.0_06/lib/oblique-fonts"
EndSection

Section "ServerFlags"
Option "DontVTSwitch"
Option "DontZap"
Option "DisableVidModeExtension"
Option "AllowMouseOpenFail"
Option "UseDefaultFontPath" "No"
EndSection

Section "Module"
Load "dbe"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "record"
Load "vbe"
EndSection

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbModel" "kr106"
Option "XkbLayout" "kr,us,ru,tr"
Option "XkbVariant" ",intl,winkeys,f"
Option "XkbOptions" "grp:sclk_toggle,grp_led:scroll"
Option "CoreKeyboard"
EndSection

Section "InputDevice"
Identifier "Generic Mouse"
Driver "mouse"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons"
Option "CorePointer"
EndSection

Section "InputDevice"
Identifier "Serial Mouse"
Driver "mouse"
Option "Device" "/dev/tts/0"
Option "Protocol" "IntelliMouse"
EndSection

Section "Device"
Identifier "Framebuffer"
Driver "fbdev"
Option "fbdev" "/dev/fb/0"
EndSection

Section "Device"
Identifier "VESA Standard"
Driver "vesa"
EndSection

Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
EndSection

Section "Screen"
Identifier "Screen.0"
Device "VESA Standard"
Monitor "Generic Monitor"
DefaultDepth 16
SubSection "Display"
Depth 15
Modes "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection

Section "Screen"
Identifier "Screen.1"
Device "Framebuffer"
Monitor "Generic Monitor"
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "Screen.1"
EndSection

Friday, March 27, 2009

Setting the Background with xsetbg

This is just my 2 cents on setting the wallpaper on your X Windows desktop. There are many tools for setting the background — technically called the root window. If you use KDE or GNOME, setting up the background is automatic as it is done by the friendly GUI. However, if you are one of those people — including me — who prefer light and minimalist X-Windows environment, you'll put a command in your .xsession file to set your background.


My Lotus desktop screenshot

Here, I introduce you to a nice nifty tool called xsetbg. It belongs to a package called xloadimage. I find it attractive just because it doesn't have many dependencies. This is how I use xsetbg in my .xsession file to place my lotus wallpaper on the desktop:


/usr/bin/xsetbg -center -xzoom 115 -yzoom 128 /usr/share/pixmaps/5469_G.jpg

The nice thing about it is that it lets you zoom the width and height separately and center the image at the same time. Pratically, this feature allows you to hide unwanted edges from the screen. For example, the picture below has unnecessary edges around it.


The forgotten sanctuary in the fantasy land

The following command sets this image as the desktop wallpaper without the unwanted edges (assuming your screen is in 800x600 resolution). Change the zoom percentages as necessary for your screen resolution.


xsetbg -center -xzoom 67 -yzoom 85 Sanctuary.jpg

My Fantastic Sanctuary desktop screenshot

About This Blog

KBlog logo This blog seeks to share useful information on freely available fonts on the Internet. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

CyberChimps Professional WordPress Themes
Powered By Blogger