Tagshell

Linux Shell Prompt Customized

Yes, I know it is not the most exciting thing in the world, but the simplest things are often the most meaningful, and for those of us who grew up before windows, or for those n00bs who are brave enough to dare travel the land of the command line, here’s a tip for you.  (That was all in one sentence… and it felt good)

You can customize your prompt in order to make it more effective.  My default prompt was about half a line long and didn’t really contain much useful information to me, so I changed it, including added a little color. Me? I like to see the time and my current directory, so that’s what I added using the instructions here, and even fancier color management instructions here. Simply put, I edited my .bashrc file’s prompt entry to the following. If you haven’t done this kind of edit before, first make a backup copy file.

PS1="\e[0;35m[\t]\e[m\w$ "

*UPDATE*

Ok, the above line looks pretty, but the text wrapping gets funked up. You have to put escaped opening and closing square brackets around the color code chunks.  The following revised line works great.

PS1="\[\e[0;35m\][\t]\[\e[m\]\w$ "

And here’s the before and after.

Ahhh…   almost zen.

Detach Process from Terminal Window

Running Ubuntu Linux and am starting an application process from my terminal window. The problem is, that window is then basically locked, not allowing me to execute more commands while the spawned application is running. To fix this, I found this command, where I basically add a & to the end of the line.
i.e.

~/tools/shell/mycommand &

This allows me to execute the command and gives me back access to the command prompt to execute more commands.

So the next issue I have is, if I close that terminal window, all processes that were spawned from that window are instantly killed. No warnings, pleases or thank-yous. That’s scary for those of us that don’t save often. Ah, but there are more solutions. After executing the command, as shown above, simple execute the following command, and it will separate spawned processes from that terminal window.

disown

Or, simpler yet, why not just kick the application off from in an independent process, right from the beginning, with this util-linux command.

setsid ~/tools/shell/mycommand

Icons on Ubuntu Menus

I was wondering where the pretty little icons were for my menus while using Inkscape.

This shell command (from UbuntuForums.org)  brought them back.

gconftool-2 --type bool --set /desktop/gnome/interface/menus_have_icons true

Linux (Ubuntu) Notes

Houdini

Installing Houdini 10 on Ubuntu 9.04 was pretty simple. Extract the TAR file and run the installer with
sudo houdini.install
The options let you decide which license server to install, as well as whether or not to create the start menus for you.

Once Houdini is running have to remember to disable the Alt hotkey in the Window Manager control panel, otherwise your Alt+clicks will not work. This can also be completed with the Compiz Settings Manager in 12.10, but it needs to be installed first.

sudo apt-get install compizconfig-settings-manager

Shake 4.1 (64 bit)

Here’s the stripped down simple instructions for installing Shake 4.1 on Linux, specifically, tried this on Ubuntu 10.10. More details can be found here.
mkdir -p /usr/nreal
cat shake-linux-v4.00.0607.tgz | (cd /usr/nreal; tar zxvf -)
ln -s /usr/nreal/shake-v4.00.0607 /usr/nreal/shake2

install getlibs from…
http://frozenfox.freehostia.com/cappy/

sudo getlibs -32 libXext.so.6
sudo apt-get install csh

Besides the libX11.so.6.2.0 => libX11.so.6, you will also need libXi.so.6 => libXi.so.6.0.0. You can get this from the libxi6_1.2.1-2ubuntu1_i386.deb package. Details here.
/usr/nreal/shake2/bin/shake

Keyboard & Mouse Setup

After a reboot and test of the new key, I remapped my mouse buttons with some help here.

I first use “xinput list” to get the name of the device.

I next use “xev” to find out what my mouses Middle and Thumb button positions were (2 & 9). In the command below, positions 2 & 9 have a value of 2, which is equal to my middle mouse button. Yup, I want two middle mouse buttons, so I can alternate when I feel like it.
xinput set-button-map "Evoluent Vertical Mouse 2" 1 2 3 4 5 6 7 8 2

And for my IntelliMouse Optical (best mouse EVAH!!)
xinput set-button-map "Microsoft Microsoft 5-Button Mouse with IntelliEye(TM)" 1 2 3 4 5 6 7 2 2
To save my wrists from tension, I’m lowering the mouse speed.
xinput -set-prop "Microsoft Microsoft 5-Button Mouse with IntelliEye(TM)" "Device Accel Constant Deceleration" 1.5

Trackball settings for left and right-handed use. Hmmm… a shell script file for switching hands would be even better…
xinput -set-prop "Logitech USB Trackball" "Device Accel Constant Deceleration" 1.5
xinput set-button-map "Logitech USB Trackball" 1 2 3 4 5 6 7 2 1

Joystick / Gamepad

