Speedlinks - 29 December, 2008

Welcome to Linux Screw! If you're new here, you may want to subscribe our RSS feed.

1. Linux kernel 2.6.28 was officially released at 28 Dec, 2008: ext4, graphics execution manager (GEM), TAINTed_CRAP. See First Look by arstechnica.com.

P.S. Linus “almost Santa” Torvalds’ announcement is definitely worth reading:

Listen to the cheerful grinding of your harddisk as you reboot into an all-new kernel - and I’m sure that if your computer could smile, it would have a big silly grin on its non-existent face. So as you sit there in your basement, give your computer the holiday cheer too.

2. Top 10 Coolest Open Source Applications in 2008. Well, good reading in New Year Eve.

3. Bootable FSF membership cards: USB flash drive comes with pre-installed gNewSense 2.1.

4. Sabayon Linux 4.0 is realeased (smart Gentoo based distro): 25% boot speed gain, 8500 applications, ext4, KDE 4.1.3, Gnome 2.24.2, OpenOffice.org 3.0, Firefox 3.0 and more…

5. Pidgin 2.5.3 is out. Best GTK based instant messenger is ready for downloading. Changelog.

Christmas… Linux… Wallpapers…

As it comes from the title below is a small set of Christmas holidays wallpapers which should fit any Ubuntu, Fedora, Debian, Suse, Mandriva, Slackware, RedHat, Centos desktop…

happy linux holidays!

Continue reading…

VMware server console keyboard problem in Ubuntu Intrepid Ibex

Few days ago I have upgraded my Ubuntu to latest 8.10 (Intrepid Ibex) and found that keyboard just doesn’t work in VMware Server Console. The problem was that I couldn’t use keyboard under guest operating system including Windows, Linux etc. After few hours of research I found simple solution which works for me:

$ setxkbmap
$ echo "xkeymap.nokeycodeMap = true" >> ~/.vmware/config

After this restart vmware-server-console and see if it helps. If not you can see other solutions of the same problem at this site:
http://nthrbldyblg.blogspot.com/2008/06/vmware-and-fubar-keyboard-effect.html

I hope it helps!
Continue reading…

Use iTunes in Linux including Apple Music Store

Quick Introduction to iTunes

itunes logoApple iTunes is one of the most popular proprietary digital media players in the whole world. Using this no doubts outstanding application you can organize, play music/video files in very comfortable and user friendly way (it’s not an advertisement but real truth). Moreover iTunes is the only way to access Apple’s onilne music store and thus people often seeks the possibility to seamlessly access it after moving to Linux from Mac or Windows.

Well, unfortunately Apple doesn’t believe in magic so there is no native support of iTunes in Linux. At the same time none would deny that Wine does and guys from this project do their best to make things with iTunes in Linux better. In our example we use iTunes 7.3 which comes with Quick Time player 7.1.6, Apple iPhone support and of course iPods of any version, family and generation.

Install Apple iTunes 7.3 in Linux

1. Download iTunes 7.3 from apple.com or filehippo.com

2. Prepare Wine for itunes installation (if not installed do “apt-get install wine -y” or “yum install wine -y” in Ubuntu/Debian or Fedora/Redhat/Centos respectively):

$winecfg
wine: creating configuration directory ‘/home/artemn/.wine’…
fixme:midi:OSS_MidiInit Synthesizer supports MIDI in. Not yet supported.
wine: ‘/home/artemn/.wine’ created successfully.

Select your audio driver, it may be something like OSS or Alsa so use one u actually use :) Set Hardware Acceleration to “Emulation” option. All other Wine settings are per your consideration e.g. Graphics tab.

3. Update richedit30 (Win32 Cabinet Self-Extractor):

cd ~/.wine/drive_c/windows/system32
mv richedit32.dll richedit32.bak
mv richedit20.dll richedit20.bak
wine richedit30.exe

Set richedit20.dll and richedit32.dll as native through winecfg.

4. $wine iTunesSetup.exe
It will open iTune’s installation program under wine so you just install itunes as usually you did it in Windows. If error happens just re-run installer. See screenshot below:

5. Now you can start itunes and go through first run setup (all related screenshots are here). Just don’t care about errors thrown into the console:

$ cd ~/.wine/drive_c/Program\ Files/iTunes
$ wine itunes.exe

6. That’s it! Now u can use iTunes in Linux as you did it before in other operatin system:

P.S. By the way there are numerous Linux really native alternatives for comfortable music/video organizing and iPod management. At the same time latter can’t be as native and seamless as it’s in iTunes because those playes use Apple’s proprietary file storage system.

But I defitely recommend banshee, amarok and… exaile :)

Open .docx documents in Linux (OpenOffice)

Well, as for now it is not a problem anymore to open Microsoft Office 2007 .docx documents in any Linux distribution coming with OpenOffice suit. It may be Ubuntu (Feisty, Gutsy, Interpid whatever), almost any version of Fedora/RedHat/Centos, *SUSE, Mandriva and of course Debian (as per my personal opinion it’s the best one).

What is .docx actually? It’s Microsoft’s file format representing word processor documents and named OpenXML (as an attempt to create open and free international standard). Today .docx is default format for Microsoft’s word processor Word.

There are myriads of online converters between OpenXML and OpenOffice formats including .docx, .xlsx, .odt and many etc but sometimes it’s much more better to just open received .docx file in Linux offline (if there is temporarily no Internet connection or for security/private reasons etc).

So, just download the following package to certain directory like /usr/src, here are the commands to do it:

1. cd /usr/src
2. sudo wget http://blog.mypapit.net/imej/odf_filter.tar.bz2

