Assorted *nix questions

HavocXphere

Honorary Master
Joined
Oct 19, 2007
Messages
33,153
Reaction score
1,297
Location
Europe
All questions are Kubuntu/Ubuntu...haven't decided but probably Kubuntu. Loads of questions, so short responses are cool too.

NTFS mounting - can it be made read-only?

NTFS write mounting - what are the chances of it breaking an NTFS partition? Is write support still experimental/beta?

Can *nix share files in MS style with Samba or is Samba only for accessing shares?

I don't understand what xorg.conf and x11.conf is. I know its something configurations for something to do with graphics...but what exactly?

There is a shortcut that kills the graphical UI...what is the shortcut and why would I want to do that? How do I restart the UI once I killed it?

I don't get the whole file extension thing on *nix. Some have extensions others don't. How does the OS know what to do with those that don't?

From what I can tell, 5 button mouses/mice are not supported. Is this correct? (Logitech MX desktop). Is there an easy way to enable the scroll wheel without editing configs?

What are the most important config files I need to know about?

My last attempt to get rid of the brown default theme on ubuntu failed miserably...got a bunch of files with no instructions on how to install them. Is there a noob friendly way/site of changing the look? Not compiz for now...just the plain theme.

I'm looking for something similar to Vista's search box in the start menu...something that will help me find stuff in the linux menu and maybe files/folders in /home too. There is a Strigi desktop search but it doesn't seem to cover the stuff in the menu at the bottom right.

This Lost+found thing...what is it? File fragments recovered off the HDD?

Is there a way to completely disable root pwd prompts? I know its for safety etc...but I'm not too stressed about breaking *nix atm. I'll end up reloading it a few times anyway in all likelihood.

When I switch desktops the taskbar doesn't switch too. i.e. everything is on the TB irrespective of which desktop I'm using. Is there a way to change it so that only the stuff on that desktop is displayed on the TB?

How do I make a "shortcut" thing so that I can type "adept" into the run command box instead of adept_manager? I assumed I need to put a script of some sort somewhere.

In the process manager, there is user % and system %. What is that?

Any cool linux sites that you guys frequent?

Any must-have stuff you would recommend? (Aside from restricted packages...i know about those). Admittedly that is a kinda broad question.:o

Thanks in advance.
 
NTFS mounting - can it be made read-only?

NTFS write mounting - what are the chances of it breaking an NTFS partition? Is write support still experimental/beta?

Use "ro" in the options, either by supplying "-o ro" when mounting manually or specifying "ro" in /etc/fstab

Write support have improved in the latest releases, but I would personally not try it on a partition with critical data.

Can *nix share files in MS style with Samba or is Samba only for accessing shares?
Yes. See the docs here.

There is a shortcut that kills the graphical UI...what is the shortcut and why would I want to do that? How do I restart the UI once I killed it?
Easiest do kill the GUI, is to press Alt+Ctrl+F1 when in the GUI/Login screen. Login at the console as root, and type "/etc/init.d/xdm stop". This will stop the X server.

I don't get the whole file extension thing on *nix. Some have extensions others don't. How does the OS know what to do with those that don't?
Everything in *nix is files. You have special files that show that it is a device, etc. File permissions will determine if it is executable. If you do a "ls -l" command in the shell, you will see the following:
  • drwxr-xr-x - This is a directory
  • -rwxr-xr-x - This is a executable file
  • -rw-r--r-- - This is a normal file

Great source of info is the Rute Manual. Will answer a lot of questions.

For Ubuntu specific questions I think the forums and help site for Ubuntu would help the most.
 
NTFS mounting - can it be made read-only?
Yes, as explained by Nod.

NTFS write mounting - what are the chances of it breaking an NTFS partition? Is write support still experimental/beta?
Again, as explained by Nod.
In addition, I've been lucky enough to never experience problems. That said, It's worth being careful if you have some really important data.

Can *nix share files in MS style with Samba or is Samba only for accessing shares?
Totally! And it works great too.

I don't understand what xorg.conf and x11.conf is. I know its something configurations for something to do with graphics...but what exactly?
xorg is the current protocol version of X11 (previously common version was usually XFree86).
It lays down the foundation of the GUI: allows you to create windows, move them, etc.
use xorg.conf to edit things like available resolutions (sometimes your native resolution is enabled by default) or set what driver to use. General display config

