PKILL-9

Wayno’s sojourn and solutions through Linux

  • Home
  • About

25

Jul

Forcing a Web Browser to Save a File instead of Streaming it

Posted by admin  Published in Browsers, ftp, loni

I was having a dickens of a time, trying to force a browser make the user save the file, instead of trying to stream it. Here’s how to do it.

The original article is here.

1. in the directory where the file is located, we need to create a .htaccess file. So using the editor of your choice, create a filed name .htaccess (yes the period in front is important! It’s a hidden file.)


AddType application/octet-stream .wma

2. Now change the permissions on the file. Read and Write for the owner, and Read access for everyone else.


sudo chmod 640 .htaccess

it should like like:

-rw-rw—- 1 nwayno nwayno 38 2010-07-25 20:48 .htaccess

3. Restart the ftp server. If it’s standalone mode:


sudo service vsftpd restart

If vsftpd runs under xinetd (like I do), it will get the changes automatically since each new ftp session is a new process. (thanks Joe!)

4. Now when you try to ftp the file, such as:

ftp://servername/directory/filename.ext
(substitute your own information)

You will be prompted to save the file, instead of trying to stream it.

Thanks Loni

no comment

22

Jul

Getting Ubuntu 10.04 Video/Audio to work with an Intel 82815 Chipset

Posted by admin  Published in X11, gnome

The built in speakers on the compaq desktop pro, while they work with WIN XP, don’t work with Ubuntu 10.04. However, if you plugin a set of speakers or earphones into the sound output jack on the back (green) works perfectly.

After installing the LIVECD onto the Compaq Desktop Pro, when I rebooted, everything looked okay. I run the updates. Then rebooted AFTER the updates, and then ran into trouble.

Nothing I tried worked! Then I found the secret! You need to create at LEAST 2 admin accounts Before doing the updates. One that you will do the updates after installing the LIVECD, and one that you will use AFTER you do the updates.

Here’s what’s going on. After installing the LIVED CD the monitor resolution is set to 800×600.

However, after installing the updates, the resolution switches to 1024×760. So that account you did the updates with: worthless!

If you logon after the updates with the second account, your good to go. But you need the snippet from here

I created the following file in /etc/X11/xorg.conf RIGHT AFTER DOING THE UPDATES!

DO NOT TRY TO CHANGE THE RESOLUTION TO ANYTHING BUT 1024×768. IT JUST WON’T WORK!


#
# /etc/X11/xorg.conf
#
Section "Device"
Identifier "Intel Corporation 82815 CGC [Chipset Graphics Controller]"
Driver "intel"
BusID "PCI:0:2:0"
EndSection
#
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
HorizSync 31.5-48.5
VertRefresh 40-70
EndSection
#
Section "Screen"
Identifier "Default Screen"
Device "Intel Corporation 82815 CGC [Chipset Graphics Controller]"
Monitor "Generic Monitor"
DefaultDepth 16
SubSection "Display"
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection

If you hose the resolution you can try this.


xrandr --output LVDS --mode 1024x768

no comment

16

Jul

Recovering Ubuntu/Debian Linux after a Windows Install/Hiccup

Posted by admin  Published in grub

Courtesy Jordan-U from #ubuntu (freenode.net)

Dual booting (Windows/Linux) can cause some unique situations. Windows will try to assert itself as the only game in town, which can cause grub to go into an endless boot loop. Here’s an easy way to fix grub after a Windows Install/Hiccup.

1. First boot off of a livecd You can get one here.

2. Go to a terminal window. Let’s first mount the Linux Partition.


sudo mount /dev/sda5 /mnt

3. We are going to mount major Linux access points lets do them one at a time. First the Linux Devices Files. The –bind allows us to mount a subtree somewhere else, so it’s available in both places.


sudo mount --bind /dev/ /mnt/dev

4. Now the proc files. The proc system allows files to be generated dymanically.


sudo mount --bind /proc/ /mnt/proc

5. Now let’s mount /sys. /sys exports information from the kernel to the user space.


sudo mount --bind /sys /mnt/sys

6. Chroot to the device that we earlier mounted. Chroot (change root) changes the Linux root to be the device we mounted earlier. Note the mount point: /mnt


sudo chroot /mnt

7. Finally re-install grub into the MBR (Master Boot Record)


sudo grub-install /dev/sda

Reboot and all the operating systems, Linux and Windows should be available.

no comment

8

Jul

How to configure Samba in Ubuntu using a gui

Posted by admin  Published in Joe, filesharing, samba

From Joe:

How to configure samba using a graphical interface in Ubunbu

Thanks Joe!

no comment

8

Jul

Removable USB devices and fstab settings

Posted by admin  Published in fstab, loni

I have a 1 t/b back up drive, which is a USB drive.

However, the device names seem to change automagically.

Power interruptions, or even things like Virtual Box will cause the drive to dismount and re-mount, changing the device name, and causing havoc elsewhere for things like my music and ftp site which are stored on this device.

So, what’s the easy way to fix this? Well thanks to Loni, here’s what we did:

