Posts Tagged ‘Ubuntu’

Don’t let Banshee scare your removable device!

Sunday, October 9th, 2011

As you might know, Banshee replaced Rhythmbox as default media player in Ubuntu as of 10.10. Apart from being written in Mono (which I consider a weak point), Banshee is a more temporary media player with support for many portable media players and online stores.

I sport a Transcend MP860 which I described in one of my earliest post. So far, I was just manually copying files to and back to the device using the shell or Nautilus. It works but I wanted to see whether I can use Banshee for that as well, since my music collection of 5800+ songs is already being managed by Banshee.

The first couple of tries were not succesful. Dragging folders from 1) to 2) didn’t work as I was hoping.

Dragging folders from 1) to 2) didn’t work

Banshee would start converting the .ogg files to .wav files. As the MP860 can play .ogg files, no conversion should be required.

The context menu of the device in Banshee was not helpful either: right-clicking the “8.0 GB FileSystem” and selecting “Device Properties” does supposedly allow you to change settings, but in my case only .wav was available.

As so often, Google to the rescue! Sometimes it’s frustrating though. Nothing but bug reports about format conversion problems or promising hints that end in 404 error pages. Fortunately, I found another post that treats a similar sort of problem with Banshee and removable devices. The steps outlined in that post helped me fix my problem. I will show you what I needed to change to fit it my requirements…

Below is a screenshot of my MP860 when I connect it via USB to the pc:

The directory structure on my MP860

These are the default directories and the MUSIC folder contains my audio files in a two-tiered structure e.g. <band>\<album>

Now, in order to make Banshee recognize the MP860 player as a media player that’s capable of playing .ogg files, I needed to touch the following file in the root of the MP860:

cd /media/disk (<– your player might be mounted with a different name)
touch .is_audio_player

Fire up your favourite text editor and edit .is_audio_player to contain the following lines:

audio_folders=MUSIC/
folder_depth=2
output_formats=audio/ogg

It’s probably self-explaining, but here you are:
The first  line must contain the path to your music files.
The second line… I actually don’t know. My directory structure is two levels deep… I have no idea where Banshee would copy files if the folder_depth were 3.
The last line specifies the output format that your player knows. If the file format in Banshee matches the output format specified in that line, no conversion will take place. The files will just be copied. In his post (see the link above), Activ8specifies several non-ogg formats, separated by a comma. Check out his post for the exact syntax or feel free to experiment!

HTH some.

 

Starting folder in Python’s gtk.FileChooserDialog …

Saturday, October 1st, 2011

I’m at best a knowledgeable beginner in Python but after seeing how badly Bashee Player is at synchronizing your music library with your portable devices, I thought I’d give writing my own synch tool a try…

First hurdle: The starting folder in the gtk.FileChooserDialog as taken from the Ubuntu package “python-gtk2-tutorial”

After reading several pages of documentation, I found a post where a user did something similar and the same worked for the filechooser.py that comes with the examples:

dialog = gtk.FileChooserDialog(“Open..”,
None,
gtk.FILE_CHOOSER_ACTION_OPEN,
(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
gtk.STOCK_OPEN, gtk.RESPONSE_OK))
dialog.set_default_response(gtk.RESPONSE_OK)

dialog.set_current_folder(‘/path/to/your/folder’)

Of course, that’s still hard-coded but if you put in a variable and put the variable into the preferences that the user can edit… voilà!

Hope this helps someone!

「お誕生日おめでとうございます!」の工作

Saturday, August 27th, 2011

Finally a hopefully creative output as promised in the blog’s title. At least, I think so.

Sometimes buying a card for a birthday is okay, but often something self-made says “I spent a lot of time because you’re worth it!” In my case, it also says “I was in a hurry again and couldn’t buy you anything so here’s something I made myself”.

For the following birthday message, you need the following things:
-LibreOffice
-A colour printer
-Scissors
-Hole puncher
-Sticky tape
-Some present wrapping cords (human entrails might be an acceptable substitute in some cultures)
-Two bookshelves to hang this up in between (or pillars, candelabers, one-legged giants – whatever floats your boat)

Self-made stuff is the best!

First, write your message in LibreOffice. Define the page as landscape, make every letter a different colour, raise the size of the letters to 168 and print all the pages.

Then, use your favourite browser to head over to http://www.openclipart.org/ and download whatever clipart you like. If possible, save the graphics in .svg format (scalable vector graphics) because it’s the easiest format to resize the clipart. Print them as well.

Cut out the letters in whatever form you want. I went for hearts for this one, but stars are also nice. If your friend gambles, consider diamonds or piks. If you want to befriend a monkey, banana-formed paper would help your advancements.

Cut out the clipart and glue or sticky-tape it to approprate places.

