[HOWTO] Fixing Samba sharing in LMDE

With all the goodness in Linux Mint Debian Edition (LMDE) there are some problems, like the fact that sharing files and folders with Samba doesn’t work. Had I checked the Linux Mint Forums sooner I would have seen the fix for the problem in the Tutorials section, and since I’ve finally found it I wanted to share it here to help everyone else find it. The tutorial is written with GNOME’s Nautilus file manager in mind but it works just as well for KDE users like myself. I’m going to give both the GNOME and KDE versions of the first step but the rest of the steps work beautifully regardless which desktop environment you prefer. Please note that if you use Xfce as your DE I have no idea if the steps need to be changed to work with it.

1. Enable “Guest Access” in Samba
For some reason this is disabled by default in LMDE but it’s an easy fix for it. Open the Samba configuration file as root in your preferred text editor. If you use GNOME run this command in your terminal

gksu gedit /etc/samba/smb.conf

If you’re a KDE user like me run this command in either your terminal or in the Run Command Interface

kdesudo kate /etc/samba/smb.conf

Once the file is open in your text editor add these two lines to the [global] section

usershare allow guests = yes
map to guest = Bad user

It doesn’t matter where within [global] you put those two lines. I put them at the bottom of the Misc. section (line 231) but you can put them right below the [global] section header around line 34. Once you have put the lines into the file save it and close it, then restart Samba by running this command in your terminal

sudo service samba restart

2. Add yourself to the correct usergroup
As things stand you won’t be able to create shared files and folders because you don’t have the right permissions. This is an easy fix by running this command in your terminal

sudo gpasswd -a your_user_name sambashare

Replace your_user_name with the name you use when logging into LMDE. Keep the terminal open because you’re not finished with it.

3. Install samba client packages
There are four packages you will need to install  on your system before you can set Samba to share files on your system. Run each line one line at a time in your terminal

sudo apt-get install gvfs-fuse
sudo apt-get install libsmbclient
sudo apt-get install smbclient
sudo apt-get install python-smbc

Now add yourself to the fuse group to make sure you have the permissions needed for actually using these packages

sudo gpasswd -a your_user_name fuse

again replacing your_user_name with your user name on the system.

4. Log out and back in for the group changes to take effect
That’s right, it’s that simple. If you’re running GNOME you may find that the “Create Share” button in Nautilus abruptly closes and your desktop will disappear but there’s no need to fear because it will return. There’s probably a bug filed with Debian about it but I haven’t seen it or a workaround for it yet. If you’re running KDE you don’t need to even worry about it because I didn’t see the glitch on my laptop.

Thanks to Linux Mint Forums user altair4 for writing the tutorial I found. You can find it, and other posts on the matter in the thread How To – Simple File Sharing in Mint on the Mint Forums.

[HOWTO] Install Dropbox on LMDE with Debian Testing with KDE SC 4.7.2

Dropbox is one of those apps that I’ve used for years and use it to store my personal web start page online so I can use it when I don’t have access to my laptop, such as when I’m surfing the web on my phone. Unfortunately when I made the upgrade to LMDE with Debian Testing and KDE SC 4.7.2 my Dropbox broke. The problem is that I’ve edited my start page a couple of times and haven’t had the time to upload it to Dropbox through their web front end.

The problem is that Dropbox depends on libnautilus-extension1 but I have libnautilus-extension1a installed. Today I finally did some digging and found out that you can install Dropbox by building it from the source code. Go ahead and download the tarball and extract it, then open a terminal window on the directory you extracted the tarball to. Before you can start compiling the code you’ll need to take care of the dependencies by running this command

sudo apt-get install libnautilus-extension-dev docutils-common docutils-doc python-docutils python-lxml python-pygments python-roman

Now you’re ready to compile the Dropbox code and get it installed. Run these lines one at a time in your terminal, fixing any problems as they come up

./configure
make
sudo make install

You shouldn’t have gotten any error messages so now you need to restart Nautilus, even if you’re running KDE. You can do this by running sudo killall nautilus in your terminal but if you’re running Compiz your system may lock up so just log out of your computer and log back in. When you log back in you should see the Dropbox icon in your system tray. if you haven’t had Dropbox working on your system before you’ll need to set it up, but since I did have it working it saw my settings and even started updating my files on the Dropbox server without my having to do a thing,

What about the KDE Dropbox?

Being a KDE user I definitely prefer to use Kfilebox, also known as Kdropbox, rather than the default Nautilus tools. I already had the DEB package for Kfilebox on my hard drive so I tried to install it, only to get told that the kdelibs5 dependency can’t be met. I tried downloading the source code for it and building it myself, once I had G++ installed, but it complained about not being able to find something in /usr/lib/libkdecore.so.5 and since I don’t have the time to chase it down today I’ll just stick with the normal Dropbox installation. If someone knows how to get Kfilebox installed please leave it in the comments.

