Connecting a digital camera to debian

•September 5, 2007 • Leave a Comment

So I wanted to connect my digital camera to transfer pictures to my computer. Surprisingly this task was pretty straightforward. First I installed the Konqueror through aptitude because I once used it on Knoppix and Mepis and it was fairly easy to use and graphical. Fluxbox purists might say otherwise because its part of KDE but I like it. Getting to the point; connect the camera, create a directory called /mnt/usb, and enter this command in the terminal.
mount -t vfat /dev/sda1 /mnt/usb

I was able to browse my camera after navigating to /mnt/usb hope you have the same luck. This is where I got the info from.

Digg it bookmark this

How I made this screenshot

•August 31, 2007 • Leave a Comment

In wanting to make a kick ass screenshot like the ones I have seen immortalized on the web, here is my feeble attempt along with the work that it took to make it.

First I needed a wallpaper, that was not too difficult to do, I found a wallpaper online and and used the fluxbox wallpaper command (I also inserted it in the /home/username/.fluxbox/apps file).
fbsetbg -f /path/to/image.jpeg
[startup] {fbsetbg -f /path/to/image.jpeg}
#in the apps file to autostart

Then I configured the transparency through the fluxbox right click menu as can be seen in the actual screenshot.

Then I installed aterm through aptitude and used this command line string to get a transparent terminal. Link.
aterm -name aterm -title 'Gentoo Terminal' -sl 3000 -tr +sb -sr -si -sk -bg black -shading 60 -fade 90 -tn xterm -fn -misc-fixed-medium-r-normal-*-*-120-*-*-c-*-iso8859-2 -g 130x50+20-0 -fg \#cecece