Punch a hole to the left and to the right of each page you cut out. Tie a double-knot into some present wrapping cord and insert them through the holes from behind and let the rest hang down in front. Place another knot in the front to prevent the pages from sliding apart too much. Also, gravity will pull everything slightly down. Best image a wide half-circle when punching the holes, this will save you some aggravation.

Use the sticky tape to hang up this ornamental writing wherever it can be seen but where it won’t accidentally behead people who run into it a full speed and at neck-level.

太好了! Realtime monitoring when recording with a GT-10 via USB

Thursday, August 4th, 2011

With my recently acquired Boss GT-10, I wanted to make some sound recordings via USB, just for the fun of it. Connecting all the devices was no problem at all and I was quickly able to listen to my playing on the pc’s audio output.

Recoding however was a different beast. The manual says to connect the GT-10 via USB to the computer and turn off  direct monitoring and all should be well. Hm… almost. As I’ve seen in the rolandforum, there are quite some people who can record but they all complain about the same problem: During the recording, there is no “live” sound, they can only hear what they played after the recording.

Here’s how to fix that on Ubuntu 11.04 (Natty):

1) Start the GT-10, click on “SYSTEM”, open the USB submenu.
Change the settings as follows:
Driver Mode: Advanced
Monitor Cmd: Enable
Dir.  Monitor: On

Restart the GT-10

2) Connect the GT-10 to the computer

3) Open the sound preferences.
On the tab “Input”, select the GT-10 as input device:

Set the GT-10 as the default sound input device

Switch to the Output tab.
Set the GT-10 as the default output device.

The GT-10 as output device

3) Connect your headphones to the GT-10

4) Record something and rejoice!

I think the main problem is that the manual focuses its descriptions of the difference between “Standard” Driver Mode and “Advanced” Driver Mode on the fact that in “Advanced” you can also send MIDI commands to the GT-10.
Another explanation as to why this is working might be that keeping Dir.Monitor “On” and plugging the earphones into the GT-10 rather than into the computer makes it work.

However that might be, if you follow the instructions above, you’re set for some USB recording with your GT-10.

Enjoy!

大成功! Japanese in LaTeX

Friday, July 29th, 2011

Urgh… today is a proud day for finally I got Japanese working in LaTeX files! Can’t believe I got to live to see this day!

If you need to get this working, too, follow these simple steps in Ubuntu:

1) Install the following packages:
texlive
texlive-latex-extra
latex-cjk-common
latex-cjk-japanese-wadalab

2) Download this tex example file:
http://pastebin.com/tasDkhZ3

3) Compile the using the following command:
pdflatex <file>.tex

4) Rejoice!

Some explanations:
texlive is of course the basic TeX distribution. The additional packages provide stylesheet files required by the example file (e.g. ucs.sty). Trying to compile without the package latex-cjk-japanese-wadalab results in the following messages in the log file:

LaTeX Font Warning: Font shape `C70/min/m/n’ undefined
(Font)              using `C70/song/m/n’ instead on input line 20.

! Undefined control sequence.
try@size@range …extract@rangefontinfo font@info
<-*>@nil <@nnil

Reason is, tex cannot find an appropriate font. Thus, the last package latex-cjk-japanese-wadalab must be installed which provides additional fonts for Japanese in tex.

One neat trick I learned during the process is the following:
If you get some warnings or error message about missing files in a tex log file, you can search for these file names on the Ubuntu packages page. Make sure you search in the content of packages! Sometimes this helps you to find which additional packages have to be installed!

But is it really worth it? Check out the following screenshot:

Comparison between TeX and PDF from LibreOffice

The pdf in the back is the compiled tex file, the one in front is a pdf file exported from LibreOffice. To be honest, the Japanese part look absolutely the same to me. Ergo: If you don’t have to deal with large documents and mixed texts, LO should do the trick as well.

Many thanks to Lucas for his help and the link to the example file! His article on TeX can be read in the 50th issue of the Ubuntu magazine “Full Circle
Thanks also to Simon whose help on TeX is always invaluable.

やった! IBus Input Method Preference finally working

Wednesday, September 8th, 2010

Ever since I started using my study needs pre-supposed that I was able to input English, Deutsch (German) and 日本語 (Japanese). Lately, 中文* (Chinese) has been added to this list as well.

Recently Ubuntu 10.10 (Codename “Moody Mastodon” – or was it  “Maverick Merkat”?) was released and since I usually test Beta releases, I went through the usual installation routine including additional software installations at the end.

At the moment, these installations include mnemosye, anki, vlc, audio cd extractor and torcs. Interestingly enough, GIMP seems to be back by default.