[HOWTO] Run scripts in KDE before KDE starts

One annoying little things about being a KDE user, whether I’m running LMDE or any other version of KDE is that it seems to ignore my setting to leave my system’s NumLock setting (on) alone when it starts. The problem is that KDM, the KDE Desktop Manager and also known as the Login Manager, loads in before the main part of KDE does so the BIOS setting is already changed by the time KDE ignores the possibility of changing the setting. Thanks to the good folks over at Make Tech Easier I’ve found a trick that fixes the misbehavior.

KDM has its own startup script called Xsetup, and will execute anything in that file before KDE itself launches. To make sure KDE turns on the NumLock, or to make sure it stays on, you can install an app called numlockx and use the app to turn the NumLock on before the main part of KDE even loads. To do this just follow these steps:

  • Install numlockx. You can do it via a package manager or open up a Konsole window and run sudo apt-get install numlockx .
  • Open Xsetup as root by pressing Alt-F2 (or whatever key combination you’ve set to launch the Run  Command Interface) and run kdesudo kate /etc/kde4/kdm/Xsetup .
  • At the bottom of the file* add numlockx on and save the file.

That’s really all there is to it. The next time you boot your system into KDE the NumLock will be enabled for you automatically. Please remember that anything you put into Xsetup will be run as root and will be available to any user who boots into KDE on your computer so be very careful not to put anything into that file that could break your system. But you’re not restricted to using Xsetup for things like turning on your NumLock. The article from Make Tech Easier uses the example of configuring your display settings before KDE starts, and I’m sure there are other things that could be done this way.

*-If your Xsetup includes the line

x/sbin/initctl -q emit login-session-start DISPLAY_MANAGER=kdm

you want to put whatever you’re adding to the file before this line.

[HOWTO] QuickTip: Change the image for the cap on KDE4′s desktop cube

KDE4 is known partly for it’s lovely eye candy, and one of the things former GNOME users love is the ability to have a desktop cube like you can have in Compiz. The one problem is that while you can change the background image (like Compiz’s skydome) you can’t change the image use for the top and bottom of the cube.

Except that’s not entirely accurate,it turns out. I did some searching to see if I could find any way to replace the image and I found two different sites with the information I needed, one in Italian and one in English. Here are the steps you need  to follow.

  • Open your favorite image editor and create or resize an image so that it measures 800×800 pixels. Make sure the image has a transparent layer . In Gimp you want to use Layer > Translucency > Add Alpha Channel. Save the file with the name cubecap.png.
  • Copy the file to /usr/share/kde4/apps/kwin, replacing the image already there. I strongly recommend making a copy of the current cubecap.png so you have it in the event you want to get back to the default.
  • Open the Desktop Effects settings, select the Desktop Cube effect and open the configuration window by clicking on the wrench button. Go to the Advanced tab and clear the checkbox for Display image on caps, then then check it again. Click on OK to close out the settings dialog.
  • Hit the key combination for using the desktop cube, Ctrl-F11is the default, and drag your cube down to show the cube cap. Voilà! If you did everything correctly you will see your new cube cap.

You will have the same image on the top and bottom of your cube, and unlike with Compiz there’s no way to use different images for the top and bottom of your cube, but at least you can change the image you use for your cube cap.

If you use a desktop sphere rather than a cube you can see KRAM’s post on the PC Pitstop Forums for information on not only how to change your car but also how to fit your image for the desktop sphere.

Thanks to KRAM for the English language instructions and to NiCo on the Mandriva International Backups forum for the Italian version of the instructions. that first showed me the change was possible.

[HOWTO] Preview your Plymouth themes without rebooting

I was doing a search to try to figure out why my Kmint theme for Plymouth won’t work properly and I found a couple of really nice tools. The first is a sunrise theme plus an app called EZSwitch that lets you change your Plymouth them via a GUI. The second is a way to actually preview your Plymouth theme so you can see if it works without having to reboot your computer. It’s part of a Plymouth theming guide out together by Charlie Brej. In the first post of that series he gave instructions for viewing your current Plymouth theme. You could run these three commands:

  • Open a terminal as root, and run plymouthd to start the Plymouth deamon
  • Show the current splash by running plymouth --show-splash
  • Quit the demo by running plymouth quit

