Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Guru Yaekob
Feb 6, 2011

IRONKNUCKLE PERMABANNED! OFFERS 10-TOPIC POLITICAL DEBATE TO ANY LIBERAL - SA MEMBER STARTS TO ACCEPT, THEN BACKS OUT AND WETS PANTS AFTER LEARNING IRONKNUCKLE HAS DEBATED ON TELEVISION BEFORE! READ HERE
Hey guys, total newbie to Linux I just installed Ubuntu loving it so far, only I'm having one issue, my laptop is plugged into a bigger monitor. Now I want to be able to close my laptop and have it just display on my big monitor. I can make it say it only displays on the big monitor but I cant figure out how to make it so I can close my laptop lid and it doesn't go into hibernate/shutdown/blank screen. Is it possible?

I like to shut my lid and put my xbox on top of it to save space on my desk, and having to keep my laptop open is becoming a hassle, tried googling the issue but came up with nothing.

Adbot
ADBOT LOVES YOU

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Yolkz posted:

Hey guys, total newbie to Linux I just installed Ubuntu loving it so far, only I'm having one issue, my laptop is plugged into a bigger monitor. Now I want to be able to close my laptop and have it just display on my big monitor. I can make it say it only displays on the big monitor but I cant figure out how to make it so I can close my laptop lid and it doesn't go into hibernate/shutdown/blank screen. Is it possible?

I like to shut my lid and put my xbox on top of it to save space on my desk, and having to keep my laptop open is becoming a hassle, tried googling the issue but came up with nothing.

System -> Preferences -> Power Management -> "When laptop lid is closed:"

That's in "classic" gnome, i'm not sure if they totally rearranged the menus in Unity or not.

Guru Yaekob
Feb 6, 2011

IRONKNUCKLE PERMABANNED! OFFERS 10-TOPIC POLITICAL DEBATE TO ANY LIBERAL - SA MEMBER STARTS TO ACCEPT, THEN BACKS OUT AND WETS PANTS AFTER LEARNING IRONKNUCKLE HAS DEBATED ON TELEVISION BEFORE! READ HERE

peepsalot posted:

System -> Preferences -> Power Management -> "When laptop lid is closed:"

That's in "classic" gnome, i'm not sure if they totally rearranged the menus in Unity or not.