1. Change directory so we can get information by UUID. (Universally Unique Identifier)


cd /dev/disk/by-uuid

2. Look at the UUID’s in the system:


ls -l

You will get output that looks like this:

@Homer:/dev/disk/by-uuid$ ls -l
total 0
lrwxrwxrwx 1 root root 10 2010-07-08 00:21 14ff50b3-49c0-4dbb-a392-55fb94a7730f -> ../../sdb2
lrwxrwxrwx 1 root root 10 2010-07-07 17:21 5ed81b0d-ae9a-41b1-b4c7-02b500b94bea -> ../../sda5
lrwxrwxrwx 1 root root 10 2010-07-07 17:21 92569F58569F3C43 -> ../../sda1
lrwxrwxrwx 1 root root 10 2010-07-07 17:21 949CA48C9CA46A86 -> ../../sda3
lrwxrwxrwx 1 root root 10 2010-07-07 17:21 c07c1084-ff98-49dc-87c7-672651dc4d2e -> ../../sda4
lrwxrwxrwx 1 root root 10 2010-07-08 00:21 FC1268B212687414 -> ../../sdb1

4. Now let’s edit the Linux file structure table, fstab

Note any thing with a # in it is a comment does not need to be coded!


cd /etc

5. First let’s backup the file in case we make mistake (always have a path back to the way it was, before you messed it up!) More complete details are here.


sudo cp fstab fstab.bkup

6. Now edit the file:


sudo nano fstab

OR


gksudo gedit fstab # use gedit

7. add the following similar lines:


UUID=14ff50b3-49c0-4dbb-a392-55fb94a7730f /waynobfd ext4 rw 0 0
#
UUID=FC1268B212687414 /waynontfs ntfs rw,nosuid,nodev,allow_other,blksize=4096 0 0

The first line above, mounts an ext4 partition by UUID (from the information we obtained before) and gives it the mount point of /waynobfd (previously created with the mkdir command.)

The second line above mounts an ntfs partition, called waynontfs. Handy for use with Windows.

By using UUID, if the device changes due to things like VirtualBox or maybe a power hiccup that affects the drive, though the device may change, the mount point will always be correct.

End of Problems! Thanks Loni!

no comment

8

Jul

Fixing gnome-typing-monitor in Ubuntu 10.04 (lucid lynx)

Posted by admin  Published in Joe, gnome

For those of us who need to take breaks from our computer (mine for medical reasons), the gnome-typing-monitor is indispensable.

However, it does NOT work in Ubuntu 10.04 (lucid). Which for me, was a show stopper. I have Deep Vein Thrombosis and so I can’t sit for extended periods of time.

Ubuntu 10.04 Bug #565757 (gnome-typing-monitor)

This solution, fixes the problem. You will need to obtain the gnome-typing monitor from version 9.10. You can find 32 and 64 bit versions here.

Note that you will need to change the permissions (chmod) and ownership (chown) once you have downloaded and moved the file.

it needs to look like:

ls -l gnome-typing-monitor
-rwxr-xr-x 1 root root 34920 2010-07-07 23:53 gnome-typing-monitor

note that in the following example ‘#’ is the comment character.
You don’t code that or anything that follows:

1. Let’s go to the directory where the gnome-typing-monitor is stored:


cd /usr/bin

2. Let’s create a backup copy of the programme.


sudo cp gnome-typing-monitor gnome-typing-monitor_10.04