There is a shortcut that kills the graphical UI...what is the shortcut and why would I want to do that? How do I restart the UI once I killed it?
Sometimes, if you break something, it's nice to be able to kill and restart X. CTRL + ALT + Backspace will kill X without any confirmation or warning. Not sure if it's always like that, but on all the machines I work on, it starts up on its own again immediately.
Example of why you might want to kill (and restart) X:
You install (for example) your ATI graphics card driver from the repo's, only to find that you get poor performance. You decide to install ATI's proprietary Linux driver from their site. You hit CTRL + ALT + F1 to switch to virtual terminal 1. You log in, do some stuff, and now you switch back to where your GUI is (Usually virtual terminal 7). But it hasn't refreshed to the new settings :confused: CTRL + ALT + Backspace -> X restarts and it has new settings.

I don't get the whole file extension thing on *nix. Some have extensions others don't. How does the OS know what to do with those that don't?
Everything on Linux is a file. That includes your terminals, disc drives, etc. They work like C file descriptors. So you can read and write to them etc. When it comes to actual files, Linux will usually try to open whatever file as a text file (since most of Linux's configuration files are text files). Unless, of course, the file is set to executable. A quick example:
Code:
blah@blah:~/test$ ls -l
drwxr-xr-x 2 blah blah 4096 2008-10-08 14:51 directory
-rwxr-xr-x 1 blah blah    5 2008-10-08 14:50 executable
-rw-r--r-- 1 blah blah    5 2008-10-08 14:50 test
As you can see, "directory" is a directory (as indicated by the 'd'), "executable" is a file that is executable and test is just some random file (readable, but only writable by the owner).
Now, when using a gui, it works much the same as it does in other GUI environments (e.g. Windows). The OS knows what to do based on the extension (and no extension, it'll try open it in whatever you want).


From what I can tell, 5 button mouses/mice are not supported. Is this correct? (Logitech MX desktop). Is there an easy way to enable the scroll wheel without editing configs?
Pass... :o


What are the most important config files I need to know about?
There are too many to list. But probably some of the important ones (so that you can get online to get help) are
Interface configuration:
Code:
/etc/network/interfaces
Configure your software sources:
Code:
/etc/apt/sources.list
Your DNS servers:
Code:
/etc/resolv.conf
Some bash config:
Code:
~/.bashrc
There really are too many to list :(

My last attempt to get rid of the brown default theme on ubuntu failed miserably...got a bunch of files with no instructions on how to install them. Is there a noob friendly way/site of changing the look? Not compiz for now...just the plain theme.
Well if you download a theme, often it comes packed in a .tar.gz which will contain some .gtkrc file (if it's a gnome theme). To install -> System -> Preferences -> Appearance -> Install -> Select the .tar.gz you downloaded
THEN, System -> Preferences -> Appearance -> Customize
The theme components that you installed should be available there. You can do the same thing for icons, etc.
Most themes you get from gnome-look can be installed in this way.


I'm looking for something similar to Vista's search box in the start menu...something that will help me find stuff in the linux menu and maybe files/folders in /home too. There is a Strigi desktop search but it doesn't seem to cover the stuff in the menu at the bottom right.
I haven't used much Vista, so I can't say for sure, but I would guess you would want to add an applet to a panel. There are plenty of downloadable applets, as well as a lot that come standard. Right click the panel -> Add to panel.
For gadget-like features, use something like screenlets (sudo aptitude install screenlets) or gdesklets.


This Lost+found thing...what is it? File fragments recovered off the HDD?
fsck puts corrupted / recovered files there (in the event of a failure of sorts).


Is there a way to completely disable root pwd prompts? I know its for safety etc...but I'm not too stressed about breaking *nix atm. I'll end up reloading it a few times anyway in all likelihood.
Not too sure what you mean by this. Root password is, by default, disabled (this is a SERIOUS security flaw that I won't divulge on the forum :p).
If, by "root" prompts, you mean sudo password prompts, then there's the easy (and bad) way, and there are correct way.
The correct way is to do
Code:
sudo visudo
and edit the sudoers file. You can get information on how to do this from
Code:
man sudoers
(Look for NOPASSWD)
Be careful granting ROOT access to all. Even if you say you're not too worried, you might regret it.


When I switch desktops the taskbar doesn't switch too. i.e. everything is on the TB irrespective of which desktop I'm using. Is there a way to change it so that only the stuff on that desktop is displayed on the TB?
Not quite sure what you mean here either. Are you using gnome-panel with the "window-list" applet? If so, it should do this for you automatically.


How do I make a "shortcut" thing so that I can type "adept" into the run command box instead of adept_manager? I assumed I need to put a script of some sort somewhere.
You could create a directory (somewhere in your home folder), and add that directory to your PATH. Then, you can save bash scripts in there and execute them from anywhere in your file system.
Example: create a file named "adept" in your script folder. Make the file executable:
Code:
chmod +x adept
Then put the following in it:
Code:
#!/bin/bash
/path/to/adept_manager
where you use the path to your adept_manager. You should now be able to run adept_manager by just typing adept


In the process manager, there is user % and system %. What is that?
Not too sure what you mean here.


Any cool linux sites that you guys frequent?
ubuntuforums
ubuntu geek
gnome-look


Any must-have stuff you would recommend? (Aside from restricted packages...i know about those). Admittedly that is a kinda broad question.:o
It is indeed a broad question. Depends what you use your computer for. If you're going to use GEdit on gnome, get yourself some useful plugins:
Code:
sudo aptitude install gedit-plugins
Conky: Lightweight system monitor:
Code:
sudo aptitude install conky
Emulation: Virtualbox
Code:
sudo aptitude install virtualbox-ose
sudo aptitude install virtualbox-ose-modules-generic
If you end up using a terminal a lot (not a gnome-terminal, but a real terminal with no gui):
Code:
sudo aptitude install gpm
For nVidia card users:
Code:
sudo aptitude install nvidia-settings
If you end up using compiz:
Code:
sudo aptitude install compizconfig-settings-manager
Partition editor:
Code:
sudo aptitude install gparted

Obviously there are a ton of other useful apps, but a lot of them are just eye-candy :)

Hope this helps!
 
From what I can tell, 5 button mouses/mice are not supported. Is this correct? (Logitech MX desktop). Is there an easy way to enable the scroll wheel without editing configs?
It does work, I have a MX1000 and all the buttons (8 of them) work. Usually Xorg will pick up your peripherals and automagically choose the best suited driver you have installed. I'm 100% sure if you search the Ubuntu wiki you will find a how-to on configuring your mouse. If there is none, then give me a shout and I'll give you the Gentoo-wiki version, should work on Ubuntu as well.

How do I make a "shortcut" thing so that I can type "adept" into the run command box instead of adept_manager? I assumed I need to put a script of some sort somewhere.
You create a bash alias, system wide or only for the current user.
Here is a few examples:
Code:
alias newcommand='yourcommand -arguments'

alias install='emerge --sync && emerge -fuD world'
Now by issuing only "install" in the terminal it will execute the the entire alias command.
You can configure basic commands to you liking this way, or create incredibly complicated commands like this one for ps:
Code:
alias psox='echo ps ax -Ho pid,ppid,%cpu,%mem,stat,euser,egroup,tname,start_time,ni,priority,command; /bin/ps ax -Ho pid,ppid,%cpu,%mem,stat,euser,egroup,tname,start_time,ni,priority,command'
function pso { if [ "$*" = "" ]; then COL="--width=$COLUMNS"; else COL="$*"; fi; echo "ps ax -o pid,ppid,%cpu,%mem,stat,euser,egroup,tname,start_time,ni,priority,command -H $COL| awk '{if (\$2"'!'"=lpid && \$12!~dummy && \$12"'!'"~\"(^hald-[ar])|(kdeinit)|(agetty)|(dbus)|(awk)\" && \$13"'!'"~\"(kdeinit)|(ksmserver)|(startkde)|(ax)\"){ print \$0}; dummy=\$12; if (\$2"'!'"=lpid) {lpid=0}; if (\$12~\"(spamd)|(postfix)|(kdm)\" || \$2==0){lpid=\$1}}'"; /bin/ps ax -o pid,ppid,%cpu,%mem,stat,euser,egroup,tname,start_time,ni,priority,command -H $COL | awk '{if ($2!=lpid && $12!~dummy && $12!~"(^hald-[ar])|(kdeinit)|(agetty)|(dbus)|(awk)" && $13!~"(kdeinit)|(ksmserver)|(startkde)|(ax)"){ print $0}; dummy=$12; if ($2!=lpid) {lpid=0}; if ($12~"(spamd)|(postfix)|(kdm)" || $2==0){lpid=$1}}' ; }
To uninstall and alias:
Code:
unalias install

In the process manager, there is user % and system %. What is that?
Linux is a multi-user environment, and as such the processes are spread out as the appropriate user started or use them. For example:
hald daemon is started by root at boot
KDE is started by the normal user.

Now the percentages shown is what system resources root (system) is currently using and what you the user are using. A better way to understand this is to use the 'top' command. There you will see what process is used by whom (ctrl+c to exit top).

What are the most important config files I need to know about?
Everything in /etc is pretty important, so every time I need to reinstall a Linux box I back-up the entire /etc.
/etc contains every single system configuration script, so take car to have a back-up of it when you switch a distro or upgrade to a newer version. You will find you fiddled with something in there to get a service just the way you like it (xorg.conf for example with your MX1000 laser mouse), only to forget 6 months down the line how you did it once you switched to a new distro release. See why you need a back-up?
:p

Is there a way to completely disable root pwd prompts? I know its for safety etc...but I'm not too stressed about breaking *nix atm. I'll end up reloading it a few times anyway in all likelihood.
Add your user to the root group, but this STRONGLY NOT ADVISABLE!
Code:
sudo addgroup username root
 
Last edited:
cool utils:
lshw = list hardware. Run this to get an very extensive list of your current hardware. It is not installed by default.
yakuake = quake style drop down console. I absolutely love this. When installed the key for the console is bound to F12 by default.

In terms of NTFS, I have not yet had any problems with reading/writing. However I have not used it extensively yet. The normal ntfs driver doesn't allow write access. Install ntfs-3g for read/write access (I think ubuntu comes with ntfs-3g installed).

In terms of samba, when mounting files use cifs rather then smb. Cifs is the updated version of smb and smb has been discontinued. Cifs = common internet file system.
 
i've been using ntfs-3g to write to ntfs for well over 3 years. Have yet to have an issue because of it.
 
Thanks to everyone for the answers...much appreciated. I won't respond to everything since most of it answers my question 100%.

sn3rd said:
I haven't used much Vista, so I can't say for sure, but I would guess you would want to add an applet to a panel. There are plenty of downloadable applets, as well as a lot that come standard. Right click the panel -> Add to panel.
For gadget-like features, use something like screenlets (sudo aptitude install screenlets) or gdesklets.
Basically I'm looking for a search function that is integrated into the taskbar/menu that covers common locations and the menu thing at the bottom right (Not sure what its called...the start menu). I'll have a look whether there is an applet available that does that.

sn3rd said:
HavocXphere said:
When I switch desktops the taskbar doesn't switch too. i.e. everything is on the TB irrespective of which desktop I'm using. Is there a way to change it so that only the stuff on that desktop is displayed on the TB?
Not quite sure what you mean here either. Are you using gnome-panel with the "window-list" applet? If so, it should do this for you automatically.
I want the taskbar to also be "segregated" like the desktops. At the moment everything from all the desktops is always on the taskbar....I only want the stuff from the desktop I'm working on visible. I'm using the standard kde with no add-ons/applets.

sn3rd said:
You could create a directory (somewhere in your home folder), and add that directory to your PATH.
How do I do that?
 
Basically I'm looking for a search function that is integrated into the taskbar/menu that covers common locations and the menu thing at the bottom right (Not sure what its called...the start menu). I'll have a look whether there is an applet available that does that.
Install KBFX, it does what you need. Add it to the panel (Right click -> Add applet -> KBFX) and remove the default KDE menu (Right click -> remove)
Like this:
http://mybroadband.co.za/photos/showphoto.php/photo/7144/size/big/cat/2

When I switch desktops the taskbar doesn't switch too. i.e. everything is on the TB irrespective of which desktop I'm using. Is there a way to change it so that only the stuff on that desktop is displayed on the TB?
Again KDE can do this by grouping windows to each desktop only, so if you have a bunch of apps open on desktop 1 and switch to desktop 2, the taskbar panel will be clean for desktop 2.
Right click on the taskbar -> Configure Panel -> Taskbar -> untick "Show windows from all desktops" (KDE 3.5)

How do I do that?
Why not just use an alias?? No extra garbage and scripts.
Code:
alias adept='adept_manager'
Now whenever you type adept in any terminal or the "run command" box, it will open adept_manager.
 
I want the taskbar to also be "segregated" like the desktops. At the moment everything from all the desktops is always on the taskbar....I only want the stuff from the desktop I'm working on visible. I'm using the standard kde with no add-ons/applets.
As I say, a gnome-panel with the Window List applet keeps each desktop's windows separate (i.e. working with a browser on Desktop 1 and VLC on Desktop 2, when viewing Desktop 1, you won't see VLC, and on Desktop 2, you won't see the browser).

How do I do that?
http://ubuntuforums.org/archive/index.php/t-43923.html
That should be helpful.
 
Install KBFX, it does what you need. Add it to the panel (Right click -> Add applet -> KBFX)
Nice...looks like what I'm looking for.

taskbar panel will be clean for desktop 2.
Right click on the taskbar -> Configure Panel -> Taskbar -> untick "Show windows from all desktops" (KDE 3.5)
That sounds exactly like what I want to do.

Why not just use an alias?? No extra garbage and scripts.
Yeah, I got your way too...but remember I'm not necessarily looking for the most efficient way to do X, I'm more on a general mission to learn here.:)

Google says I need to edit /etc/skel/.profile to change the path variable...but I'm not at my PC atm so I can't test.
 
Top
Sign up to the MyBroadband newsletter
X