Lanugage customizations include adding German, Japanese and Simplified Chinese. After SCIM was deprecated, I switched to IBus as Input Method (either seems to work, so I don’t mind).

One thing that I never got to work so far was the combination for the next input method, which is Alt-Shift_L by default.

I suspect (but don’t have any conclusive evidence) this is due to this ominous Shift_L key. Is this supposed the left shift key?

Anyway, the following seems to work for me:

Configure the input method

1) Select the default Alt+Shift_L method
2) Get rid off it by clicking “Delete”
3) Click to add a new key combination
4) If your favourite modifier have not been added, check them (by the way, the “Windows” key or “Super” key as it’s called on Linux might work or not depending on your distro. Also: text the key combination before specifying it e.g. Ctrl+Alt+L will lock your screen which takes precedence over IBus key combinations.
5) Click on “Add” to have it added to the list
6) Close the window by clicking on OK.

Your screen should now look like below:

Screenshot-IBus Preferences

Screenshot-IBus Preferences

Start an application e.g. OpenOffice Writer or Gedit, kick off IBus by pressing Ctrl+Space and input cryptic writing at your heart’s desire.

IBus in Gedit

IBus in Gedit

I think this made my day 🙂

*Did you think it was 汉语? I think that refers more to the spoken language. Correct me if I’m wrong. Heck, even both might be correct.

Which is more practical to keep safe – Windows or Ubuntu?

Thursday, February 25th, 2010

Please note: As all my other blog entries, this is just my personal opinion. It’s based on experience at work or at home. The conclusions drawn may be wrong or biased but as I said, it’s personal.

I’ve come a long way with Windows, starting with the inevitable Windows 3.11, going through 95, 98, ME, 2000, XP, a short spin with Vista and finally Windows 7. Well, who hasn’t… As soon as internet connections became more common, Window’s shortcomings in security gained immediate attention and Microsoft responded (e.g. had to respond) with Windows Updates.

IMHO, Windows Updates has also come a long way. In a certain way, it is a reflection of the increasing complexity of Windows.

In XP, Updates could be installed from the Windows Updates website. Some installed without a restart, some updates required a restart but most of the updates installed fine and the following restart didn’t take very long.

In Vista and 7 though, Updates requiring a restart execute post-installation when shutting down AND they they execute post-installation configuration when starting the OS again. The effect on the user? Bewilderment and waiting time…

Not only for a common user, also for full-time IT personnels like me it’s impossible to foretell whether an update requires a reboot or not. Often, not even the description of the update is very helpful: “This update may require a reboot” mostly means it will require a reboot. Legalese phrases were never intended for humanity, only for non-humans… The reboot requirement sometimes differ depending on the server configuration – one particular update from January 2010 required not reboot on a WSUS server but required one a DC. I’m sure there’s technical reasons for that but still….

Oh, and this is just Windows and MS Office updates! Recommended updates for 3rd software such as .pdf readers (a particular bloatware comes to mind) also cries for reboots very often.

At least there is an alternative even on Windows… Foxit Reader. And there are others: OpenOffice, Firefox, VLC, Gimp and many more. They also need to be patched but uninstallation and installation can be completed with without a reboot.

My experience with Linux and in particular Ubuntu is not that old yet but has been growing deeper ever since. I’ve toyed with Linux distros since 1996 (SuSE at that time) but often I just installed a distro, played around with it and had to revert to Windows because specific 3rd party software was not available or some devices did not work or because it was just too impractical etc. (remember, it’s my personal opinion, I’m not trying to start a flame war).

However, for two years I’ve been using Debian at work and Ubuntu at home and I’m quite happy. At work, I don’t have to worry about updates as this is take care of by somebody else. At home, I can rely on apt-get to provide the latest updates quickly. The only updates that require a reboot are kernel upgrades (and very few others but I don’t remember what type they are – SSL-related?) and even 3rd party software upgrades are included. Not all but quite some.

Based on this experience I would rather recommend installing Ubuntu if I was asked by a novice computer user. The package is more complete, the installation of updates is easier, maintenance for the average user is easier. There is still the stigma of complexity to Linux but Ubuntu has made strides in that direction – even to the level where an average user can install and use it.

My conclusion should be quite clear: Ubuntu is easier to maintain safe than any Windows version.

I would like to add the following though: Regardless of what operating system you use, if you have a internet connection it had better be a broadband connection or a lousy dial-up connection. Broadband means you can regularly install updates without waiting 3 hours for the update to download and lousy dial up means your connection is slow that you are not a target worth hacking. Nonetheless, you should install updates whenever you can to keep your PC safe.

Sound problem in Ubuntu 9.10

Monday, February 15th, 2010

