LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   2 questions: Dual monitors and partition permissions (https://www.linuxquestions.org/questions/linux-desktop-74/2-questions-dual-monitors-and-partition-permissions-633375/)

Digital Watches 04-06-2008 01:06 AM

2 questions: Dual monitors and partition permissions
 
First off, is there any way to get ubuntu to recognize two monitors simultaneously?

Second, I got my dual boot up and running, and have a "shared" fat32 partition that, being 900 gigs, is going to be what I'm running the majority of files and applications from. Problem is... when I'm on linux, the partition is restricted. It just means that I have to go try to open it and then type my password again, but if something's supposed to run from it from boot, it won't work until I've unlocked it. I tried to change the permissions, but even though it lists me as the owner, it claims I don't have the right permissions to do so.

blackhole54 04-06-2008 02:59 AM

I've never run dual monitors, so I can't advise.

Wrt your FAT32 partition, your ownership and permissions will depend on who mounted it and how. FAT32 doesn't know about about *nix style permissions, so all files and directories will have the same owner and permissions. You might have to fill me in some on exactly what you want (if I don't guess right!) but I am guessing that you might want to automatically mount this partition when Linux boots. If so, and if you want all users to be able to read, write and execute, add (or modify if a line already exists) the following line to /etc/fstab.

Code:

/dev/hda5              /mnt/fat32            vfat    umask=0    0 0
Change /mnt/fat32 to your selected mount point. Change /dev/hda5 to your FAT32 partition. The umask grants everybody read/write/execute permission. (If you want to block execution, add the noexec option in addition to umask.) That partition and all files on it will be owned by root.

The only way I know to change ownership or permissions on FAT32 after it has been mounted is to unmount it and then mount it again. Even the remount option for the mount comand doesn't seem to work.


FYI, I have no experience with it, but I've been reading that Linux can now handle reading and writing an NTFS partition. Some are recommending it instead of using FAT32. You can google for more info.

Digital Watches 04-06-2008 04:47 AM

Uh oh, this isn't good. It's now claiming that I don't have the right permissions to save fstab.

blackhole54 04-06-2008 12:54 PM

Quote:

Originally Posted by Digital Watches (Post 3112359)
Uh oh, this isn't good. It's now claiming that I don't have the right permissions to save fstab.