3. Copy the programme from our home directory (or where ever you downloaded it to, to /usr/bin


sudo cp ~/gnome-typing-monitor /usr/bin

4. Change the owner on the file back to root.


sudo chown root gnome-typing-monitor

5. Change the file permissions.


sudo chown 755 gnome-typing-monitor #change the permissions on the file (rwx for root, rx for group and world)

Now we have to fix gconf we do that by:

1. Start gconf-editor in the shell


gconf-editor

2. Go to desktop

3. gnome

4. typing break

Click on “enabled”
That’s what worked for me

Joe

gconf editor changes

Now I can finally upgrade from 9.10 (karmic) to 10.04 (lucid)

Thanks Joe!

no comment

1

Jul

Sorting Bookmarks (alphabetically) in Firefox

Posted by admin  Published in Browsers

Sorting Bookmarks (alphabetically) in Firefox

I knew there had to be a way to do this!

Wayno

no comment

29

Apr

installing ubuntu-restricted-extras under wubi

Posted by admin  Published in Audio, DVD, Music, apt-get, sound

From: Jose B 28 April at 01:49

When installing Linux on your Windows machine using Wubi, your Linux installation will not have access through the synaptic package manager to the Ubuntu Restricted Extras; also you will not be able to install them through the web page either.

What I did to get around this is:

1. I opened the terminal (Applications-Accessories-Terminal)
2. At the prompt type: $ sudo aptget ubuntu-restricted-extras
- This will install the restricted extras packages
3. type: sudo /usr/share/doc/libdvdread4/install-css.sh
- This will install dvd support to your linux system that was installed through Wubi

Now you will have a fully functional Linux system. This was tried on a Windows 7 machine.

no comment

27

Apr

How to do Certificate Based ssh Authentication

Posted by admin  Published in loni, ssh

THANKS LONI!

How to do — Certificate Based Authentication

1. Go into .ssh directory

cd ~/.ssh

2. create a file config with your favourite editor:

Host simpsons.com dohnuts
User homer
hostname simpsons.com
port 12345

The first line Host, identifies the domain, and the machine in that domain we which to reach.

The second line User, is the username on the host machine. In this case, homer

The third line, is the hostname.

The forth line is the port (usally 22, but for security reasons, we changed it from the default)

3. now do:

ssh-keygen

return on all of the prompts (i.e. take all the defaults)

It will look like this:

ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/bart/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/bart/.ssh/id_rsa.
Your public key has been saved in /home/bart/.ssh/id_rsa.pub.
The key fingerprint is:
12:34:56 and so on.
The key’s randomart image is:
+–[ RSA 2048]—-+

4. Enter the following to copy the certificate to the machine:

ssh-copy-id -i ~/.ssh/id_rsa.pub dohnuts

You will get output that looks like:

:~/.ssh$ ssh-copy-id -i ~/.ssh/id_rsa.pub saturn
The authenticity of host ‘[simpsons.com]:12345 ([12.34.56.153]:12345)’ can’t be established.
RSA key fingerprint is ab:59:27:8a.

Are you sure you want to continue connecting (yes/no)? Yes
Warning: Permanently added ‘[simpsons.com]:12345,[12.34.56.153]:12345′ (RSA) to the list of known hosts.

Now try logging into the machine, with “ssh ‘dohnuts’”, and check in:

.ssh/authorized_keys

to make sure we haven’t added extra keys that you weren’t expecting.

5. Now login, using your password to complete.

6. in the future you would type:

ssh dohnuts

Look Ma, no password!

2 comments

17

Apr

Thunderbird 3.X Performance Enhancement

Posted by admin  Published in Thunderbird

From a friend:

1. In Thunderbird, click on:

Edit/Preferences/Advanced Tab

UNCLICK Enable Global Search and Indexer

Thunderbird Option

4 comments
Next Page »

Search

About

PKILL-9

Categories

  • apt-get (2)
  • Audio (4)
  • Browsers (4)
  • Compiling Source Code (2)
  • Deposit @ Home (1)
  • DVD (4)
  • filesharing (2)
  • fstab (1)
  • ftp (1)
  • gnome (4)
  • grub (2)
  • Internet Connection Sharing (1)
  • Joe (2)
  • loni (3)
  • Music (3)
  • netbook (1)
  • samba (2)
  • sound (2)
  • ssh (1)
  • Thunderbird (1)
  • Uncategorized (26)
  • ups (1)
  • video (2)
  • wireless (1)
  • word processors (2)
  • X11 (1)

Archives

  • July 2010 (7)
  • April 2010 (5)
  • March 2010 (3)
  • February 2010 (7)
  • January 2010 (1)
  • December 2009 (1)
  • October 2009 (4)
  • September 2009 (1)
  • July 2009 (1)
  • June 2009 (3)
  • May 2009 (5)
  • April 2009 (6)
  • March 2009 (3)
  • February 2009 (6)

Blogroll

  • Dynamic Designz - Linux Help Site
  • Plugins

Pages

  • About

Meta

  • Log in
  • Main Entries Rss
  • Comments Rss
July 2010
M T W T F S S
« Apr    
 1234
567891011
12131415161718
19202122232425
262728293031  

Recent Posts

  • Forcing a Web Browser to Save a File instead of Streaming it
  • Getting Ubuntu 10.04 Video/Audio to work with an Intel 82815 Chipset
  • Recovering Ubuntu/Debian Linux after a Windows Install/Hiccup
  • How to configure Samba in Ubuntu using a gui
  • Removable USB devices and fstab settings
  • Fixing gnome-typing-monitor in Ubuntu 10.04 (lucid lynx)
  • Sorting Bookmarks (alphabetically) in Firefox
  • installing ubuntu-restricted-extras under wubi
  • How to do Certificate Based ssh Authentication
  • Thunderbird 3.X Performance Enhancement

Recent Comments

  • admin in Changing Default Language for Abiword
  • PKILL-9 » Post Topic » … in Recovering after hosing /etc/fstab
  • tux in How to do Certificate Based ssh Authentication
  • tux in How to do Certificate Based ssh Authentication
  • lornix in Thunderbird 3.X Performance Enhancement
  • lornix in Thunderbird 3.X Performance Enhancement
  • admin in Thunderbird 3.X Performance Enhancement
  • tux in Thunderbird 3.X Performance Enhancement
  • admin in How to make pulse audio temporarily DIE!
  • herdivet in How to move Buttons to the RIGHT side in gnome for…
© 2007 PKILL-9



Theme by WebRehash | Free WordPress Templates | Valid XHTML | Valid CSS 3.0 | Powered by Wordpress, Installed by Installatron.