Found this link which contains info on how to install Microsoft SideWinder digital joysticks and gamepads (along with many others.
sudo modprobe sidewinder

Microsoft xbox controller then the command is

sudo modprobe xpad
then
jscalibrator

Skype

Next step… getting Skype to work properly. I can use my microphone, but noticed that Skype isn’t receiving any input. I’m hearing that I should first install Pulse Audio.

Hmmm… so now I can still record (luckily) but not in Skype. Gah! K, now for Skype’s Linux sound FAQ.

More specifically, I”m going to try this thread that talks about Skype V2 and PulseAudio support (the solution seems to be downgrading..

Wacom Intuos4 drawing tablet

Lastly (I hope) I needed to get my new Wacom Intuos4 tablet working. The Wacom drivers built in to the 9.04 build work with all devices, prior to the Intuos4. Luckily, I didn’t have to run through the full install of the latest drivers supplied at the Linux Wacom Project. I only needed to compile some of the files and replace existing ones. This info was very helpful in getting everything working. Specifically I used the “animone” post to get the Wacom pen working. However, I have not yet setup the pad.

Running a dual monitor setup, I wanted to restrict the tablet stylus to the left screen. According to this thread (thx Ben Simmons), I had to do a matrix transform. Luckily, I didn’t have to do any math to get it to restrict it to the primary monitor.

xinput set-prop "Wacom Intuos4 6x9 stylus" --type=float "Coordinate Transformation Matrix" 0.5 0 0 0 1 0 0 0 1

or, if you want to use your Wacom on the right monitor:

xinput set-prop "Wacom Intuos4 6x9 stylus" --type=float "Coordinate Transformation Matrix" 0.5 0 0.5 0 1 0 0 0 1

You can even get a little creative by having the eraser control one monitor and the stylus controls the other. Just use “Wacom Intuos4 6×9 eraser” instead.

Firefox

First, gotta get the middle-mouse scroll enabled so I can casually slide down the pages. You might have to first disable the auto lookup URL thingy. While lookin around also found out about the middle-mouse paste. Nummy : middlemouse.paste

Synergy – Control the Desktop of Two Computers.

To install it I just ran apt-get synergy to install it. I then used these instructions to setup and run the server.

Simon – Simple Speech Recognition

Hmm, judging by this demo, it doesn’t look like it’s really “speech recognition”, but “voice commands”… ? Will have to look into further.

Plastic Animation Paper

Trying to get Plastic Animation Paper working on linux is going to be a bit tricky. I can see that already. There are minor issues with the Wacom tablet, but much larger issues with the sound drivers. Also, noted that with 9.04, PAP couldn’t find the libstdc++5 libraries, but I got the package here and all is good.

So, with the sound stuff, it appears that I’m not the only one having issues.

I think I’ll just stick with Pencil for now at is suits my animation needs… on Linux. Just came across this MyPaint app too.

USB Network Card (DLink DWA-130 v B1)

Used this link in order to download the necessary ndiswrapper packages from another computer that had internet.

DLink had the drivers on their website, including 64 bit versions.

Then made sure to blacklist the built-in drivers that might conflict, using this link, and this one.

echo -e "blacklist bcm43xx\nblacklist b43\nblacklist b43legacy\nblacklist ssb" | sudo tee -a /etc/modprobe.d/blacklist
blacklist rt2400
blacklist rt2570

Not sure if I needed this, but I put the below lines in, based on this thread.
sudo gedit /etc/NetworkManager/nm-system-settings.conf
under [ifupdown], change managed=true

Copy CD/DVD

Fire you must unmount the drive that you plan to copy, i.e. :

sudo umount /dev/sr0
next you can use readom to make an iso image of the drive.

readom dev=/dev/sr0 f=~/Desktop/myImage.iso

Shared Network Folders

When right-clicking a folder on the server machine and trying to share it, it will automatically ask you if you want to install the services for sharing. Do it!

Next, you will need to install smbfs on the client in order to mount to this new share.
sudo apt-get install smbfs
Finally, we will need to create a folder then mount to this newly created folder.
mkdir ~/othertunes

sudo smbmount //192.168.1.14/music ~/othertunes -o username=bill,password=nooneknows,uid=1000,mask=000
So that both machines have the same relative references, I can make a symbolic link. For example, on the server machine I would type the following command.
ln -s ~/music ~/othermusic
This thread seems to be a good location for tips on mounting shares and securities.

Zipped Files – Staying Compatible with Windows Systems

sudo apt-get install p7zip

Compiz

Compiz is installed by default in 10.10, but you have to activate the extra plugins in order to get the sphere of awesomeness.
sudo apt-get install compiz-fusion-plugins-extra
For Ubuntu 12.10 (specifically to disable the Alt-Click window movements) I installed the compiz settings manager.
sudo apt-get install compizconfig-settings-manager

terminal shell cheat sheets

http://www.pixelbeat.org/cmdline.html
http://files.fosswire.com/2007/08/fwunixref.pdf

© 2017 Jer's Life

Theme by Anders NorenUp ↑