The next step is to unpack the contents of the archive (.tar.bz2 is definitely well compressed file) and copy 3 files to OpenOffice’s system directories:

3. sudo tar -xvjf odf_filter.tar.bz2
4. sudo cp OdfConverter /usr/lib/openoffice/program/

5. sudo cp MOOXTypeDetection.xcu /usr/lib/openoffice/share/registry/modules/org/openoffice/TypeDetection/Types/
6. sudo cp MOOXFilter_cpp.xcu /usr/lib/openoffice/share/registry/modules/org/openoffice/TypeDetection/Filter/

As you can see from picture below now it’s possible to natively open .docx files in openoffice under Linux. Of course such “native” support may imply some artefacts in opened files due to file formats incompatibility so it’s also a good option to ask your friends to convert .docs into .pdf before sending you :)

openoffice openxml .docx

P.S. Thanks to guys from mypapit.

P.S. Here are several online converters .doc(x) <-> .odf <-> .pdf:

1. ZAMZAR (possibly the best converter), 2. http://docx-converter.com/.

FTP port forwarding using Linux router

Well, let’s imagine rather trivial situation: you have Linux router connected to Internet via e.g. ADSL modem and some local network comprising several computers and servers connected to that router via switches and/or Wi-Fi access points.

Done? Ok.

There is one public IP assigned to WAN interface of the router while FTP server (of course run by Linux as well) has IP something like 192.168.123.14 or 172.16.*.* or 10.*.*.*. Moreover you want to allow people to access your FTP from every corner of Internet… So, there are several ways how to apply this but let’s talk about how to achieve this by means of using port forwarding feature that is available in any router’s functions list.

So, let’s say we have the following configuration:

Internet <-> [a] router [b] <-> [c] FTP server

[a] is WAN interface with 212.213.214.215 (just an example) IP assigned to it, [b] is NIC with 192.168.0.1 and [c] is server’s interface with IP 192.168.0.2. All what we need is that users from Internet can access FTP server using 212.213.214.215 IP and default 21 TCP port.

One of the main problems is that passive mode of FTP service uses any port from range 1024 to 65535 so it’s not enough to forward 21/20 ports to FTP server and let the ball rolling. So, go to servers’ CLI and open configuration file of an FTP service. It would be vsftpd, proftpd whatever. Let’s say we have vsftpd so we have to add the following lines to /etc/vsftpd.conf:

pasv_min_port=12000
pasv_max_port=13000

When changes are saved restart vsftpd server.

Now access router’s CLI and type the following:

iptables -t nat -I PREROUTING -d 212.213.214.215 -p tcp -m tcp --dport 21 -j DNAT --to-destination 192.168.0.1
iptables -t nat -I PREROUTING -d 212.213.214.215 -p tcp -m tcp --dport 12000:13000 -j DNAT --to-destination 192.168.0.1

This will add netfilter port forwarding rules which will redirect traffic coming at routers’ public IP through 21 TCP port to FTP server and will properly handle passive FTP mode.

Wuala - it’s a finish.

FAQ: How to change Duplex and/or Auto-Negotiation NIC settings in Linux?

Q: How to disable auto-negotiation option of my network interface card and set up half/full duplex mode manually from Linux command line (CLI)? By the way, how to see current settings?
A: There are several Linux utilities coming with almost any distribution including Debian, Ubuntu, Fedora, RedHat, Mandriva, Centos whatever. See details below.

ethtool

This is rather powerful utility can display and change settings of ethernet network interface card. You can easily disable/enable autonegotiation option for your NIC, also it’s possible to manually set up duplex mode, configure wake-on-lan options, set speed settings. Just look through full manual page for ethtool. Here are several ethtool usage examples:

ethtool eth0 - shows current NIC settings

Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: No
        Speed: 10Mb/s
        Duplex: Half
        Port: MII
        PHYAD: 32
        Transceiver: internal
        Auto-negotiation: off
        Supports Wake-on: pumbg
        Wake-on: d
        Current message level: 0x00000007 (7)
        Link detected: yes

ethtool -s eth0 duplex half autoneg off - disables auto-negotiation, enables Half Duplex.
ethtool -s eth1 duplex full speed 1000 autoneg off - disables auto-negotiation, enables Falf Duplex and sets up Speed to 1000 Mb/s.

mii-tool

According to manual it allows to manipulate and see media-independent interface status. Let’s see examples:

bash-3.1# mii-tool eth0
eth0: negotiated 100baseTx-FD, link ok
- shows 100 Mbps speed, Full Duplex, Auto-negotiation is on.
bash-3.1# mii-tool eth0 -F 10baseT-HD - enables 10 Mb/s Half Duplex connection.




Information Improvisation: Operating system is the backbone for every organization. Having professionals with CISSP certification in organization ensures the life running through its networks. Organizations manage tremendous amounts of traffic due to the use of pc phone and people with 646-058 certifications are ideal for this job. They can also manage online networks which can be hosted on lunarpages, which also provides free email hosting. With the company's logo design every page and a well crafted web template the site can be given a graceful look.

 

Friendly Sites:Who is behind Linux Screw?
Aspiring Sysadmin | GeekyBits³ | Bash Cures Cancer | TOTMS
Linux Operating System | Small Linux Deployments | My SysAd Blog
The Danesh Project | ZEPY | Linux config Wiki | Planet Sysadmin
The Sys Admin | {buhay sysad} | a non-geek's linux notes
Linux HOWTOs, Tutorials & Projects with Adam Palmer | LinuxAlt.Com
My name is Artem Nosulchik (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››