A couple a days ago, I installed a whole bunch of games, all from within Ubuntu. Compared to installations on Windows, it’s so easy although the revised Ubuntu Software Center is not really handy compared to the older versions (uninstalling several programs at once is such a hassle with the new version). IMHO there was no need to fix it, as it was not broken…
Anyway, after shutting down the laptop and restarting, there was no sound. Nada. The Hardware tab in System → Prferences → Sound was empty as well. I was still able to hear the drum roll when the X-server started but after that, nothing.
Based on experience, I started grepping processes for anything containing oss, esd etc. but couldn’t find anything suspicious. Some googling found me a good sound troubleshooting page for Ubuntu but still nothing.

In the end, deleting the following files and folders fixed the issue:

me@laptop:~$ rm .esd_auth

me@laptop:~$ rm -rf .pulse

me@laptop:~$ rm -rf .pulse-cookie

Please don’t ask me why and how I fixed that. My guess is that some game came with something that can’t handle pulseaudio yet. I’m just glad it works again.

Printing under linux used to be a pain but it’s getting better. Even newer gear such as a Canon MP640 works. Canon even released a nice shellscript that installs the printer, USB or wireless – your choice.

Transcend MP860

Sunday, January 17th, 2010

My trusty Samsung MP3 player is starting to show its age and as 500mb diskspace is not sufficient anymore, I’ve been looking around for an apt replacement for quite a while.

My requirements were:
-Has real buttons so I can skip files pressing the buttons while the player stays in my pocket
-Works on Linux as well
-File transfer and battery charging via USB
-Supports .ogg and .flac files (I ripped all my CDs to .ogg)
-Diskspace > 500mb
-Comes with a lock button that actually works
-Is not an iPod or Zune or some similar crap
Options were:
-No additional features such as radio, video playback etc. The simpler, the better!
-Supports multiple display language and file names

While there are quite a number of players that support .ogg files, not many work on Linux. After buying an external USB-disc manufactured by Transcend which works with Linux (supported on Kernel 2.4 and higher) I found the MP860 on their website www.transcendusa.com.
Some reviews found via google revealed that users were basically happy with the device and when I found the MP860 in a shop nearby I couldn’t resist. I’ve only used it for a couple of days but there are a couple of things I can tell you already:

-Works well on Linux (Ubuntu 9.10 in my case) as well as on Windows XP and later. Ubuntu recognizes the disc and mounts it automatically but I don’t know which filesystem it uses. The manual states you should explicitly specify dos when manually mounting the device
-Charging until the battery is full takes quite a while
-File transfer is quite slow
-Sound is not bad (I don’t really have a definition of “good” sound via headphones – I can hear the music which is good enough for me)
-The lock button works
-Interface language can be switched between several languages incl. Japanese
-The MP860 is really light-weight and feels like a plastic toy. To me, that’s a tad negative though

So far, all is quite well. I’ve discovered one drawback though: If you copy over a complete folder, the files are added in random order even though they are properly named starting 01_…, 02_…, etc. So far I have not been able to figure how they are sorted or how this behaviour can be influenced.
UPDATE: Transcend released another firmware upgrade on January 15th 2010 which I installed. Of course *arrgh* this must be done on Windows *sob*. After the Firmware upgrade I re-formatted the internal memory and copied the folders containing the .ogg files back on to the MP860. This time the files are listed in alphabetical order. Question now is, is that because of the new firmware or because I copied the files on Windows? I’ll have another look tonight on Ubuntu.
Also, the device comes with playlists but the handling is quite fiddly and creating a playlist (actually a podcast shoutlist) created on Rhythmbox copied over is neither recognized nor playable. Same goes for .m3u play lists.
UPDATE2: Just checked it on Ubuntu – still the same problem. The correct alphabetical order of files in folder in the internal memory was due to the files being copied over from Windows. What a letdown… 🙁

UPDATE 3 & Solved (?)
It looks like copying files via cp -r <folder>/ <targetfolder>/ rattles the files into a random order on the MP860 which can play the files only in the order they were copied onto the device. Here’s a workaround though: instead of copying files via Nautilus or cp -r <folder>/ <targetfolder>/, try cp <folder>/* <targetfolder>/ – the wildcard expansion apparently queues the files in correct alphabetical order and copies them one by one.
Technical support at Transcend was friendly but not so helpful. Thanks to Salvatore for the hint about the wildcard…

I haven’t contacted Transcend about this yet but if you know something, please let me know….

The lock button does what it’s supposed: If the device is locked, it can’t be turned on (accidentally or on purpose). Apparently this was fixed in the first firmware upgrade which was already installed when I bought the MP860.
The MP860 can also play back videos (the converter tool only works on Windows) and it comes with a radio. As long as these features don’t kill the battery life I’m happy without using them.

cheers

m.