Yeah in that option it only gives me the option to hibernate/blankscreen/ or shutdown. So no matter what when I close the lid my computer goes into shutdown mode and no longer displays on my big monitor :(

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Yolkz posted:

Yeah in that option it only gives me the option to hibernate/blankscreen/ or shutdown. So no matter what when I close the lid my computer goes into shutdown mode and no longer displays on my big monitor :(

Try
code:
gconftool-2 --type string --set /apps/gnome-power-manager/buttons/lid_ac "nothing"
from http://ubuntuforums.org/showthread.php?t=1307857 Not sure if it will work for 11.04 though.

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

Yolkz posted:

Hey guys, total newbie to Linux I just installed Ubuntu loving it so far, only I'm having one issue, my laptop is plugged into a bigger monitor. Now I want to be able to close my laptop and have it just display on my big monitor. I can make it say it only displays on the big monitor but I cant figure out how to make it so I can close my laptop lid and it doesn't go into hibernate/shutdown/blank screen. Is it possible?

I like to shut my lid and put my xbox on top of it to save space on my desk, and having to keep my laptop open is becoming a hassle, tried googling the issue but came up with nothing.

Fixed that like this years ago on a 10-yr old Toshiba: added Option "MonitorLayOut" "CRT,LFP" to the "Device" Section of XF86Config (now xorg.conf) in /etc/X11/. That made X use the external screen only - doesn't matter whether it's actually a CRT of an LCD - and somehow circumvented all standby behaviour when clicking the laptop's lid fully closed.

I don't know why the latter fixed that, though. May just have been lucky, given the limited support for power management at the time. I could still use the manual apm commands too. Give it a try, can't really hurt. If you end up with a blank screen (unlikely), escape X with Ctrl+Alt+F* to a runlevel 3 console or end it with Ctrl+Alt+Backspace if you must.

spankmeister
Jun 15, 2008






I did a motherboard swap in my server (Ubuntu 10.10 32b), and I'm not getting the improved performance I'm after.

I went from an Athlon XP 2600+, SIS 748(or something) with 1GB of ram to a Core2Duo E6750 dual core with an Intel P35 chipset and 4GB of DDR3.

Now apart form a small udev annoyance it booted up flawlessly.

I did a small performance test:

time echo "scale=5000; 4*a(1)" | bc -l -q ; cat /proc/cpuinfo | grep "model name"; cat /proc/meminfo | grep MemTotal

With the following results:

old system posted:

real 0m56.586s
user 0m56.340s
sys 0m0.008s
model name : AMD Athlon(tm) XP 2600+
MemTotal: 1025344 kB

new system posted:

real 0m43.423s
user 0m43.267s
sys 0m0.140s
model name : Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz
model name : Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz
MemTotal: 4123780 kB

For reference, someone with a similar setup to mine:

quote:

real 0m31.816s
user 0m31.790s
sys 0m0.000s
model name : Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz
model name : Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz
MemTotal: 1025344 kB
(Not at all a ram-dependent test, but whatever)

So, here's my question:

Why is my system performing so poorly? I'm running a stock i686 SMP kernel same as before, no special K7 kernels or anything.

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

spankmeister posted:

Why is my system performing so poorly? I'm running a stock i686 SMP kernel same as before, no special K7 kernels or anything.

I'd be willing to bet that this is your problem. I checked the dependencies of bc on my Gentoo server (`emerge -epvt bc`) and GNU MPFR was listed -- I do not know anything about how MPFR works, but multiple precision arithmetic is one of the things that will usually see a significant improvement when you move to 64-bit code. (It might be the required support for SSE and not simply wider registers, but since MPFR is based on GMP, it could very well be either.)

EDIT: I just noticed that bc links against GMP too.

Lysidas fucked around with this message at 16:14 on Jun 21, 2011

spankmeister
Jun 15, 2008






Lysidas posted:

I'd be willing to bet that this is your problem. I checked the dependencies of bc on my Gentoo server (`emerge -epvt bc`) and GNU MPFR was listed -- I do not know anything about how MPFR works, but multiple precision arithmetic is one of the things that will usually see a significant improvement when you move to 64-bit code. (It might be the required support for SSE and not simply wider registers, but since MPFR is based on GMP, it could very well be either.)

EDIT: I just noticed that bc links against GMP too.

Right. But that means reinstalling because a 64 bit kernel won't help if all my libraries and binaries are 32 bit.

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

spankmeister posted:

Right. But that means reinstalling because a 64 bit kernel won't help if all my libraries and binaries are 32 bit.

Exactly. If your benchmark is actually representative of what you're doing on your server (e.g. video transcoding, encryption, compression, etc.) then reinstall. Otherwise, don't worry about it. There are other benchmarks that you can run that won't be as affected by 32- or 64-bit compilation; you picked one that is.

Longinus00
Dec 29, 2005
Ur-Quan

taqueso posted:

Try
code:
gconftool-2 --type string --set /apps/gnome-power-manager/buttons/lid_ac "nothing"
from http://ubuntuforums.org/showthread.php?t=1307857 Not sure if it will work for 11.04 though.

What do you see on this screen?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

nitrogen posted:

$ sudo /etc/init.d/ntp stop

$ sudo rm /var/lib/ntp/ntp.drift

$ sudo ntpdate 0.ubuntu.pool.ntp.org
[look for a line that says something like
code:
20 Jun 12:24:19 ntpdate[16254]: adjust time server 204.235.61.9 offset -0.009897 sec
$ sudo /etc/init.d/ntp start

wait about 30-45 mins then

$ ntpq -p

you should see output like:

code:
$ ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+173-203-122-111 81.25.192.148    3 u  802 1024  377   25.963   -6.175   4.984
+109.169.60.186  204.9.54.119     2 u  165 1024  377   48.010    4.028   7.349
*68.68.18.78.cus 192.43.244.18    2 u 1007 1024  377   23.387  -11.151   4.515
-mirror          128.138.140.44   2 u  554 1024  377   26.370  -29.166  27.323
Make sure one of your lines has an entry that begins with "*" (like the 3rd line here does) this means your ntpd is locked onto a good source.
I don't have a /var/lib/ntp/ntp.drift file, but there was a /etc/adjtime and /etc/default/adjtimex.
I tried removing those, and doing those other steps. ntpq -p didn't give me any result with a + or * or anything prefixed to it. I appreciate the help, but I think I'm just going to just format and reinstall at this point, maybe try another distro. The amount of time I've spent struggling with this is ridiculous.

dolicf
Sep 12, 2010

nitrogen posted:

ps -ef |grep ntp |grep -v grep

Neat trick to save some time in situations like this:

# ps -ef | grep [n]tp

grep will match on any single character inside the brackets. For instance, if you had used [abcd]tp or [a-d]tp, grep would match on atp, btp, ctp or dtp. With the above, grep will only match on ntp. The real magic comes in when you take a look at your grep process in ps. Because ps is displaying the literal command rather than how the command interprets special characters, your grep will show up in ps with the square brackets included and thus won't be matched by your grep. Observe:

code:
[root@server ~]# ps aux | grep lfd
root     22333  0.0  1.2 131304 26396 ?        Ss   00:00   0:15 lfd - sleeping
root     24492  0.0  0.0  61232   736 pts/1    S+   06:43   0:00 grep lfd

[root@server ~]# ps aux | grep [l]fd
root     22333  0.0  1.2 131304 26396 ?        Ss   00:00   0:16 lfd - sleeping

Mr. Fix It
Oct 26, 2000

💀ayyy💀


dolicf posted:

Neat trick to save some time in situations like this:

# ps -ef | grep [n]tp

grep will match on any single character inside the brackets. For instance, if you had used [abcd]tp or [a-d]tp, grep would match on atp, btp, ctp or dtp. With the above, grep will only match on ntp. The real magic comes in when you take a look at your grep process in ps. Because ps is displaying the literal command rather than how the command interprets special characters, your grep will show up in ps with the square brackets included and thus won't be matched by your grep. Observe:

code:
[root@server ~]# ps aux | grep lfd
root     22333  0.0  1.2 131304 26396 ?        Ss   00:00   0:15 lfd - sleeping
root     24492  0.0  0.0  61232   736 pts/1    S+   06:43   0:00 grep lfd

[root@server ~]# ps aux | grep [l]fd
root     22333  0.0  1.2 131304 26396 ?        Ss   00:00   0:16 lfd - sleeping

Oh my god, I am going to use this so much. You have saved me literally hundreds of keystrokes.

dont skimp on the shrimp
Apr 23, 2008

:coffee:
You could also use pgrep I suppose. pgrep -l will list the PID and name of the matched processes.

Still, neat trick. :)

bort
Mar 13, 2003

I, too, love that trick. I sometimes wonder how many keystrokes I've lost correcting mistyped brackets, though. Probably not enough to have always used grep -v grep.

nitrogen
May 21, 2004

Oh, what's a 217°C difference between friends?

dolicf posted:

Neat trick to save some time in situations like this:

# ps -ef | grep [n]tp

grep will match on any single character inside the brackets. For instance, if you had used [abcd]tp or [a-d]tp, grep would match on atp, btp, ctp or dtp. With the above, grep will only match on ntp. The real magic comes in when you take a look at your grep process in ps. Because ps is displaying the literal command rather than how the command interprets special characters, your grep will show up in ps with the square brackets included and thus won't be matched by your grep. Observe:

code:
[root@server ~]# ps aux | grep lfd
root     22333  0.0  1.2 131304 26396 ?        Ss   00:00   0:15 lfd - sleeping
root     24492  0.0  0.0  61232   736 pts/1    S+   06:43   0:00 grep lfd

[root@server ~]# ps aux | grep [l]fd
root     22333  0.0  1.2 131304 26396 ?        Ss   00:00   0:16 lfd - sleeping

Oh, now that's nice.
what's nicer is it works on all flavors of unix I work on, so i will incorporate it (hpux, solaris, bsd, linux)

Dinty Moore
Apr 26, 2007

dolicf posted:

Neat trick to save some time in situations like this:

# ps -ef | grep [n]tp

grep will match on any single character inside the brackets. For instance, if you had used [abcd]tp or [a-d]tp, grep would match on atp, btp, ctp or dtp. With the above, grep will only match on ntp. The real magic comes in when you take a look at your grep process in ps. Because ps is displaying the literal command rather than how the command interprets special characters, your grep will show up in ps with the square brackets included and thus won't be matched by your grep. Observe:

code:
[root@server ~]# ps aux | grep lfd
root     22333  0.0  1.2 131304 26396 ?        Ss   00:00   0:15 lfd - sleeping
root     24492  0.0  0.0  61232   736 pts/1    S+   06:43   0:00 grep lfd

[root@server ~]# ps aux | grep [l]fd
root     22333  0.0  1.2 131304 26396 ?        Ss   00:00   0:16 lfd - sleeping

Seriously? I've been using Linux for... 15+ years now. How have I never heard of/thought of this? Thank you, goon sir.

pseudorandom name
May 6, 2007

ps $(pgrep ntp)

gonadic io
Feb 16, 2011

>>=
I'm a recent convert to the latest Ubuntu (11.04) and I use two hard disks pretty regularly. However, sometimes the one that Ubuntu isn't installed on sometimes isn't mounted on boot and I go into disk manager -> mount.

Is there a way to have it always mount on startup and get rid of the desktop shortcut thing that's there when it's mounted?

Edit, also is there a way to pipe text to the clipboard? E.g. "$ ./command | clipboard"

gonadic io fucked around with this message at 23:04 on Jun 22, 2011

spankmeister
Jun 15, 2008






AlsoD posted:

I'm a recent convert to the latest Ubuntu (11.04) and I use two hard disks pretty regularly. However, sometimes the one that Ubuntu isn't installed on sometimes isn't mounted on boot and I go into disk manager -> mount.

Is there a way to have it always mount on startup and get rid of the desktop shortcut thing that's there when it's mounted?
Yes, create an fstab entry for the partion (disk) you want to mount.

It's best to do this with the UUID

Refer to this guide: http://www.cyberciti.biz/faq/linux-finding-using-uuids-to-update-fstab/

quote:

Edit, also is there a way to pipe text to the clipboard? E.g. "$ ./command | clipboard"

xclip should be able to help you out.

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

AlsoD posted:

I'm a recent convert to the latest Ubuntu (11.04) and I use two hard disks pretty regularly. However, sometimes the one that Ubuntu isn't installed on sometimes isn't mounted on boot and I go into disk manager -> mount.

Is there a way to have it always mount on startup and get rid of the desktop shortcut thing that's there when it's mounted?

As 'root', edit the 'fstab' file in the /etc directory. The entry for your main drive should look like this:

pre:
/dev/sda[+]    /           ext[x]       defaults               1    1
Under that line, add this one for the second drive:

pre:
/dev/sdb[+]    /$dir[*]    ext[x]       defaults               1    2
[+]relevant partition number
[x]relevant filesystem type
[*]chosen mount directory

Note the different number at the end of the second line; only the root partition has 1; subsequent native filesystems have 2. Non-native filesystems get 0.

I assume you have SATA drives. If they're IDE, you use /dev/hda and /dev/hdb.

spankmeister
Jun 15, 2008






Underflow posted:

As 'root', edit the 'fstab' file in the /etc directory. The entry for your main drive should look like this:

/dev/sda[+] / ext[x] defaults 1 1

Under that line, add this one for the second drive:

/dev/sdb[+] /$dir[*] ext[x] defaults 1 2

[+]relevant partition number
[x]relevant filesystem type
[*]chosen mount directory

Note the different number at the end of the second line; only the root partition has 1; subsequent native filesystems have 2. Non-native filesystems get 0.
I have made it a habit to mount by UUID because that survives any device node renumbering if you happen to plug in an extra disk or something.

quote:

I assume you have SATA drives. If they're IDE, you use /dev/hda and /dev/hdb.
Actually in ubuntu they will be sdX as well.

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

spankmeister posted:

I have made it a habit to mount by UUID because that survives any device node renumbering if you happen to plug in an extra disk or something.

Haven't experienced with it yet. Sounds good.

spankmeister posted:

Actually in ubuntu they will be sdX as well.

Aha, didn't know that.

Hughmoris
Apr 21, 2007
Let's go to the abyss!
I am trying to setup a samba share on my laptop running ubuntu 11. I believe I have everything set up correctly but I cannot see it on my desktop running Windows 7. After doing a bit of reading, it seems that Windows 7 cannot properly see Samba shares because of the "HomeGroup" poo poo. Does this still hold true?

Modern Pragmatist
Aug 20, 2008

Hughmoris posted:

I am trying to setup a samba share on my laptop running ubuntu 11. I believe I have everything set up correctly but I cannot see it on my desktop running Windows 7. After doing a bit of reading, it seems that Windows 7 cannot properly see Samba shares because of the "HomeGroup" poo poo. Does this still hold true?

What do you mean by "can't see it"?

To connect, type "\\servername\share" into the address bar in Windows Explorer. I'm guessing only automatic network discovery is not functioning.

Hughmoris
Apr 21, 2007
Let's go to the abyss!

Modern Pragmatist posted:

What do you mean by "can't see it"?

To connect, type "\\servername\share" into the address bar in Windows Explorer. I'm guessing only automatic network discovery is not functioning.

Doesn't work, tells me my password is incorrect. This seems to be a common problem with Windows 7 and Samba for home use. Anyone else run into it?

angrytech
Jun 26, 2009

Hughmoris posted:

Doesn't work, tells me my password is incorrect. This seems to be a common problem with Windows 7 and Samba for home use. Anyone else run into it?

Dealing with this problem years ago was one of the reasons that I moved to an all-Ubuntu environment.

Hughmoris
Apr 21, 2007
Let's go to the abyss!

angrytech posted:

Dealing with this problem years ago was one of the reasons that I moved to an all-Ubuntu environment.

But what if you want to play PC games? :smith:

angrytech
Jun 26, 2009

Hughmoris posted:

But what if you want to play PC games? :smith:

I started going outside instead. :v:
Just kidding, I hit 21 and realized that I could buy alcohol.

Hughmoris
Apr 21, 2007
Let's go to the abyss!
I guess I could try dual-booting Win7 and Kubuntu and see how I survive.

Hughmoris fucked around with this message at 05:24 on Jun 23, 2011

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

Hughmoris posted:

I am trying to setup a samba share on my laptop running ubuntu 11. I believe I have everything set up correctly but I cannot see it on my desktop running Windows 7. After doing a bit of reading, it seems that Windows 7 cannot properly see Samba shares because of the "HomeGroup" poo poo. Does this still hold true?

You've made sure to specify a password when you configured samba and ran the test? You've set the correct 'workgroup' and NIC (that smbd binds to) in smb.conf?

bort
Mar 13, 2003

Hughmoris posted:

I guess I could try dual-booting Win7 and Kubuntu and see how I survive.
There's also Wubi, if Windows is a priority: http://wubi.sourceforge.net/

evol262
Nov 30, 2010
#!/usr/bin/perl

Hughmoris posted:

Doesn't work, tells me my password is incorrect. This seems to be a common problem with Windows 7 and Samba for home use. Anyone else run into it?

smbpasswd -a $username

Underflow posted:

spankmeister posted:

Actually in ubuntu they will be sdX as well.
Aha, didn't know that.
I think this started in 2.6.19 or something. Any modern Linux system should be that way.

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

quote:

sdX

evol262 posted:

I think this started in 2.6.19 or something. Any modern Linux system should be that way.

I noticed an old IDE ROM is now an srX under 1337 Slack (I love them for naming it that and still have a plausible reason).

Speaking of IDE drives, do you know if there are any reliable models still around? I'm a bit put off by SATA annoyances on 2 drives I have, and since I only use this machine as the head of a small LAN of dedicated boxes, the better performance isn't important to me. I have IDE drives in several machines from last century chugging along nicely...

spankmeister
Jun 15, 2008






Underflow posted:

I noticed an old IDE ROM is now an srX under 1337 Slack (I love them for naming it that and still have a plausible reason).

Speaking of IDE drives, do you know if there are any reliable models still around? I'm a bit put off by SATA annoyances on 2 drives I have, and since I only use this machine as the head of a small LAN of dedicated boxes, the better performance isn't important to me. I have IDE drives in several machines from last century chugging along nicely...

Not really, unless you go on the refurb market.

What annoyances though?

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

spankmeister posted:

Not really, unless you go on the refurb market.

What annoyances though?

It's here in this thread

icantfindaname
Jul 1, 2008


I'm currently trying to install GTK+ in ubuntu to dick around with, and trying to make the source keeps giving me an error saying that xinput.h cannot be found. Note that I've been using linux for a total of about a week, so please excuse my incompetence. Here's the error:
code:
strudelmeister@strudelmeister-VirtualBox:~/Downloads/gtk+-3.0.11$ make
make  all-recursive
make[1]: Entering directory `/home/strudelmeister/Downloads/gtk+-3.0.11'
Making all in po
make[2]: Entering directory `/home/strudelmeister/Downloads/gtk+-3.0.11/po'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/strudelmeister/Downloads/gtk+-3.0.11/po'
Making all in po-properties
make[2]: Entering directory `/home/strudelmeister/Downloads/gtk+-3.0.11/po-properties'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/strudelmeister/Downloads/gtk+-3.0.11/po-properties'
Making all in gdk
make[2]: Entering directory `/home/strudelmeister/Downloads/gtk+-3.0.11/gdk'
config.status: executing gdk/gdkconfig.h commands
config.status: gdk/gdkconfig.h is unchanged
echo timestamp > stamp-gc-h
  GEN    gdkconfig.h
make  all-recursive
make[3]: Entering directory `/home/strudelmeister/Downloads/gtk+-3.0.11/gdk'
Making all in x11
make[4]: Entering directory `/home/strudelmeister/Downloads/gtk+-3.0.11/gdk/x11'
  CC     gdkdevice-xi.lo
In file included from gdkdevice-xi.c:24:0:
gdkdeviceprivate-xi.h:28:35: fatal error: X11/extensions/XInput.h: No such file or directory
compilation terminated.
make[4]: *** [gdkdevice-xi.lo] Error 1
make[4]: Leaving directory `/home/strudelmeister/Downloads/gtk+-3.0.11/gdk/x11'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/strudelmeister/Downloads/gtk+-3.0.11/gdk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/strudelmeister/Downloads/gtk+-3.0.11/gdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/strudelmeister/Downloads/gtk+-3.0.11'
make: *** [all] Error 2
Is there some obvious error here?

Bushwack
Aug 29, 2000
You're missing a dependency to build that:
code:
sudo apt-get instal libx11-dev
should solve that issue for you, but you'll run into another dependency problem right afterwards I'm sure.

Why are you trying to build gtk from source? Let the package manager do your installations for you whenever possible:
code:
sudo apt-get install libgtk-3-0

icantfindaname
Jul 1, 2008


I'm going through the official tutorial and it said to install GTK from source. Also I didn't know the apt package name. Anyways, now that I've installed the package, I'm trying to compile the first example program in the tutorial, and pkg-config says it can't find the gtk pacakge in its search path:
code:
~/Code/C$ gcc base.c -o base `pkg-config --cflags --libs gtk+-2.0`
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
base.c:1:21: fatal error: gtk/gtk.h: No such file or directory
compilation terminated.
Inspection of /usr/lib/pkgconfig reveals that there aren't any gtk related packages there.
What is my obvious mistake this time?

Adbot
ADBOT LOVES YOU

spankmeister
Jun 15, 2008






What are you trying to accomplish here?

While I applaud you trying to build your own packages, gtk is not exactly something you'd want a half-installed half-working version of.

As for solving your problem:
Does the gkt+ package come with a configure script? (packages usually do)
If so, run ./configure before you run make, and it will tell you what packages are missing, then use apt-cache search <name> (do an apt-get update first) to find what ubuntu package contains the needed dependencies (usually something like libsometing-dev) and then install that with apt-get install or aptitude install.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply