MOVING!!!

Hey there, after several years of playing with Blogger and trying to get thing sorted out how I wanted, I finally decided to host my own domain so I could manage things easier. So this blog (which, admittedly, hasn't been updated much) is getting moved to my all-new site: DavisTobias.com/Linux. Also, to make it easier to transfer RSS feeds, this is the link to the new RSS feed. I'll leave this site and it's posts up, so I don't contribute to dead links on the internet, but I'm shutting off comments and won't post any more here.

June 16, 2009

IceWM Manager?

I have been configuring IceWM to suit my needs, but what would be really handy is a graphic interface to work with. There are two existing ones, but neither are still being developed. I have been considering either making a new graphic interface, modifying the needed parts from the existing, or making an updated version of one of the existing versions.

Alternately, I wonder if I could develop a web-based version, so that you can go to the web-site, interactively change theme colors/etc., and when done grab the text files and so on. The part I am unsure of is how to generate the text and image files correctly, but I could probably do this.

Anyways, any thoughts on the matter would be helpful.

June 13, 2009

Adding Samba support to Thunar

Hey there, this site has moved, so comments are disabled. Thankfully, you can go to the page, carefully linked for your satisfaction. Click here to go there.

Thunar does not natively support Samba, which is theLinux port of the Microsoft network folder/file sharing protocol, but support can be hacked in using the following method.

Note that I stole these instructions mostly from here, but I modified them for my conditions, which were: Minimal installation of Ubuntu, plus IceWM.

First make sure you have the correct software, Samba:
sudo aptitude install samba

Now you need FuseSMB, which is the Linux "File System in User SpacE" for Samba. This is found in the Universe repositories, to enable them, run the following (two) commands, borrowed from the official wikisite:
sudo su -c '\ndeb http://us.archive.ubuntu.com/ubuntu/ jaunty universe >> /etc/apt sources.list'
sudo su -c 'echo \ndeb-src http://us.archive.ubuntu.com/ubuntu/ jaunty universe >> /etc/apt/sources.list'
Now that the Universe repository is enabled, installing fusesmb is easy:
sudo aptitude install fusesmb

Now you need to add the fuse module to be loaded when the computer starts. Do this by adding the word fuse to the file /etc/modules, either using a text editor or with this command:
sudo su -c '\nfuse\n >> /etc/modules'

At this point you will need to do a full reboot to your computer so the fuse module loads correctly. Make sure to bookmark this page so you can finish the instructions when you come back!

After rebooting, you need to make a folder where Samba can mount: I made mine /media/network for simplicity. From the command line: sudo mkdir /media/network

Now you will need to make sure the folder has the correct permissions. To do this, open Thunar using sudo thunar which will give you administrator rights, so be careful not to do anything other than this. Right click on your folder /media/network and go to properties. You need to set Group "Access" and "Others" to "Read & Write". Finally, run this command: sudo chown :fuse /media/network

You also need to add the fusesmb code to the folder /etc/init.d which is done by making a script and putting it in that folder. The script is a really simple one, just make a text file on your desktop, name it something descriptive like networkmount, and put this inside:
#!/bin/bash
# This mounts the Samba service to the folder /media/network
fusesmb /media/network

Now make the script executable with this command:
chmod +x networkmount where networkmount is the name of the file
Finally, copy the file into the correct folder, you will need to be an admin, so try this command:
mv networkmount /etc/init.d/networkmount

Now you need to make Samba mount to the correct folder whenever you log in. What I did is add the correct command to the file /home/tobias/.xinitrc , which will run the command when I start X, but you may have a different way. How my .xinitrc file looks now (make sure the exec icewm-session & is last):
fusesmb /media/network &
exec icewm-session &

Now you will need to do a full reboot once more.

That's it! If you open Thunar and navigate to /media/network it will show you the available Samba networks. Note, however, that the response time is a bit slow, I thought I had done it wrong at first, but I was just impatient. If it won't load after a while, try logging out and logging back in, or resetting, to see if it will reinstate correctly.

For added navigations, if you are using the "Shortcuts" Side Pane in Thunar (control + b) you can navigate to /media and drag the network folder to the side pane for quick access! Alternately, make a link to it and put the link wherever it's handy.

test

I feel a bit foolish: ALSA mixer

Hey there, this site has moved, so comments are disabled. Thankfully, you can go to the page, carefully linked for your satisfaction. Click here to go there.

After installing the Ubuntu minimal core plus IceWM, as detailed previously, I could not get sound to work at all. My usual test for sound is installing VLC, which automatically installs a pretty good set of plug-ins, then adding support for DVD, WMA, and some other proprietary encodings:

This will install VLC:
sudo aptitude install vlc

This bit of shell script will enable the correct repositories, add the GPG key, and then install the required plug-ins for DVD access, as well as DivX, WMV, WMA, and a handful of other popular proprietary plug-ins. The following code was gathered in part from an old version laying around here. Beware of layout changing the font: their are five (5) lines of code to copy+paste here.
sudo su -c 'echo \ndeb http://packages.medibuntu.org/ jaunty free non-free >> /etc/apt/sources.list'
sudo su -c 'echo \ndeb-src http://packages.medibuntu.org/ jaunty free non-free >> /etc/apt/sources.list'
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -
sudo aptitude update
sudo aptitude install libdvdcss2 w32codecs gstreamer0.10-pitfdll libxinel-ffmpeg libdvdread4
So after I installed all that software, I opened VLC and tried to open a music file. Unfortunately for this article, I didn't write down what VLC said exactly, but it was essentially saying VLC couldn't find an actual audio device. Using the command ls /dev/a* I was able to see that an audio driver did exist: /dev/audio

After much poking around in the program aptitude, the Debian software installation program, I realized I did not have the ALSA (Advanced Linux Sound Architecture) software installed, so I installed a few of them. I know for sure that I installed more than I needed, and I can't figure out which ones I ended up installing that made it work, but my guess is installing alsa-firmware will install the rest of everything needed.

After that, when I played a tune in VLC it would appear to play correctly, but I could get no sound from the speaker. Well, after stumbling around a bit, looking for more ALSA files I could install, I noticed I had installed alsamixergui, started it, and realized everything was muted! Well, talk about embarrassing, I un-muted everything and realized I had never tried the volume buttons! I thought the volume would be automatically set to some low volume as a default, but it is installed with the sound muted.

Hope you can learn something from my mistakes!

June 11, 2009

Reinstalling Ubuntu, the core set

Hey there, this site has moved, so comments are disabled. Thankfully, you can go to the page, carefully linked for your satisfaction. Click here to go there.

Well, I reinstalled Ubuntu Gnome twice, and then being unhappy with it (which I really have been from the start) I reinstalled the Ubuntu core and then installed IceWM: Ice Window Manager is a very light weight manager, with very limited graphical eye candy. So far I am really enjoying it: The menu, panel, and most everything else are flat text files, so they are easy to manipulate.

After I installed the base core of Ubuntu, I did this:
sudo aptitude install xorg icewm menu firefox

If you aren't familiar with the Debian install method, it's real easy:
sudo To install a program, you need root access.
aptitude This is the program which installs things. You can just run sudo aptitude and it will give you a command line interface.
install This tells the program, aptitude, to install the following list of programs.
xorg icewm menu firefox These are the programs I installed, although I am not sure if I needed the menu, I was following someone else's instructions.

Now I had a window manager and Firefox, so I could browse around online to figure out how to do other stuff. When you boot up you will end up at a command line, no graphics, and you will need to put in your login name and password. To get the window manager to start, type in: startx

The core Ubuntu, plus IceWM, didn't install a file manager (in Windows, that is just the normal file browser) so i had to browse around online to find one. I found this news post which helped, but the comments below really helped me decide. I didn't mind the Ubuntu default of Nautilus, but it was a pretty heavyweight, and I was looking for something really light.

What I decided on were two things: Thunar and Midnight Commander. Thunar is a graphically appealing, yet lightweight graphical file manager, and comes pre-installed on Xfce and on Xubuntu, which is Ubuntu using Xfce4. In this link you can find some screenshots of it, although in my installation I have not configured a MIME applied icon set.

Midnight Commander is one that I can especially appreciate: It is a console file manager, much like the good ol' DOS based Norton Commander. Two panes of beautiful text goodness, oh yeah! I managed to find a screenshot of it:

Sorry it's not a very good picture, but I think you can get the idea of it. The comments at this previously linked post give some good ideas as to the power of this program. Also, if you open this within a windows manager, you can interact with it using the mouse as well, although it is designed to use the keyboard of course. I had some real trouble figuring out how to install Midnight Commander, so I will present the way I used:

First, you need to enable the Universe repositories. You can do this using some graphical thing, or you can edit the text file. The following lines need to be added to the file "sources.list", which is found at /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe
deb-src http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe

You will need to change the word "jaunty" to whatever version of ubuntu you are using. One way to quickly append to a text file, from the command line, is this:
echo new text >> file.txt

This takes the "new text" and puts it at the end of "file.txt", that's what the >> means. To add the two lines above to the sources list, type these two commands:
sudo su -c 'echo deb http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe >> /etc/apt/sources.list'"
sudo su -c 'echo deb-src http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe >> /etc/apt/sources.list'"

Now you have added the Universe repository, you need to update the list of programs:
sudo aptitude update

And finally, install Midnight Commander:
sudo aptitude install mc

To start Midnight Commander, just type in:
mc