I say you could run those commands but I recommend against doing that because once I had the daemon start showing the splash I found that I got locked out of my system while the splash screen ran. I don’t know how long it was going to take, or even that it was waiting for a command to finish, and had to force a reboot to get control of my system back, Luckily there’s an even better way to preview the splash screen. Open a terminal and get full root access by running su and entering your password. Be very careful what commands you run as root. You could mess up your system with the wrong command and not even know it until it’s too late.

Once you’ve gotten root access in your terminal run this longer command:

plymouthd; plymouth --show-splash ; for ((I=0; I<10; I++)); do plymouth --update=test$I ; sleep 1; done; plymouth quit

That command starts the Plymouth daemon, shows the current active splash screen, and quits.

Want to look at a different Plymouth theme? You can fire up EZSwitch if you have it installed or else run this in a terminal as root:

plymouth-set-default-theme --list

You should have a number of themes installed on your system. To pick a different theme replace --list with the theme name. For example, you can select the solar theme you would run

plymouth-set-default-theme solar

As always, when you changing your Plymouth theme you need to make sure your system by running

update-initramfs -u && sudo update-grub

Now you’re ready to preview the theme by running

plymouthd; plymouth --show-splash ; for ((I=0; I<10; I++)); do plymouth --update=test$I ; sleep 1; done; plymouth quit

Big thanks to Charlie Brej for writing his Plymouth theming guide.

Posted in GNU/Linux, Linux Mint, Open Source. Tags: , , , . Comments Off

[HOWTO] QuickTip: Install packages graphically on LMDE running KDE

Just a quick post to pass something along I just discovered. When I got my laptop with LMDE on it I had no problem double-clicking on Debian packages I had snagged and having Gdebi launch so I could install them, but the moment I installed KDE I lost that ability and couldn’t figure out how to get it back. Yes, I know I could install packages from the command line with a simple sudo dpkg -i [package name], but that’s a bit of a pain in the rear for someone who prefers to use GUIs for things whenever he can.

This morning I was checking out the latest post on Linux Mint 12 on the Mint blog and I noticed that “packages now open with gdebi” and just on a whim I fired up the Software manager and did a search for “gdebi.” Sure enough, I found gdebi-kde, and installed it, then I checked my theory by double clicking on a package I had installed. As I hoped, Gdebi opened in a window and asked me if I wanted to install the packge.

I’m a happy penguinista.

Posted in GNU/Linux, KDE, Linux Mint, LMDE. Tags: , , , , , , , , . Comments Off

Fixing the not quite transparent panel issue

The elementary theme on my Ubuntu system, with it's not quite transparent top panelIn the process of trying out new themes for my Ubuntu system I came across the elementary theme from the Elementary Project (theme files came from their PPA on Launchpad), which I find I rather like, except for one thing. My top panel in GNOME should be pretty transparent but there are some sections that show a very visible background. It doesn’t happen much,  just for a few applets, namely the GnoMenu, timer and the clock applets. That’s bugged the daylights out of me, but I finally found a solution for the problem.

While perusing the newer (to me) posts on the Jovial June Screen shots thread on the Ubuntu Forums user TheNessus asked koleoptero about the problem that he had on his system with a theme that koleoptero made.

I’m using your gtk theme but cannot make the panel transaprent, it only makes parts of it transparent, but not the applet backgrounds as well. Dunno..

koleoptero knew just what he was talking about, and told TheNessus