I then inserted this into the fluxbox menu for aterm to get it to always start transparently. This file is located in /home/username/.fluxbox/menu (if it has been copied there; see this post)
[submenu] (XShells) {}
[exec] (Aterm) {aterm -name aterm -title 'Debian Terminal' -sl 3000 -tr +sb -sr -si -sk -bg black -shading 60 -fade 90 -tn xterm -fn -misc- fixed-medium-r-normal-*-*-120-*-*-c-*-iso8859-2 -g 130x50+20-0 -fg \#cecece} <>
[exec] (XTerm) {xterm} <>
[exec] (XTerm (Unicode\)) {uxterm} <>
[end]

Then I installed ImageMagick through aptitude to actually take the screenshot. The code to take the screenshot can be seen in the picture and from this site.
import screenshot.png

And there you have it.
screenshot

One side note this is not true transparency because if you try to open the right click menu or aterm over a window like a web browser you will see the wallpaper not the window directly underneath it, I know this going into it but I still think it looks semi cool.

Digg it bookmark this

Configuring Your Own Fluxbox Menus

•August 23, 2007 • 1 Comment

So I wanted to add “k9copy” to the fluxbox right click menu. In order to do this copy it from it’s home and replace your user menu.
cp /etc/X11/fluxbox/fluxbox-menu /home/username/.fluxbox/menu

Edit the file
vi /home/username/.fluxbox/menu

where it says something like

[submenu] (Tools) {}
[exec] (fluxconf) {/usr/bin/fluxconf} <>
[exec] (fluxkeys) {/usr/bin/fluxkeys} <>
[exec] (fluxmenu) {/usr/bin/fluxmenu} <>
[exec] (k3b) {/usr/bin/k3b}
[exec] (k9copy) {/usr/bin/k9copy} <>
#add this in right here
[end]

Now try restarting and we’ll see if it works

I just restarted and it worked.
If it didn’t work there is one think that I might try.
vi /home/username/.fluxbox/init

change the session.menuFile path to ~/.fluxbox/menu
it should look like this
session.menuFile: ~/.fluxbox/menu

There probably no reason this wouldn’t work as long as the the command to start a program is just one word that is typed in to the command prompt, good luck.

Digg it bookmark this

3 Tools

•August 18, 2007 • Leave a Comment

The three tools that helped me out a lot are aptitude, vi, and find. I’ll go over them in small detail.

Aptitude

  • to execute aptitude you just type in aptitude at the prompt,
  • the ‘/’ button on your keyboard brings up the find box type in what your looking for and press enter.
  • The ‘n’ button on your keyboard finds the next item with that search term.
  • Press ‘+’ to install an item it will turn green, press ‘-’ to uninstall an item it will turn purple.
  • After all selections are made press ‘g’ then ‘g’ again to install.

Once everything has completed press ‘q’ to quit. There are some things that are self explanatory that I left out and more powerful uses but these are the most common commands that I use.

vi the text editor, annoying to use at best but useful nonetheless. Also probably easier then all the rest as I haven’t taken the time to learn them. In my opinion the pick-up and play editor. Linux gurus will stay up till wee hours of the morning arguing heatedly about which editor is the best. IT’S A TEXT EDITOR!! edit your file and get out enough said.

vi /path/file to start writing a new file or edit an existing one.

  • ‘a’ to edit the file and hold ‘right arrow’ or ‘down arrow’ to stop editing
  • if you’re using xterm in fluxbox instead of right or down arrows use the Esc key to stop editing
  • ‘dd’ to delete a line ‘delete button’ to delete a character’
  • ‘ZZ’ to save and exit thats hold shift and press zz
  • ‘:q!’ to quit without saving the colon will bring up this text entry thing at the bottom and you can type q! to quit

find is to find any file in the system i find it very useful incase something that should be there is not in the right folder, also useful when the website help is on a different distro then the one you are using.

cd .. until you’re at the beginning, root directory, of the file system, in order to search the entire thing.
find -name 'item' where item is the file you are looking for (you can also use parts of file names with limited success)

Digg it bookmark this

Autostart & snippets

•August 18, 2007 • 1 Comment

Here is the output of uname -a

uname -a
Linux debian 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 GNU/Linux

I wanted to get autostart to work so I could just press the power button and have fluxbox start up, as its a single user PC. For some reason when I turn it on I have to run dhclient in order to connect to the internet. So as root I put dhclient in my .profile file and it worked. But I also wanted a screensaver now I had to log in as a different user but I could not execute dhclient as a different user so the workarround I used was (this will likely piss off programmers because its inefficient [i dont really care cause it works]).

Code is (all this executed as root)

apt-get install mingetty
vi /etc/inittab

go down to where it says something like this

1:2345:respawn:/sbin/getty 38400 tty1

and change it to

1:2345:respawn:/sbin/mingetty --autologin root tty1
2:23:respawn:/sbin/mingetty --autologin username tty2

now add this to /root/.profile
vi /root/.profile
dhclient at the bottom

install xscreensaver using aptitude
and add this to /home/username/.bash_profile
vi /home/username/.bash_profile
startx

now make a new file called apps in .fluxbox and start the screensaver up
vi ./fluxbox/apps
[startup] {xscreensaver &}

Similarly you can probably add a wallpaper to this if you want one.
[startup] {fbsetbg -f /path/to/image.jpeg}

Digg it bookmark this

The First Post for this blog

•August 17, 2007 • Leave a Comment

Hello, I read a tutorial somewhere that said you should write down what you do in linux so that others can learn from it and you give back to the community. I agree with this in part, I’m one of those people that will accept and use command line if I have to but I would prefer not to. I find that with point and click you can look at the screen and maybe figure out what to do without excessive amounts of googling. With command line it is almost impossible because when I want to do something I have :~& staring at me. (As I sit here and type using Iceweasel on fluxbox.)

So I decided to start posting whatever I found for primarily two reasons. One, it provides me with a space to see what I did last time in case I have to reinstall or set up a new system. Two, someone else might have the same problem I’m having and if, by some remote possibility this page makes it on to google they too can find the result that I found. As of this date I think I’ve only found two fixes completely by myself everything else is a combination of things I’ve learned. As for the theme after looking at hundreds of pages the most useful ones seem to have white text on a black background.

Digg it bookmark this