Um ... maybe I should have pointed out you have to be root (or use sudo) to edit fstab. (That's actually true for all system configuration files.) It's also a good idea to backup up a configuration file before you edit it in case you make a mistake and need to go back. (Yes, we've all been there. :) ) If you know how to call your favorite editor by name, i.e. from the command line instead of from a menu, you can type:

Code:

sudo cp -pvf --backup=numbered /etc/fstab /etc/fstab
sudo your_favorite_editor /etc/fstab

EDIT: For graphical editors (such as gedit), gksudo should be used instead of sudo. More info about sudo and gksudo can be found here: https://help.ubuntu.com/community/RootSudo . Note the drag-n-drop tip about editing system configuration files with graphical editors.

Alternatively you can copy /etc/fstab to your home directory and edit it w/o priviledge and then:

Code:

sudo install -m 644 --backup=numbered fstab /etc
You can then delete the copy of fstab in your home directory. (The -m 644 sets the permissions to what you started with (644 = rw-r--r--) which you can verify by looking at the permissions of /etc/fstab before and after you use install. When used with sudo, install will, by default copy the file with root as user and group.)

Digital Watches 04-06-2008 03:54 PM

Okay, that (Sudo installing it after modifying a copy in my home directory) worked. As a note for anyone else trying this, though, I had to include the UUID of the drive as well (if that should have been obvious from what you already explained, my bad).

Thanks a ton, sir!

AdaHacker 04-06-2008 09:32 PM

Dual monitors? Sure, no problem. I've got Kubuntu running with 3 monitors on 2 video cards at work. It's just a matter of turning on Xinerama support and adding the appropriate lines in your xorg.conf file. Of course, the details will depend on your setup, so you'll have to tell us more about that. However, if you happen to be using a dual-head Nvidia card, the Nvidia configuration tool will actually do most of the work for you.

blackhole54 04-07-2008 01:14 AM

Quote:

Originally Posted by Digital Watches (Post 3112838)
I had to include the UUID of the drive as well (if that should have been obvious from what you already explained, my bad).

Not your bad, more my ignorance. It is related to udev; in the old days it wasn't required and even with udev it isn't always required. (It doesn't seem to be required with a version of Ubuntu that Sytem76 pre-installed on a computer I purchased from them. But I think they mucked with the udev configuration files. I haven't completely figured it out.) For everybodies benefit, would post the line that actually worked? Thanks.

EDIT: Feel free to obfuscate the UUID if you wish. I.e. replace some of the charecters with Xs.

Digital Watches 04-09-2008 02:27 AM

Quote:

Originally Posted by AdaHacker (Post 3113055)
Dual monitors? Sure, no problem. I've got Kubuntu running with 3 monitors on 2 video cards at work. It's just a matter of turning on Xinerama support and adding the appropriate lines in your xorg.conf file. Of course, the details will depend on your setup, so you'll have to tell us more about that. However, if you happen to be using a dual-head Nvidia card, the Nvidia configuration tool will actually do most of the work for you.

Er... I'm using a Nvidia card, but it's a fairly new one (geforce 9800 I think is what the model is called). What is this configuration tool, and where might I find it?

Quote:

Originally Posted by blackhole54 (Post 3113165)
Not your bad, more my ignorance. It is related to udev; in the old days it wasn't required and even with udev it isn't always required. (It doesn't seem to be required with a version of Ubuntu that Sytem76 pre-installed on a computer I purchased from them. But I think they mucked with the udev configuration files. I haven't completely figured it out.) For everybodies benefit, would post the line that actually worked? Thanks.

EDIT: Feel free to obfuscate the UUID if you wish. I.e. replace some of the charecters with Xs.

No problem:

# /dev/sda4
UUID=XXXX-XXXX /media/NIFLHEIM vfat umask=0 0 0


Oddly, I seem to be having trouble doing the same with another drive I recently cannibalized from another computer and repartitioned with a GParted live CD. Any idea why this might be?

AdaHacker 04-09-2008 08:38 AM

Quote:

Originally Posted by Digital Watches (Post 3115483)
What is this configuration tool, and where might I find it?

The particular tool I was referring to is called nvidia-settings. I believe it's shipped by Nvidia as part of their driver package. It may also be available in your distribution's software repositories. Once the Nvidia drivers are installed and X is using them, you can use this tool to enable Xinerama support, set the screen positions and resolutions, etc. Editing your xorg.conf file by hand isn't rocket science, but using this tool is a bit easier.

If you want to do the configuration by hand, you just need to add a devince, monitor, and screen section for each display and turn on Xinerama. Here's the relevant portions of my xorg.conf file, for reference. Obviously the particular values will be different for your hardware.
Code:

Section "ServerLayout"
    Identifier    "Default Layout"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Keyboard"
    InputDevice    "Mouse"
EndSection

Section "ServerFlags"
    Option        "Xinerama" "1"
EndSection

Section "Monitor"
    Identifier    "Monitor0"
    VendorName    "Unknown"
    ModelName      "Samsung SyncMaster"
    HorizSync      30.0 - 81.0
    VertRefresh    56.0 - 75.0
EndSection

Section "Monitor"
    Identifier    "Monitor1"
    VendorName    "Unknown"
    ModelName      "Samsung SyncMaster"
    HorizSync      30.0 - 81.0
    VertRefresh    56.0 - 75.0
EndSection

Section "Device"
    Identifier    "Videocard0"
    Driver        "nvidia"
    VendorName    "NVIDIA Corporation"
    BoardName      "GeForce 7300 LE"
    BusID          "PCI:1:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier    "Videocard1"
    Driver        "nvidia"
    VendorName    "NVIDIA Corporation"
    BoardName      "GeForce 7300 LE"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Screen"
    Identifier    "Screen0"
    Device        "Videocard0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option        "TwinView" "0"
    Option        "metamodes" "CRT-0: nvidia-auto-select +0+0; CRT-0: 800x600 +0+0; CRT-0: 640x480 +0+0"
EndSection

Section "Screen"
    Identifier    "Screen1"
    Device        "Videocard1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option        "TwinView" "0"
    Option        "metamodes" "CRT-1: nvidia-auto-select +0+0"
EndSection


blackhole54 04-10-2008 02:20 AM

Quote:

Originally Posted by Digital Watches (Post 3115483)
Oddly, I seem to be having trouble doing the same with another drive I recently cannibalized from another computer and repartitioned with a GParted live CD. Any idea why this might be?

Do remember that whenever you install a file system on a partition ("format it"), it changes the UUID. Other than that I would need more info.

Can you mount the new partition manually?

Digital Watches 04-11-2008 12:28 AM

Quote:

Originally Posted by blackhole54 (Post 3116536)
Do remember that whenever you install a file system on a partition ("format it"), it changes the UUID. Other than that I would need more info.

Can you mount the new partition manually?

No, it says I don't have permission to, but it worked before I rebooted last.

blackhole54 04-11-2008 01:17 AM

Quote:

Originally Posted by Digital Watches (Post 3117589)
No, it says I don't have permission to, but it worked before I rebooted last.

On edgy eft, if as normal user, I try to mount a partition that is not in fstab with a command something like

mount /dev/sda5 /mnt/temp

I get a message only root can do that. Is that the message you are getting or some other? If that is the message, try it using sudo.

If none of that works, look through /var/log/syslog file for boot time messages involving the disk. (The grep command might be useful for this.) For example, I see messages like:

Code:

Apr 10 22:49:35 ratel kernel: [17179574.416000]  sda: sda1 sda2 sda3 < sda5 sda6 sda7 sda8 sda9 sda10 >

[ ... ]

Apr 10 22:49:35 ratel kernel: [17179597.132000] EXT3 FS on sda1, internal journal

See if there are any error messages.

If not try:

Code:

sudo fdisk /dev/<name of drive>
sudo e2fsck /dev/<name of partition>

I am just looking to see if any errors are reported. After fdisk starts you can quit by typing q.

Digital Watches 04-11-2008 01:28 AM

Okay. I got it to mount, but I can't get it into fstab without it cutting off my permissions. If I add an fstab entry for it, I lose permission to mount, it seems. Any idea how to get it to mount on boot?

Digital Watches 04-11-2008 01:37 AM

Also: I feel dumb for this, but I can't seem to get to the nvidia config tool, and I'm starting to think I don't actually know what you mean by it.

blackhole54 04-11-2008 01:43 AM

Quote:

Originally Posted by Digital Watches (Post 3117636)
Okay. I got it to mount, but I can't get it into fstab without it cutting off my permissions. If I add an fstab entry for it, I lose permission to mount, it seems. Any idea how to get it to mount on boot?

Just for clarity (I hope!) for anybody else that stumbles onto this thread, I think I made an erroneous assumption in my last post. When I said to use e2fsck, that is only appropriate for ext2/ext3 filesystems, while I believe you are dealing with FAT. It sounds like we are past that point, but I wanted to clarify for anybody else.

First, am I correct that this is a FAT filesystem? Are you using a line in fstab similar to what you posted in post #8? If not, please post what you are using. Also, please post the results of:

Code:

ls -ld <mount point>
mount

(The first parameter in the first command is the small letter "el."


All times are GMT -5. The time now is 01:50 AM.