Yeah you’re right. You have to go into the theme’s folder/gtk2.0/ , open the gtkrc file, find the panel line that sets the default panel background and comment it out (add a # at the beginning). It’s easier than it sounds. The panel part has a whole title saying it’s the panel part. After that reload the theme.

As TheNessus pointed out in the very next post on the thread, the file in question is the panel.rc file. I fired up Synaptic, did a search for the elementary theme, and found it in /usr/share/themes/elementary. Since I needed to edit it as root to apply the fix I simply copied that entire folder to ~/themes so I could make the edits without messing up the original file or finding my changes replaced when the theme gets updated. The first thing I did with my copied folder was to rename ~/.themes/elementary/elementary to peng_elementary (both the theme folder and the file got that name to help tell it apart from the original elementary theme components), and I then edited the file to change line 3 from

Name=elementary

to

Name=peng_elementary

This is just to let it show up in the theme customization dialog so I’d be able to tell exactly which components I’m dealing with. Then I edited ~/.themes/peng_elementary/gtk-2.0/Apps/panel.rc to comment out the line setting the panel background. While every theme may have it in slightly different locations you want to look for the panel.rc file in either [theme_root]/gtk-2.0 or [theme_root]/gtk-2.0/Apps. On line 7 I changed

bg_pixmap[NORMAL] = "/Panel/panel.png" # Disable for normal panel backgrounds.

to

#bg_pixmap[NORMAL] = "/Panel/panel.png" # Disable for normal panel backgrounds.

Then save the file and close your editor, then open System > Preferences> Appearance. If you’re changing the appearance you now use I’d select another theme, then close the Appearances window, just to make sure your system loads in the edited files. Reopen Appearances, select the theme you’re editing, and click the Customize button. In the Customize theme dialog stay on the Controls tab and select the modified theme you created.

Close the Customize dialog and click the Save As… button. Give the theme a name that will let you know it’s your modified theme, save it, and close the Appearance window. Voilà! You have gotten rid of the non-transparent backgrounds behind your panel applets.

My edited elementary theme on my Ubuntu system, with it's now transparent top panelYou may notice that my modified elementary theme doesn’t use the traditional elementary icons. When I was customizing the theme I also switched from the elementary icons to the Mac4Lin icons because I’m not 100% thrilled with all of the elementary icons. One of these days I want to create a mashup icon theme to use some elementary icons and some Mac4Lin icons. Unfortunately Mac4Lin’s icon theme is set up to allow compatibility with older style GNOME icon themes so updating it to make it work with the current GNOME icon theme specifications is very tedious process.

Posted in GNU/Linux, Ubuntu/Kubuntu. Tags: , , , . Comments Off

Snagging videos in Firefox more easily

Last year I finally got tired of the Firefox bloatware and made the switch to the GNOME project’s Epiphany web browser, although I kept the Fox around for those rare times that I simply couldn’t do in Epiphany, or at least couldn’t do that easily. One of the tasks that I kept Firefox for was downloading videos. While Epiphany does have a very nice extension for downloading videos it simply isn’t as robust as the Video DownloadHelper extension for the Fox. Not only does the Firefox extension let you prefer high quality YouTube videos and even pick which high quality vid you want to use if there are more than one available, it is also smart enough to use the video name from YouTube.

Disclaimer: This tutorial is solely intended to help you enjoy Flash videos when your system runs slowly enough to make you want to view it in a desktop video player like Totem. It is written purely for your own personal entertainment and not to help you download videos for the purpose of sharing them with others. Remember, if you find a video that you just have to share with someone you should send them the URI. That way the hosting web site gets to see how popular their video is.

My problem is that while I can enjoy videos in Epiphany the Flash plugin ends up making the video stutter, which can be a royal pain in the arse. This is especially annoying when I’m trying to enjoy highlight videos from Dodgers games so I tend to save those to my hard drive and simply fire them up in Totem. Unfortunately Epiphany’s extension doesn’t know how to snag videos from mlb.com, or the videos from my local CBS affiliate (I tend to snag video weather reports for my E100 so I can watch them when I’m away from my comp) so getting vids from either site sends me to Firefox. For some reason the Video DownloadHelper knows how to grab vids from both of those sites so until I can help port that info to the Epiphany extension I’ll have to turn to the Fox to help me watch them.

Firefox video capture slide 1The problem comes when you try to download a video from these sites because there’s no descriptive name affiliated with the video’s filename, so even if you have that option selected for YouTube videos when you try to download the video you get what is shown on the right. (All images on this post will open in a new tab/window so you won’t keep having to use the Back button to get back to this post.) If you only want to snag a single vid it’s no problem but if you want to get at least a pair of vids you end up having to rename the vids yourself.

Firefox Video DownloadHelper PreferencesToday I found a way to get the name set for sites that don’t have a setting for knowing where the video name is located. The very first thing you will need to do, once you have the extension installed, is to enable the option in the preferences. If you have an icon visible simply right click the icon and select Preferences. Now go to Capture > Smart Naming and check the box for Enable Smart Naming.

Close out the Preferences window and select the name of the video as it’s shown on the webpage. Right click the selected text and select Smart naming > Define media title location. You’ll see a dialog pop up where you simply need to confirm that the text listed as the Value for this page is the same as the title you want to assign to the video. This is perfect for those times when you inadvertently select the entire text, and you need to add a letter or so to the beginning or end to the Value. Once you have it matching the text on the web page simply click on OK.

Firefox video capture slide 2

Now when you use the icon to select which video you want to save you get a much more informative filename.

Firefox video capture slide 4

The best part is that every time you visit the page the extension now knows where to look to get the video name, and if you look at multiple videos before deciding to grab one it’s a piece of cake to tell exactly which video you want.

Firefox video capture slide 6

Unfortunately this won’t work on all sites, as I found when I tried to get the latest weather forecast. The bottom line is that if you can’t select the text it won’t work since the function relies on having HTML code to look at rather than text with a Flash application as my local CBS affil uses.

[HOWTO] Grab your favorite YouTube vids in Epiphany

It’s bound to happen every now and then. Your surfing through the videos on YouTube, marking some of them as Favorites and putting some on playlists to share with others. But every one in a while (or more often), you find a vid that you absolutely love and wish you could snag for your hard drive so you can always have it handy for when you want to watch it again.

Firefox users have the VideoDownload Helper extension to save and even convert your favorite vids. But perhaps you’re like me and prefer to use GNOME’s Epiphany web browser. Except although Epiphany is based on Mozilla’ s Geko rendering engine,  you can’t simply install Firefox extensions into Epiphany. Luckily there are quite a few extensions for Epiphany (as well as third-party extensions, as well as unofficial extensions) and one of them is Adam Schmalhofer’s Video Downloader extension.

While it isn’t as flexible as the Firefox extension, Adam’s extension brings a much needed ability to Epiphany. The first thing you will need to do is make sure you have Clive installed (install via apturl), as Clive does the heavy lifting of downloading and converting the video for you. Once Clive is installed snag the files for the Video Downloader from Adam’s brzr repository (yes, you can simply grab the files from the page I linked to). The main files you need are video-downloader.ephy-extension and video-downloader.py, but you can grab the other files if you want. I strongly suggest grabbing the README file (or README.it if you speak Italian).

Epiphany download locationOnce you have the files downloaded, move (or copy) the files to ~/.gnome2/epiphany/extensions and launch Epiphany. You can move the files into that folder while Epiphany is running, but I recommend at least closing and relaunching Epiphany when installing any extensions. Now, before we enable the extension there is one thing that absolutely has to be done. Get into your Preferences window by running Edit > Preferences from within Epiphany. Even if you want Epiphany to ask you where to save your downloads each time, this extension requires that you have a location specified. Click the box for Automatically download and open files and select the location where you want Video Downloader to save the videos for you. If you want to be prompted where to save your other downloads then simply clear the checkbox once you make your selection. I decided to use the same folder that the Firefox extension uses, simply to keep things simpler. Unfortunately Video Downloader is unable to ask you where to save each video you download with it, so you have to set this preference via the Preferences dialog, but hopefully it will come in a later version of the extension.

Once you have the files in the proper folder (~/.gnome2/epiphany/extensions), you have Clive installed, and you have selected where the downloaded videos should go, it’s time to enable the extension itself. Simply go to Tools > Extensions and check the box for the Video Downloader extension. Once it’s checked you’re ready to start downloading.

Epiphany Video Downloader iconGo to the page for your favorite YouTube video, and once the page is finished loading you will see a film icon in your status bar. (My screenshot shows the icon from the Mac4Lin theme. You can see the default icon on the extension’s page.) Simply click on the icon and the video(s) on the page will be downloaded as MP4 video files to the location you specified.

One very nice feature I found about from Adam this morning is available if you do a middle-click on the icon. In Firefox and Epiphany middle-clicking a link will open it in a new tab, and if middle-clicking the icon will attempt to load the video file into a new tab. Epiphany Video Downloader middle-clickWhat I discovered today, however, is that when I middle-clicked the icon I got an offer to either open the video or simply save it for me. As you can see from the screenshot, RealPlayer 11 is installed on my system and registered as the default MP4 player, and I’m asked if I want to open the file in RealPlayer 11 or save the file. Selecting Save As… will give you the file picker window so you can save the video file wherever you want it, and you will also have an opportunity to rename the file however you want.

For a list of all of the sites that Adam’s Video Downloader extension will work on, simply check out the README file.

I want to send a yooouge THANK YOU! to Adam Schmalhofer for all his help as he helped me resolve some issues I was having. That dude totally rocks, and I owe him several brews.

Peng’s links for Friday, 13 Mar

[Corrected the first link. Thanks to Nick and Keba for pointing it out. -Peng]

I bet you guys thought I wasn’t going to post any links this week. I’ve actually been snagging a bunch of links into a gDocfile so I can share them without clogging up my feed reader with unread posts. Unfortunately there are a bunch of them, so rather than give you the link with my thoughts on each I’m just going to copy and paste the links for you. Feel free to follow any and all links that tickle your curiosity.

Whew! That should give you some things to read over the weekend. 8-) I know some of the articles are from late last month, but that’s how long I’ve been grabbing these links and I wanted to make sure you guys had seen them.

Have a great weekend, and don’t forget to let your favorite open source devs know you appreciate all their hard work. And speaking of hard work, I have an idea for a promotional vid or two, and if all goes well I may have some footage for you guys to check out sometime in the next month or so. See y’all next week!

Follow

Get every new post delivered to your Inbox.

Join 158 other followers